int main() { Console c; Scheduler s; s.add(&c); s(); }
// Tests member api add TEST(Scheduler, add) { Scheduler sc; bool ret = sc.add(0, 4083339999); EXPECT_TRUE(ret); cout << sc << endl; ret = sc.add(0, 4083329999); EXPECT_TRUE(ret); cout << sc << endl; ret = sc.add(1, 4083349999); EXPECT_TRUE(ret); cout << sc << endl; ret = sc.add(1, 4083359999); EXPECT_TRUE(ret); cout << sc << endl; ret = sc.add(0, 4083350000); EXPECT_TRUE(ret); cout << sc << endl; ret = sc.add(2, 4083360000); EXPECT_TRUE(ret); cout << sc << endl; ret = sc.add(2, 4083369999); EXPECT_TRUE(ret); cout << sc << endl; // <TechnicalDetails> // // EXPECT_EQ(expected, actual) is the same as // // EXPECT_TRUE((expected) == (actual)) // <TechnicalDetails> // // EXPECT_EQ(expected, actual) is the same as // // EXPECT_TRUE((expected) == (actual)) // // except that it will print both the expected value and the actual // value when the assertion fails. This is very helpful for // debugging. Therefore in this case EXPECT_EQ is preferred. // // On the other hand, EXPECT_TRUE accepts any Boolean expression, // and is thus more general. // // </TechnicalDetails> }