Newer
Older
zweic / tests / 4 / statement-set.zwei
@ajaggi ajaggi on 26 Dec 2005 411 bytes Added some test cases
class foo {}
class bar extends foo {}
class baz {}

// Set
class SetTest {
    Null foo() {
        Int n = 1;
        bar b = new bar();
        s = 2; // 1/3 failure of clause 1 (nonexistent variable)
        n = new foo(); // 2/3 failure of clauses 2 and 3 (subtype mismatch)
        b = new foo(); // 3/3 failure of clauses 2 and 3 (inverted sub- and supertypes)
        b = new bar(); // success
    }
}

1