Newer
Older
zweic / tests / four / statement-set.zwei
@glproj03 glproj03 on 28 Dec 2005 411 bytes wicked cool test file added: script.sh
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