20 lines
370 B
C++
20 lines
370 B
C++
|
#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);
|
||
|
}
|