power operator + tests

This commit is contained in:
charliesome
2012-01-11 17:14:23 +11:00
parent 806df9bc1e
commit a4249fd573
4 changed files with 18 additions and 0 deletions

View File

@@ -269,3 +269,12 @@ test "Regression with implicit calls against an indented assignment", ->
1
eq a, 1
test "power operator", ->
eq 27, 3 ** 3
test "power operator has higher precedence than other maths operators", ->
eq 55, 1 + 3 ** 3 * 2
test "power operator is right associative", ->
eq 1, 1 ** 2 ** 3