Example #1
0
void Test_Realm::add() {
    Realm realm;
    realm.push_back(1);

    realm.addOffset(1);

    QVERIFY(realm.contains(2));
}
Example #2
0
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");
}