Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
tests for #2885
Browse files Browse the repository at this point in the history
  • Loading branch information
chochos committed Nov 15, 2014
1 parent 5358d26 commit 36dec98
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions compiler-js/src/test/ceylon/misc/expressions.ceylon
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,11 @@ Boolean testSwitchExpression(Anything x) =>
case (is Integer) x==1
case (is Null) false
else x is String;

void testLetExpressions() {
value x=2;
value y=3;
check(let (dist = x^2+y^2) [x+dist,y+dist] == [15,16], "Let expr 1");
//check((let (e="K"->1, k=e.key, v=e.item) [v,k]) == [1,"K"], "Let expr 1");
//check((let (e="K"->1, k=e.key, v=k.lowercased) k->v) == "K"->"k", "Let expr 2");
}
1 change: 1 addition & 0 deletions compiler-js/src/test/ceylon/misc/testit.ceylon
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ shared void test() {
check(testSwitchExpression(1), "Switch expression 1");
check(testSwitchExpression("X"), "Switch expression 2");
check(!testSwitchExpression(null), "Switch expression 3");
testLetExpressions();//454
results();
}

0 comments on commit 36dec98

Please sign in to comment.