forked from Mirror/wren
Mainly to get rid of one top level directory. But this will also be useful when there are tests of the embedding API.
24 lines
621 B
Plaintext
24 lines
621 B
Plaintext
// << have higher precedence than |.
|
|
IO.print(2 | 1 << 1) // expect: 2
|
|
IO.print(1 << 1 | 2) // expect: 2
|
|
|
|
// << has higher precedence than &.
|
|
IO.print(2 & 1 << 1) // expect: 2
|
|
IO.print(1 << 1 & 2) // expect: 2
|
|
|
|
// << has higher precedence than ^.
|
|
IO.print(2 ^ 1 << 1) // expect: 0
|
|
IO.print(1 << 1 ^ 2) // expect: 0
|
|
|
|
// & has higher precedence than |.
|
|
IO.print(1 & 1 | 2) // expect: 3
|
|
IO.print(2 | 1 & 1) // expect: 3
|
|
|
|
// & has higher precedence than ^.
|
|
IO.print(1 & 1 ^ 2) // expect: 3
|
|
IO.print(2 ^ 1 & 1) // expect: 3
|
|
|
|
// ^ has higher precedence than |.
|
|
IO.print(1 ^ 1 | 1) // expect: 1
|
|
IO.print(1 | 1 ^ 1) // expect: 1
|