leetcode/tests/s0012_integer_to_roman.cpp

25 lines
425 B
C++
Raw Normal View History

2022-11-03 07:44:17 +00:00
#include "s0012_integer_to_roman.hpp"
#include <gtest/gtest.h>
TEST(Problem12, Case1) {
int i{3};
string o("III");
2022-11-30 10:20:36 +00:00
S0012 solution;
2022-11-03 07:44:17 +00:00
EXPECT_EQ(solution.intToRoman(i), o);
}
TEST(Problem12, Case2) {
int i{58};
string o("LVIII");
2022-11-30 10:20:36 +00:00
S0012 solution;
2022-11-03 07:44:17 +00:00
EXPECT_EQ(solution.intToRoman(i), o);
}
TEST(Problem12, Case3) {
int i{1994};
string o("MCMXCIV");
2022-11-30 10:20:36 +00:00
S0012 solution;
2022-11-03 07:44:17 +00:00
EXPECT_EQ(solution.intToRoman(i), o);
}