mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-04-11 03:00:13 -04:00
power operator + tests
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user