This commit is contained in:
2022-11-15 16:54:39 +08:00
parent f820cf2f8c
commit 9f4193858f
3 changed files with 67 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#include "s0029_divide_two_integers.hpp"
#include <gtest/gtest.h>
TEST(Problem29, Case1) {
int dividend{10};
int divisor{3};
int o{3};
Solution solution;
EXPECT_EQ(solution.divide(dividend, divisor), o);
}
TEST(Problem29, Case2) {
int dividend{7};
int divisor{-3};
int o{-2};
Solution solution;
EXPECT_EQ(solution.divide(dividend, divisor), o);
}