This commit is contained in:
2025-03-27 11:56:11 +08:00
parent 572479248d
commit c69a6b5ca9
3 changed files with 52 additions and 0 deletions

19
tests/test_2712.cpp Normal file
View 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);
}