Newer
Older
zweic / tests / 4 / statement-while.zwei
@ajaggi ajaggi on 26 Dec 2005 303 bytes Added some test cases
// While
class WhileTest {
    Null foo() {
        Int t = 0;
        Null n = null;
        while(n) {} // 1/2 failure of clause 1 (condition type not Int)
        while(t) { Int s = null; } // 2/2 failure of clause 2 (incorrectly typed statement)
        while(t) { Int s = 0; } // correct
    }
}

1