Skip to content

Commit 22e9e52

Browse files
committed
Make tests unit.
1 parent d9ee0f4 commit 22e9e52

16 files changed

+22
-17
lines changed

src/test/mir-opt/const_allocation.main.ConstProp.after.32bit.mir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ fn main() -> () {
1010
StorageLive(_2); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
1111
_2 = const {alloc1: &&[(Option<i32>, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
1212
// mir::Constant
13-
// + span: $DIR/const_allocation.rs:8:5: 8:8
13+
// + span: $DIR/const_allocation.rs:9:5: 9:8
1414
// + literal: Const { ty: &&[(Option<i32>, &[&str])], val: Value(Scalar(alloc1)) }
1515
_1 = (*_2); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
1616
StorageDead(_2); // scope 0 at $DIR/const_allocation.rs:+1:8: +1:9
1717
StorageDead(_1); // scope 0 at $DIR/const_allocation.rs:+1:8: +1:9
18-
nop; // scope 0 at $DIR/const_allocation.rs:+0:11: +2:2
18+
_0 = const (); // scope 0 at $DIR/const_allocation.rs:+0:11: +2:2
1919
return; // scope 0 at $DIR/const_allocation.rs:+2:2: +2:2
2020
}
2121
}

src/test/mir-opt/const_allocation.main.ConstProp.after.64bit.mir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ fn main() -> () {
1010
StorageLive(_2); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
1111
_2 = const {alloc1: &&[(Option<i32>, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
1212
// mir::Constant
13-
// + span: $DIR/const_allocation.rs:8:5: 8:8
13+
// + span: $DIR/const_allocation.rs:9:5: 9:8
1414
// + literal: Const { ty: &&[(Option<i32>, &[&str])], val: Value(Scalar(alloc1)) }
1515
_1 = (*_2); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
1616
StorageDead(_2); // scope 0 at $DIR/const_allocation.rs:+1:8: +1:9
1717
StorageDead(_1); // scope 0 at $DIR/const_allocation.rs:+1:8: +1:9
18-
nop; // scope 0 at $DIR/const_allocation.rs:+0:11: +2:2
18+
_0 = const (); // scope 0 at $DIR/const_allocation.rs:+0:11: +2:2
1919
return; // scope 0 at $DIR/const_allocation.rs:+2:2: +2:2
2020
}
2121
}

src/test/mir-opt/const_allocation.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// unit-test: ConstProp
12
// ignore-endian-big
23
// EMIT_MIR_FOR_EACH_BIT_WIDTH
34
static FOO: &[(Option<i32>, &[&str])] =

src/test/mir-opt/const_allocation2.main.ConstProp.after.32bit.mir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ fn main() -> () {
1010
StorageLive(_2); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
1111
_2 = const {alloc1: &&[(Option<i32>, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
1212
// mir::Constant
13-
// + span: $DIR/const_allocation2.rs:5:5: 5:8
13+
// + span: $DIR/const_allocation2.rs:6:5: 6:8
1414
// + literal: Const { ty: &&[(Option<i32>, &[&u8])], val: Value(Scalar(alloc1)) }
1515
_1 = (*_2); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
1616
StorageDead(_2); // scope 0 at $DIR/const_allocation2.rs:+1:8: +1:9
1717
StorageDead(_1); // scope 0 at $DIR/const_allocation2.rs:+1:8: +1:9
18-
nop; // scope 0 at $DIR/const_allocation2.rs:+0:11: +2:2
18+
_0 = const (); // scope 0 at $DIR/const_allocation2.rs:+0:11: +2:2
1919
return; // scope 0 at $DIR/const_allocation2.rs:+2:2: +2:2
2020
}
2121
}

src/test/mir-opt/const_allocation2.main.ConstProp.after.64bit.mir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ fn main() -> () {
1010
StorageLive(_2); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
1111
_2 = const {alloc1: &&[(Option<i32>, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
1212
// mir::Constant
13-
// + span: $DIR/const_allocation2.rs:5:5: 5:8
13+
// + span: $DIR/const_allocation2.rs:6:5: 6:8
1414
// + literal: Const { ty: &&[(Option<i32>, &[&u8])], val: Value(Scalar(alloc1)) }
1515
_1 = (*_2); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
1616
StorageDead(_2); // scope 0 at $DIR/const_allocation2.rs:+1:8: +1:9
1717
StorageDead(_1); // scope 0 at $DIR/const_allocation2.rs:+1:8: +1:9
18-
nop; // scope 0 at $DIR/const_allocation2.rs:+0:11: +2:2
18+
_0 = const (); // scope 0 at $DIR/const_allocation2.rs:+0:11: +2:2
1919
return; // scope 0 at $DIR/const_allocation2.rs:+2:2: +2:2
2020
}
2121
}

src/test/mir-opt/const_allocation2.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// unit-test: ConstProp
12
// ignore-endian-big
23
// EMIT_MIR_FOR_EACH_BIT_WIDTH
34
// EMIT_MIR const_allocation2.main.ConstProp.after.mir

src/test/mir-opt/const_allocation3.main.ConstProp.after.32bit.mir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ fn main() -> () {
1010
StorageLive(_2); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
1111
_2 = const {alloc1: &&Packed}; // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
1212
// mir::Constant
13-
// + span: $DIR/const_allocation3.rs:5:5: 5:8
13+
// + span: $DIR/const_allocation3.rs:6:5: 6:8
1414
// + literal: Const { ty: &&Packed, val: Value(Scalar(alloc1)) }
1515
_1 = (*_2); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
1616
StorageDead(_2); // scope 0 at $DIR/const_allocation3.rs:+1:8: +1:9
1717
StorageDead(_1); // scope 0 at $DIR/const_allocation3.rs:+1:8: +1:9
18-
nop; // scope 0 at $DIR/const_allocation3.rs:+0:11: +2:2
18+
_0 = const (); // scope 0 at $DIR/const_allocation3.rs:+0:11: +2:2
1919
return; // scope 0 at $DIR/const_allocation3.rs:+2:2: +2:2
2020
}
2121
}

src/test/mir-opt/const_allocation3.main.ConstProp.after.64bit.mir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ fn main() -> () {
1010
StorageLive(_2); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
1111
_2 = const {alloc1: &&Packed}; // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
1212
// mir::Constant
13-
// + span: $DIR/const_allocation3.rs:5:5: 5:8
13+
// + span: $DIR/const_allocation3.rs:6:5: 6:8
1414
// + literal: Const { ty: &&Packed, val: Value(Scalar(alloc1)) }
1515
_1 = (*_2); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
1616
StorageDead(_2); // scope 0 at $DIR/const_allocation3.rs:+1:8: +1:9
1717
StorageDead(_1); // scope 0 at $DIR/const_allocation3.rs:+1:8: +1:9
18-
nop; // scope 0 at $DIR/const_allocation3.rs:+0:11: +2:2
18+
_0 = const (); // scope 0 at $DIR/const_allocation3.rs:+0:11: +2:2
1919
return; // scope 0 at $DIR/const_allocation3.rs:+2:2: +2:2
2020
}
2121
}

src/test/mir-opt/const_allocation3.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// unit-test: ConstProp
12
// ignore-endian-big
23
// EMIT_MIR_FOR_EACH_BIT_WIDTH
34
// EMIT_MIR const_allocation3.main.ConstProp.after.mir

src/test/mir-opt/const_prop/ref_deref.main.ConstProp.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
StorageLive(_2); // scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
1414
_4 = const _; // scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
1515
// mir::Constant
16-
// + span: $DIR/ref_deref.rs:5:6: 5:10
16+
// + span: $DIR/ref_deref.rs:6:6: 6:10
1717
// + literal: Const { ty: &i32, val: Unevaluated(main, [], Some(promoted[0])) }
1818
_2 = _4; // scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
1919
- _1 = (*_2); // scope 0 at $DIR/ref_deref.rs:+1:5: +1:10

0 commit comments

Comments
 (0)