Skip to content

Commit 99ecb98

Browse files
uefi-macros: Move fail tests to new subdir
This is in preparation for adding pass tests.
1 parent 039d6a9 commit 99ecb98

19 files changed

+10
-10
lines changed

uefi-macros/tests/compilation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#[test]
22
fn ui() {
33
let t = trybuild::TestCases::new();
4-
t.compile_fail("tests/ui/*.rs");
4+
t.compile_fail("tests/ui/fail/*.rs");
55
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: Entry method must have no ABI modifier
2-
--> tests/ui/entry_bad_abi.rs:8:1
2+
--> tests/ui/fail/entry_bad_abi.rs:8:1
33
|
44
8 | extern "C" fn main(_handle: Handle, _st: SystemTable<Boot>) -> Status {
55
| ^^^^^^

uefi-macros/tests/ui/entry_bad_arg.stderr renamed to uefi-macros/tests/ui/fail/entry_bad_arg.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> tests/ui/entry_bad_arg.rs:8:1
2+
--> tests/ui/fail/entry_bad_arg.rs:8:1
33
|
44
8 | fn main(_handle: Handle, _st: SystemTable<Boot>, _x: usize) -> Status {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: Entry method should not be async
2-
--> tests/ui/entry_bad_async.rs:8:1
2+
--> tests/ui/fail/entry_bad_async.rs:8:1
33
|
44
8 | async fn main(_handle: Handle, _st: SystemTable<Boot>) -> Status {
55
| ^^^^^
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: Entry attribute accepts no arguments
2-
--> tests/ui/entry_bad_attr_arg.rs:7:9
2+
--> tests/ui/fail/entry_bad_attr_arg.rs:7:9
33
|
44
7 | #[entry(some_arg)]
55
| ^^^^^^^^
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: Entry method should not be const
2-
--> tests/ui/entry_bad_const.rs:8:1
2+
--> tests/ui/fail/entry_bad_const.rs:8:1
33
|
44
8 | const fn main(_handle: Handle, _st: SystemTable<Boot>) -> Status {
55
| ^^^^^
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: Entry method should not be generic
2-
--> tests/ui/entry_bad_generic.rs:8:9
2+
--> tests/ui/fail/entry_bad_generic.rs:8:9
33
|
44
8 | fn main<T>(_handle: Handle, _st: SystemTable<Boot>) -> Status {
55
| ^

uefi-macros/tests/ui/entry_bad_return_type.stderr renamed to uefi-macros/tests/ui/fail/entry_bad_return_type.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> tests/ui/entry_bad_return_type.rs:8:1
2+
--> tests/ui/fail/entry_bad_return_type.rs:8:1
33
|
44
8 | fn main(_handle: Handle, _st: SystemTable<Boot>) -> bool {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Status`, found `bool`
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: Entry method's arguments must be named
2-
--> tests/ui/entry_unnamed_image_arg.rs:8:22
2+
--> tests/ui/fail/entry_unnamed_image_arg.rs:8:22
33
|
44
8 | fn unnamed_image_arg(_: Handle, _st: SystemTable<Boot>) -> Status {
55
| ^
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: Entry method's arguments must be named
2-
--> tests/ui/entry_unnamed_table_arg.rs:8:38
2+
--> tests/ui/fail/entry_unnamed_table_arg.rs:8:38
33
|
44
8 | fn unnamed_table_arg(_image: Handle, _: SystemTable<Boot>) -> Status {
55
| ^

0 commit comments

Comments
 (0)