2712
This commit is contained in:
19
tests/test_2712.cpp
Normal file
19
tests/test_2712.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <solution/2712.h>
|
||||
//
|
||||
// Created by xfj12 on 2025/3/27.
|
||||
//
|
||||
TEST(MinimumCostTest, Test1)
|
||||
{
|
||||
char s[] = "0011";
|
||||
long long expected = 2;
|
||||
EXPECT_EQ(minimumCost(s), expected);
|
||||
}
|
||||
|
||||
// 测试用例 2
|
||||
TEST(MinimumCostTest, Test2)
|
||||
{
|
||||
char s[] = "010101";
|
||||
long long expected = 9;
|
||||
EXPECT_EQ(minimumCost(s), expected);
|
||||
}
|
||||
Reference in New Issue
Block a user