3 #include "gtest/gtest-spi.h"
4 #include "gtest/gtest.h"
9 TEST(_GTestCbmLink, CheckDefaultConstructor) {
12 SCOPED_TRACE(
"CheckDefaultConstructor");
17 TEST(_GTestCbmLink, CheckStandardConstructor1) {
20 SCOPED_TRACE(
"CheckStandardConstructor1");
25 TEST(_GTestCbmLink, CheckStandardConstructor2) {
28 SCOPED_TRACE(
"CheckStandardConstructor2");
33 TEST(_GTestCbmLink, TestSettersAndGetters) {
36 SCOPED_TRACE(
"TestSettersAndGetters: Initial test");
42 SCOPED_TRACE(
"TestSettersAndGetters: Test SetFile");
48 SCOPED_TRACE(
"TestSettersAndGetters: Test SetEntry");
54 SCOPED_TRACE(
"TestSettersAndGetters: Test SetIndex");
60 SCOPED_TRACE(
"TestSettersAndGetters: Test SetWeight");
66 SCOPED_TRACE(
"TestSettersAndGetters: Test AddWeight");
73 EXPECT_STREQ(
"CbmLink: weight=-2 index=-2 entry=-2 file=-2\n",
74 test.ToString().c_str());
78 TEST(_GTestCbmLink, CompareEqual) {
80 CbmLink test1 {-2., -2, -2, -2};
81 CbmLink test2 {-1., -2, -2, -2};
82 CbmLink test3 {-2., -1, -2, -2};
83 CbmLink test4 {-2., -2, -1, -2};
84 CbmLink test5 {-2., -2, -2, -1};
86 EXPECT_TRUE(test == test1);
90 EXPECT_FALSE(test == test3);
91 EXPECT_FALSE(test == test4);
92 EXPECT_FALSE(test == test5);
95 TEST(_GTestCbmLink, CompareGreater) {
102 EXPECT_FALSE(test > test1);
103 EXPECT_TRUE(test > test2);
104 EXPECT_FALSE(test2 > test);
105 EXPECT_TRUE(test > test3);
106 EXPECT_FALSE(test3 > test);
107 EXPECT_TRUE(test > test4);
108 EXPECT_FALSE(test4 > test);
111 TEST(_GTestCbmLink, CompareSmaller) {
118 EXPECT_FALSE(test < test1);
119 EXPECT_FALSE(test < test2);
120 EXPECT_TRUE(test2 < test);
121 EXPECT_FALSE(test < test3);
122 EXPECT_TRUE(test3 < test);
123 EXPECT_FALSE(test < test4);
124 EXPECT_TRUE(test4 < test);