2022-11-22 10:06:14 +00:00
|
|
|
#include "s0038_count_and_say.hpp"
|
|
|
|
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
|
|
|
TEST(Problem38, Case1) {
|
|
|
|
int i{1};
|
|
|
|
string o{"1"};
|
2022-11-30 10:20:36 +00:00
|
|
|
S0038 solution;
|
2022-11-22 10:06:14 +00:00
|
|
|
EXPECT_EQ(solution.countAndSay(i), o);
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(Problem38, Case2) {
|
|
|
|
int i{4};
|
|
|
|
string o{"1211"};
|
2022-11-30 10:20:36 +00:00
|
|
|
S0038 solution;
|
2022-11-22 10:06:14 +00:00
|
|
|
EXPECT_EQ(solution.countAndSay(i), o);
|
|
|
|
}
|