18 lines
345 B
C++
18 lines
345 B
C++
#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);
|
|
}
|