leetcode/tests/s0013_roman_to_integer.cpp
2022-11-30 18:20:36 +08:00

25 lines
425 B
C++

#include "s0013_roman_to_integer.hpp"
#include <gtest/gtest.h>
TEST(Problem13, Case1) {
string i("III");
int o{3};
S0013 solution;
EXPECT_EQ(solution.romanToInt(i), o);
}
TEST(Problem13, Case2) {
string i("LVIII");
int o{58};
S0013 solution;
EXPECT_EQ(solution.romanToInt(i), o);
}
TEST(Problem13, Case3) {
string i("MCMXCIV");
int o{1994};
S0013 solution;
EXPECT_EQ(solution.romanToInt(i), o);
}