-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.cpp
72 lines (57 loc) · 2.08 KB
/
test.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//
// Created by kobi on 12/26/21.
//
#include "gtest/gtest.h"
#include "roman-to-integer.hpp"
TEST(roman_to_integer, empty) {
std::string input;
ASSERT_EQ(0, leetcode_roman_to_integer::get_number(input)) << " with input " << input;
}
TEST(roman_to_integer, one) {
std::string input("I");
ASSERT_EQ(1, leetcode_roman_to_integer::get_number(input)) << " with input " << input;
}
TEST(roman_to_integer, two) {
std::string input("II");
ASSERT_EQ(2, leetcode_roman_to_integer::get_number(input)) << " with input " << input;
}
TEST(roman_to_integer, three) {
std::string input("III");
ASSERT_EQ(3, leetcode_roman_to_integer::get_number(input)) << " with input " << input;
}
TEST(roman_to_integer, four) {
std::string input("IV");
ASSERT_EQ(4, leetcode_roman_to_integer::get_number(input)) << " with input " << input;
}
TEST(roman_to_integer, five) {
std::string input("V");
ASSERT_EQ(5, leetcode_roman_to_integer::get_number(input)) << " with input " << input;
}
TEST(roman_to_integer, six) {
std::string input("VI");
ASSERT_EQ(6, leetcode_roman_to_integer::get_number(input)) << " with input " << input;
}
TEST(roman_to_integer, seven) {
std::string input("VII");
ASSERT_EQ(7, leetcode_roman_to_integer::get_number(input)) << " with input " << input;
}
TEST(roman_to_integer, eight) {
std::string input("VIII");
ASSERT_EQ(8, leetcode_roman_to_integer::get_number(input)) << " with input " << input;
}
TEST(roman_to_integer, nine) {
std::string input("IX");
ASSERT_EQ(9, leetcode_roman_to_integer::get_number(input)) << " with input " << input;
}
TEST(roman_to_integer, ten) {
std::string input("X");
ASSERT_EQ(10, leetcode_roman_to_integer::get_number(input)) << " with input " << input;
}
TEST(roman_to_integer, fifteen) {
std::string input("XV");
ASSERT_EQ(15, leetcode_roman_to_integer::get_number(input)) << " with input " << input;
}
TEST(roman_to_integer, one_thousand_ninty_four) {
std::string input("MCMXCIV");
ASSERT_EQ(1994, leetcode_roman_to_integer::get_number(input)) << " with input " << input;
}