Add more tests. Remove unecessary attributes.
This commit is contained in:
parent
cf49d6b080
commit
fbec376eed
1 changed files with 13 additions and 4 deletions
17
test/add.rs
17
test/add.rs
|
@ -1,9 +1,18 @@
|
||||||
#![feature(custom_attribute, rustc_attrs)]
|
#![feature(custom_attribute)]
|
||||||
#![allow(dead_code, unused_attributes)]
|
#![allow(dead_code, unused_attributes)]
|
||||||
|
|
||||||
#[rustc_mir]
|
#[miri_run(expected = "Int(1)")]
|
||||||
#[miri_run]
|
fn ret() -> i32 {
|
||||||
fn foo() -> i32 {
|
1
|
||||||
|
}
|
||||||
|
|
||||||
|
#[miri_run(expected = "Int(3)")]
|
||||||
|
fn add() -> i32 {
|
||||||
|
1 + 2
|
||||||
|
}
|
||||||
|
|
||||||
|
#[miri_run(expected = "Int(3)")]
|
||||||
|
fn indirect_add() -> i32 {
|
||||||
let x = 1;
|
let x = 1;
|
||||||
let y = 2;
|
let y = 2;
|
||||||
x + y
|
x + y
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue