Skip to content

Commit

Permalink
Add test with implemented bits of issue #570.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwise authored and brson committed Nov 9, 2011
1 parent c8fae5d commit ae2ce09
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/test/run-pass/const-contents.rs
@@ -0,0 +1,17 @@
// Issue #570

const lsl : int = 1 << 2;
const add : int = 1 + 2;
const addf : float = 1.0f + 2.0f;
const not : int = !0;
const notb : bool = !true;
const neg : int = -(1);

fn main() {
assert(lsl == 4);
assert(add == 3);
assert(addf == 3.0f);
assert(not == -1);
assert(notb == false);
assert(neg == -1);
}

0 comments on commit ae2ce09

Please sign in to comment.