aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/u8-incr-decr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/run-pass/u8-incr-decr.rs')
-rw-r--r--src/test/run-pass/u8-incr-decr.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/run-pass/u8-incr-decr.rs b/src/test/run-pass/u8-incr-decr.rs
new file mode 100644
index 00000000..e8c29d4f
--- /dev/null
+++ b/src/test/run-pass/u8-incr-decr.rs
@@ -0,0 +1,12 @@
+// -*- rust -*-
+
+// These constants were chosen because they aren't used anywhere
+// in the rest of the generated code so they're easily grep-able.
+
+fn main() {
+ let u8 x = u8(19); // 0x13
+ let u8 y = u8(35); // 0x23
+ x = x + u8(7); // 0x7
+ y = y - u8(9); // 0x9
+ check(x == y);
+}