mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-01-14 16:35:03 +01:00
UI test error annotations!
This commit is contained in:
parent
5e7e99982d
commit
a0efca50e0
42 changed files with 437 additions and 694 deletions
|
|
@ -2,6 +2,7 @@ function a(_a: I32) =
|
|||
___asm(
|
||||
__locals(),
|
||||
0,
|
||||
//~^ ERROR: inline assembly instruction must be string literal with instruction
|
||||
);
|
||||
|
||||
function main() = ;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error: inline assembly instruction must be string literal with instruction
|
||||
--> $DIR/instr_not_string.nil:4
|
||||
--> ./ui-tests/asm/instr_not_string.nil:4
|
||||
4 | 0,
|
||||
^
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ function dropping(_a: I32) =
|
|||
___asm(
|
||||
__locals(),
|
||||
"meow meow",
|
||||
//~^ ERROR: unknown instruction: meow
|
||||
);
|
||||
|
||||
function main() = ;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error: unknown instruction: meow
|
||||
--> $DIR/invalid_instr.nil:4
|
||||
--> ./ui-tests/asm/invalid_instr.nil:4
|
||||
4 | "meow meow",
|
||||
^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
function dropping(_a: I32) =
|
||||
___asm(
|
||||
//~^ ERROR: inline assembly must have __locals() as first argument
|
||||
"local.get 0",
|
||||
"drop",
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error: inline assembly must have __locals() as first argument
|
||||
--> $DIR/missing_locals.nil:2
|
||||
--> ./ui-tests/asm/missing_locals.nil:2
|
||||
2 | ___asm(
|
||||
^
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
function dropping(_a: I32) = (
|
||||
1;
|
||||
___asm(__locals(), "drop");
|
||||
//~^ ERROR: `___asm` cannot be used as a value
|
||||
//~| ERROR: `__locals` cannot be used as a value
|
||||
);
|
||||
|
||||
function main() = ;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
error: `___asm` cannot be used as a value
|
||||
--> $DIR/not_toplevel.nil:3
|
||||
--> ./ui-tests/asm/not_toplevel.nil:3
|
||||
3 | ___asm(__locals(), "drop");
|
||||
^^^^^^
|
||||
error: `__locals` cannot be used as a value
|
||||
--> $DIR/not_toplevel.nil:3
|
||||
--> ./ui-tests/asm/not_toplevel.nil:3
|
||||
3 | ___asm(__locals(), "drop");
|
||||
^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ function a(_a: I32) =
|
|||
___asm(
|
||||
__locals(),
|
||||
"local.get 0 0",
|
||||
//~^ ERROR: mismatched immediate lengths, expected 1, got 2
|
||||
"drop",
|
||||
);
|
||||
|
||||
|
|
@ -9,6 +10,7 @@ function b(_a: I32) =
|
|||
___asm(
|
||||
__locals(),
|
||||
"local.get",
|
||||
//~^ ERROR: mismatched immediate lengths, expected 1, got 0
|
||||
"drop",
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
error: mismatched immediate lengths, expected 1, got 2
|
||||
--> $DIR/wrong_imm.nil:4
|
||||
--> ./ui-tests/asm/wrong_imm.nil:4
|
||||
4 | "local.get 0 0",
|
||||
^^^^^^^^^^^^^^^
|
||||
error: mismatched immediate lengths, expected 1, got 0
|
||||
--> $DIR/wrong_imm.nil:11
|
||||
11 | "local.get",
|
||||
--> ./ui-tests/asm/wrong_imm.nil:12
|
||||
12 | "local.get",
|
||||
^^^^^^^^^^^
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue