Skip to content

Commit

Permalink
Added a failing test for the let + fields bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Wrigstad (Spotify) committed Jul 18, 2014
1 parent ca56077 commit 8f23be9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/tests/encore/basic/let-fields.enc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
class Main
value : int
def main() : void {
this.value = 1024;
let x = this.value in {
x = x + 1;
if x == 1024 then
print "Failue when reading x -- expected 1024, got something else"
else
print "Test 1 OK";
if x == this.value then
print "Failue when comparing x and this.value -- they are the same but should not be"
else
print "Test 2 OK";
}
}
2 changes: 2 additions & 0 deletions src/tests/encore/basic/let-fields.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Test 1 OK
Test 2 OK

0 comments on commit 8f23be9

Please sign in to comment.