2022-11-02 14:20:09 +00:00
|
|
|
#include "s0009_palindrome_number.hpp"
|
|
|
|
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
|
|
|
TEST(Problem9, Case1) {
|
|
|
|
int i{121};
|
|
|
|
bool o{true};
|
2022-11-30 10:20:36 +00:00
|
|
|
S0009 solution;
|
2022-11-02 14:20:09 +00:00
|
|
|
EXPECT_EQ(solution.isPalindrome(i), o);
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(Problem9, Case2) {
|
|
|
|
int i{-121};
|
|
|
|
bool o{false};
|
2022-11-30 10:20:36 +00:00
|
|
|
S0009 solution;
|
2022-11-02 14:20:09 +00:00
|
|
|
EXPECT_EQ(solution.isPalindrome(i), o);
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(Problem9, Case3) {
|
|
|
|
int i{10};
|
|
|
|
bool o{false};
|
2022-11-30 10:20:36 +00:00
|
|
|
S0009 solution;
|
2022-11-02 14:20:09 +00:00
|
|
|
EXPECT_EQ(solution.isPalindrome(i), o);
|
|
|
|
}
|