s0135
All checks were successful
ci/woodpecker/push/test Pipeline was successful

This commit is contained in:
2023-02-07 12:36:51 +08:00
parent fa934cf225
commit f4912703f9
3 changed files with 49 additions and 0 deletions

17
tests/s0135_candy.cpp Normal file
View File

@@ -0,0 +1,17 @@
#include "s0135_candy.hpp"
#include <gtest/gtest.h>
TEST(Problem135, Case1) {
vector<int> ratings{1, 0, 2};
int expected{5};
S0135 solution;
EXPECT_EQ(solution.candy(ratings), expected);
}
TEST(Problem135, Case2) {
vector<int> ratings{1, 2, 2};
int expected{4};
S0135 solution;
EXPECT_EQ(solution.candy(ratings), expected);
}