aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorRoy Frostig <[email protected]>2010-08-25 17:15:15 -0700
committerRoy Frostig <[email protected]>2010-08-25 17:17:14 -0700
commit6b053f24c71237586af7c23613356393149614a2 (patch)
tree0b934a33e0ef128ac3496b4e30e4e157c1ffafad /src/test
parentAdd element to closure to hold captured tydesc (not body tydesc). (diff)
downloadrust-6b053f24c71237586af7c23613356393149614a2.tar.xz
rust-6b053f24c71237586af7c23613356393149614a2.zip
Insure bools remain 0x1 or 0x0 by having boolean-NOT not just be a simple bit-NOT.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/bool-not.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/run-pass/bool-not.rs b/src/test/run-pass/bool-not.rs
new file mode 100644
index 00000000..ba70bdb1
--- /dev/null
+++ b/src/test/run-pass/bool-not.rs
@@ -0,0 +1,15 @@
+// -*- rust -*-
+
+fn main() {
+ if (!false) {
+ check (true);
+ } else {
+ check (false);
+ }
+
+ if (!true) {
+ check (false);
+ } else {
+ check (true);
+ }
+}