void Test_Realm::push_back() { Realm realm; realm.push_back(1); realm.push_back(2); QVERIFY(realm.contains(1)); QVERIFY(realm.contains(2)); QVERIFY(realm.dimension() == 1); try { realm.push_back(realm); } catch (std::invalid_argument e) { return; } QFAIL("Expected invalid_argument"); }
void Test_Realm::add() { Realm realm; realm.push_back(1); realm.addOffset(1); QVERIFY(realm.contains(2)); }
void Test_Realm::clear() { Realm realm; realm.push_back(1); realm.clear(); QVERIFY(realm.size() == 0); QVERIFY(realm.dimension() == 0); }