Scheduler
mathTest.cpp
Go to the documentation of this file.
1 
10 #include <utils/math.h>
11 #include <gtest/gtest.h>
12 
13 
14 
15 
16 TEST(mathTest, lcm)
17 {
18  EXPECT_EQ(0, Utils::lcm(std::vector<int>(1, 0)));
19  EXPECT_EQ(1, Utils::lcm(std::vector<int>(1, 1)));
20  std::vector<int> vect1{2, 2};
21  EXPECT_EQ(2, Utils::lcm(vect1));
22  std::vector<int> vect2{2, 3};
23  EXPECT_EQ(6, Utils::lcm(vect2));
24  std::vector<int> vect3{2, 3, 4, 5, 7};
25  EXPECT_EQ(420, Utils::lcm(vect3));
26 }
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
TEST(mathTest, lcm)
Definition: mathTest.cpp:16
int lcm(std::vector< int > array)
Definition: math.cpp:19