2022-11-03 08:09:44 +00:00
|
|
|
#include "s0013_roman_to_integer.hpp"
|
|
|
|
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
|
|
|
TEST(Problem13, Case1) {
|
|
|
|
string i("III");
|
|
|
|
int o{3};
|
2022-11-30 10:20:36 +00:00
|
|
|
S0013 solution;
|
2022-11-03 08:09:44 +00:00
|
|
|
EXPECT_EQ(solution.romanToInt(i), o);
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(Problem13, Case2) {
|
|
|
|
string i("LVIII");
|
|
|
|
int o{58};
|
2022-11-30 10:20:36 +00:00
|
|
|
S0013 solution;
|
2022-11-03 08:09:44 +00:00
|
|
|
EXPECT_EQ(solution.romanToInt(i), o);
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(Problem13, Case3) {
|
|
|
|
string i("MCMXCIV");
|
|
|
|
int o{1994};
|
2022-11-30 10:20:36 +00:00
|
|
|
S0013 solution;
|
2022-11-03 08:09:44 +00:00
|
|
|
EXPECT_EQ(solution.romanToInt(i), o);
|
|
|
|
}
|