Skip to content

Commit ae2ce09

Browse files
jwisebrson
authored andcommitted
Add test with implemented bits of issue #570.
1 parent c8fae5d commit ae2ce09

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/test/run-pass/const-contents.rs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Issue #570
2+
3+
const lsl : int = 1 << 2;
4+
const add : int = 1 + 2;
5+
const addf : float = 1.0f + 2.0f;
6+
const not : int = !0;
7+
const notb : bool = !true;
8+
const neg : int = -(1);
9+
10+
fn main() {
11+
assert(lsl == 4);
12+
assert(add == 3);
13+
assert(addf == 3.0f);
14+
assert(not == -1);
15+
assert(notb == false);
16+
assert(neg == -1);
17+
}

0 commit comments

Comments
 (0)