2022-11-15 08:54:39 +00:00
|
|
|
#include "s0029_divide_two_integers.hpp"
|
|
|
|
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
|
|
|
TEST(Problem29, Case1) {
|
|
|
|
int dividend{10};
|
|
|
|
int divisor{3};
|
|
|
|
int o{3};
|
2022-11-30 10:20:36 +00:00
|
|
|
S0029 solution;
|
2022-11-15 08:54:39 +00:00
|
|
|
EXPECT_EQ(solution.divide(dividend, divisor), o);
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(Problem29, Case2) {
|
|
|
|
int dividend{7};
|
|
|
|
int divisor{-3};
|
|
|
|
int o{-2};
|
2022-11-30 10:20:36 +00:00
|
|
|
S0029 solution;
|
2022-11-15 08:54:39 +00:00
|
|
|
EXPECT_EQ(solution.divide(dividend, divisor), o);
|
|
|
|
}
|