]> git.lizzy.rs Git - rust.git/blobdiff - tests/run-pass/bools.rs
don't use `#[miri_run]` anymore, but execute the `main` function
[rust.git] / tests / run-pass / bools.rs
index 948c09c0fdaabc835755f6b38f0f3c447c1b8902..103d7eac27cde9971a0b8dd22ca5beee487db430 100644 (file)
@@ -1,24 +1,17 @@
-#![feature(custom_attribute)]
-#![allow(dead_code, unused_attributes)]
-
-#[miri_run]
 fn boolean() -> bool {
     true
 }
 
-#[miri_run]
 fn if_false() -> i64 {
     let c = false;
     if c { 1 } else { 0 }
 }
 
-#[miri_run]
 fn if_true() -> i64 {
     let c = true;
     if c { 1 } else { 0 }
 }
 
-#[miri_run]
 fn match_bool() -> i16 {
     let b = true;
     match b {
@@ -27,4 +20,9 @@ fn match_bool() -> i16 {
     }
 }
 
-fn main() {}
+fn main() {
+    assert!(boolean());
+    assert_eq!(if_false(), 0);
+    assert_eq!(if_true(), 1);
+    assert_eq!(match_bool(), 1);
+}