@@ -13,31 +13,13 @@ TEST(MathFunctions, is_even_scalar) {
1313 EXPECT_EQ (0 , stan::math::is_even (-3 ));
1414}
1515
16- TEST (MathFunctions, is_odd_scalar) {
17- EXPECT_EQ (0 , stan::math::is_odd (0 ));
18- EXPECT_EQ (1 , stan::math::is_odd (1 ));
19- EXPECT_EQ (0 , stan::math::is_odd (2 ));
20- EXPECT_EQ (1 , stan::math::is_odd (3 ));
21-
22- EXPECT_EQ (1 , stan::math::is_odd (-1 ));
23- EXPECT_EQ (0 , stan::math::is_odd (-2 ));
24- EXPECT_EQ (1 , stan::math::is_odd (-3 ));
25- }
26-
2716TEST (MathFunctions, is_even_vector) {
2817 std::vector<int > input{0 , 1 , 2 , 3 , -3 , -4 };
2918 std::vector<int > expected{1 , 0 , 1 , 0 , 0 , 1 };
3019
3120 EXPECT_EQ (expected, stan::math::is_even (input));
3221}
3322
34- TEST (MathFunctions, is_odd_vector) {
35- std::vector<int > input{0 , 1 , 2 , 3 , -3 , -4 };
36- std::vector<int > expected{0 , 1 , 0 , 1 , 1 , 0 };
37-
38- EXPECT_EQ (expected, stan::math::is_odd (input));
39- }
40-
4123TEST (MathFunctions, is_even_nested_vector) {
4224 std::vector<std::vector<int >> input{{1 , 2 }, {3 , 4 }};
4325
@@ -46,24 +28,9 @@ TEST(MathFunctions, is_even_nested_vector) {
4628 EXPECT_EQ (expected, stan::math::is_even (input));
4729}
4830
49- TEST (MathFunctions, is_odd_nested_vector) {
50- std::vector<std::vector<int >> input{{1 , 2 }, {3 , 4 }};
51-
52- std::vector<std::vector<int >> expected{{1 , 0 }, {1 , 0 }};
53-
54- EXPECT_EQ (expected, stan::math::is_odd (input));
55- }
56-
5731TEST (MathFunctions, is_even_empty_vector) {
5832 std::vector<int > input;
5933 std::vector<int > expected;
6034
6135 EXPECT_EQ (expected, stan::math::is_even (input));
6236}
63-
64- TEST (MathFunctions, is_odd_empty_vector) {
65- std::vector<int > input;
66- std::vector<int > expected;
67-
68- EXPECT_EQ (expected, stan::math::is_odd (input));
69- }
0 commit comments