diff options
| author | Joshua Wise <joshua@joshuawise.com> | 2011-11-09 01:44:42 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-11-09 14:33:06 -0800 |
| commit | ae2ce0926704be87cdc64c5721a926ffef846154 (patch) | |
| tree | d61f2b5593727cd372d8e031911ecc136ff84b21 /src/test | |
| parent | c8fae5dc75b8a5d1538e3c17ae34d087546da1f5 (diff) | |
| download | rust-ae2ce0926704be87cdc64c5721a926ffef846154.tar.gz rust-ae2ce0926704be87cdc64c5721a926ffef846154.zip | |
Add test with implemented bits of issue #570.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/const-contents.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/run-pass/const-contents.rs b/src/test/run-pass/const-contents.rs new file mode 100644 index 00000000000..a8fd1378c9e --- /dev/null +++ b/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); +} |
