Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Zekun Wang committed Jun 6, 2024
1 parent 230427a commit 35d8327
Show file tree
Hide file tree
Showing 54 changed files with 372 additions and 199 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fun m::g() {


Diagnostics:
warning: Unused assignment to r. Consider removing or prefixing with an underscore: `_r`
warning: Unused assignment to `r`. Consider removing or prefixing with an underscore: `_r`
┌─ tests/ability-transform/destroy_after_call.move:8:9
8 │ r = f(r);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,37 +295,37 @@ fun freeze_mut_ref::t8($t0: bool, $t1: &mut freeze_mut_ref::S, $t2: &freeze_mut_


Diagnostics:
warning: Unused assignment to x. Consider removing or prefixing with an underscore: `_x`
warning: Unused assignment to `x`. Consider removing or prefixing with an underscore: `_x`
┌─ tests/bytecode-generator/freeze_mut_ref.move:58:9
58 │ (x, y) = (&mut 0, &mut 0);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^

warning: Unused assignment to y. Consider removing or prefixing with an underscore: `_y`
warning: Unused assignment to `y`. Consider removing or prefixing with an underscore: `_y`
┌─ tests/bytecode-generator/freeze_mut_ref.move:58:9
58 │ (x, y) = (&mut 0, &mut 0);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^

warning: Unused assignment to x. Consider removing or prefixing with an underscore: `_x`
warning: Unused assignment to `x`. Consider removing or prefixing with an underscore: `_x`
┌─ tests/bytecode-generator/freeze_mut_ref.move:66:24
66 │ let g = &mut ({x = x + 1; s}).f;
│ ^^^^^^^^^

warning: Unused assignment to z. Consider removing or prefixing with an underscore: `_z`
warning: Unused assignment to `z`. Consider removing or prefixing with an underscore: `_z`
┌─ tests/bytecode-generator/freeze_mut_ref.move:69:20
69 │ *({*f = 0; z = y; g}) = 2;
│ ^^^^^

warning: Unused assignment to x. Consider removing or prefixing with an underscore: `_x`
warning: Unused assignment to `x`. Consider removing or prefixing with an underscore: `_x`
┌─ tests/bytecode-generator/freeze_mut_ref.move:74:19
74 │ if (cond) x = copy s else x = other;
│ ^^^^^^^^^^

warning: Unused assignment to x. Consider removing or prefixing with an underscore: `_x`
warning: Unused assignment to `x`. Consider removing or prefixing with an underscore: `_x`
┌─ tests/bytecode-generator/freeze_mut_ref.move:74:35
74 │ if (cond) x = copy s else x = other;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public fun m::test(): u8 {


Diagnostics:
warning: Unused assignment to q. Consider removing or prefixing with an underscore: `_q`
warning: Unused assignment to `q`. Consider removing or prefixing with an underscore: `_q`
┌─ tests/bytecode-generator/wildcard7.move:6:13
6 │ let (_, q) = (x, z);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fun m::test($t0: u64): u64 {


Diagnostics:
warning: Unused assignment to a. Consider removing or prefixing with an underscore: `_a`
warning: Unused assignment to `a`. Consider removing or prefixing with an underscore: `_a`
┌─ tests/copy-propagation/call_1.move:7:17
7 │ let a = p;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fun m::test($t0: u64): u64 {


Diagnostics:
warning: Unused assignment to a. Consider removing or prefixing with an underscore: `_a`
warning: Unused assignment to `a`. Consider removing or prefixing with an underscore: `_a`
┌─ tests/copy-propagation/immut_refs_2.move:4:17
4 │ let a = &p;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fun m::test($t0: u64): bool {


Diagnostics:
warning: Unused assignment to b. Consider removing or prefixing with an underscore: `_b`
warning: Unused assignment to `b`. Consider removing or prefixing with an underscore: `_b`
┌─ tests/copy-propagation/seq_kills_1.move:7:9
7 │ b = p + 1; // kill b := a, which removes the whole copy chain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fun m::test($t0: u64): bool {


Diagnostics:
warning: Unused assignment to a. Consider removing or prefixing with an underscore: `_a`
warning: Unused assignment to `a`. Consider removing or prefixing with an underscore: `_a`
┌─ tests/copy-propagation/seq_kills_2.move:7:9
7 │ a = p + 1; // kill b := a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fun m::copy_kill($t0: u64): u64 {


Diagnostics:
warning: Unused assignment to p. Consider removing or prefixing with an underscore: `_p`
warning: Unused assignment to `p`. Consider removing or prefixing with an underscore: `_p`
┌─ tests/copy-propagation/straight_line_kills.move:5:9
5 │ p = p + 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,67 +68,67 @@ warning: Unused local variable `s`. Consider removing or prefixing with an under


Diagnostics:
warning: Unused assignment to const_true. Consider removing or prefixing with an underscore: `_const_true`
warning: Unused assignment to `const_true`. Consider removing or prefixing with an underscore: `_const_true`
┌─ tests/file-format-generator/const.move:3:26
3 │ let const_true = u(true);
│ ^^^^^^^

warning: Unused assignment to const_false. Consider removing or prefixing with an underscore: `_const_false`
warning: Unused assignment to `const_false`. Consider removing or prefixing with an underscore: `_const_false`
┌─ tests/file-format-generator/const.move:4:27
4 │ let const_false = u(false);
│ ^^^^^^^^

warning: Unused assignment to hex_u8. Consider removing or prefixing with an underscore: `_hex_u8`
warning: Unused assignment to `hex_u8`. Consider removing or prefixing with an underscore: `_hex_u8`
┌─ tests/file-format-generator/const.move:5:26
5 │ let hex_u8: u8 = u(0x1);
│ ^^^^^^

warning: Unused assignment to hex_u16. Consider removing or prefixing with an underscore: `_hex_u16`
warning: Unused assignment to `hex_u16`. Consider removing or prefixing with an underscore: `_hex_u16`
┌─ tests/file-format-generator/const.move:6:28
6 │ let hex_u16: u16 = u(0x1BAE);
│ ^^^^^^^^^

warning: Unused assignment to hex_u32. Consider removing or prefixing with an underscore: `_hex_u32`
warning: Unused assignment to `hex_u32`. Consider removing or prefixing with an underscore: `_hex_u32`
┌─ tests/file-format-generator/const.move:7:28
7 │ let hex_u32: u32 = u(0xDEAD80);
│ ^^^^^^^^^^^

warning: Unused assignment to hex_u64. Consider removing or prefixing with an underscore: `_hex_u64`
warning: Unused assignment to `hex_u64`. Consider removing or prefixing with an underscore: `_hex_u64`
┌─ tests/file-format-generator/const.move:8:28
8 │ let hex_u64: u64 = u(0xCAFE);
│ ^^^^^^^^^

warning: Unused assignment to hex_u128. Consider removing or prefixing with an underscore: `_hex_u128`
warning: Unused assignment to `hex_u128`. Consider removing or prefixing with an underscore: `_hex_u128`
┌─ tests/file-format-generator/const.move:9:30
9 │ let hex_u128: u128 = u(0xDEADBEEF);
│ ^^^^^^^^^^^^^

warning: Unused assignment to hex_u256. Consider removing or prefixing with an underscore: `_hex_u256`
warning: Unused assignment to `hex_u256`. Consider removing or prefixing with an underscore: `_hex_u256`
┌─ tests/file-format-generator/const.move:10:30
10 │ let hex_u256: u256 = u(0x1123_456A_BCDE_F);
│ ^^^^^^^^^^^^^^^^^^^^^

warning: Unused assignment to a. Consider removing or prefixing with an underscore: `_a`
warning: Unused assignment to `a`. Consider removing or prefixing with an underscore: `_a`
┌─ tests/file-format-generator/const.move:11:17
11 │ let a = u(@0x42);
│ ^^^^^^^^

warning: Unused assignment to vec. Consider removing or prefixing with an underscore: `_vec`
warning: Unused assignment to `vec`. Consider removing or prefixing with an underscore: `_vec`
┌─ tests/file-format-generator/const.move:12:19
12 │ let vec = u(vector[1, 2, 3]);
│ ^^^^^^^^^^^^^^^^^^

warning: Unused assignment to s. Consider removing or prefixing with an underscore: `_s`
warning: Unused assignment to `s`. Consider removing or prefixing with an underscore: `_s`
┌─ tests/file-format-generator/const.move:13:17
13 │ let s = u(b"Hello!\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,67 +68,67 @@ warning: Unused local variable `s`. Consider removing or prefixing with an under


Diagnostics:
warning: Unused assignment to const_true. Consider removing or prefixing with an underscore: `_const_true`
warning: Unused assignment to `const_true`. Consider removing or prefixing with an underscore: `_const_true`
┌─ tests/file-format-generator/const.move:3:26
3 │ let const_true = u(true);
│ ^^^^^^^

warning: Unused assignment to const_false. Consider removing or prefixing with an underscore: `_const_false`
warning: Unused assignment to `const_false`. Consider removing or prefixing with an underscore: `_const_false`
┌─ tests/file-format-generator/const.move:4:27
4 │ let const_false = u(false);
│ ^^^^^^^^

warning: Unused assignment to hex_u8. Consider removing or prefixing with an underscore: `_hex_u8`
warning: Unused assignment to `hex_u8`. Consider removing or prefixing with an underscore: `_hex_u8`
┌─ tests/file-format-generator/const.move:5:26
5 │ let hex_u8: u8 = u(0x1);
│ ^^^^^^

warning: Unused assignment to hex_u16. Consider removing or prefixing with an underscore: `_hex_u16`
warning: Unused assignment to `hex_u16`. Consider removing or prefixing with an underscore: `_hex_u16`
┌─ tests/file-format-generator/const.move:6:28
6 │ let hex_u16: u16 = u(0x1BAE);
│ ^^^^^^^^^

warning: Unused assignment to hex_u32. Consider removing or prefixing with an underscore: `_hex_u32`
warning: Unused assignment to `hex_u32`. Consider removing or prefixing with an underscore: `_hex_u32`
┌─ tests/file-format-generator/const.move:7:28
7 │ let hex_u32: u32 = u(0xDEAD80);
│ ^^^^^^^^^^^

warning: Unused assignment to hex_u64. Consider removing or prefixing with an underscore: `_hex_u64`
warning: Unused assignment to `hex_u64`. Consider removing or prefixing with an underscore: `_hex_u64`
┌─ tests/file-format-generator/const.move:8:28
8 │ let hex_u64: u64 = u(0xCAFE);
│ ^^^^^^^^^

warning: Unused assignment to hex_u128. Consider removing or prefixing with an underscore: `_hex_u128`
warning: Unused assignment to `hex_u128`. Consider removing or prefixing with an underscore: `_hex_u128`
┌─ tests/file-format-generator/const.move:9:30
9 │ let hex_u128: u128 = u(0xDEADBEEF);
│ ^^^^^^^^^^^^^

warning: Unused assignment to hex_u256. Consider removing or prefixing with an underscore: `_hex_u256`
warning: Unused assignment to `hex_u256`. Consider removing or prefixing with an underscore: `_hex_u256`
┌─ tests/file-format-generator/const.move:10:30
10 │ let hex_u256: u256 = u(0x1123_456A_BCDE_F);
│ ^^^^^^^^^^^^^^^^^^^^^

warning: Unused assignment to a. Consider removing or prefixing with an underscore: `_a`
warning: Unused assignment to `a`. Consider removing or prefixing with an underscore: `_a`
┌─ tests/file-format-generator/const.move:11:17
11 │ let a = u(@0x42);
│ ^^^^^^^^

warning: Unused assignment to vec. Consider removing or prefixing with an underscore: `_vec`
warning: Unused assignment to `vec`. Consider removing or prefixing with an underscore: `_vec`
┌─ tests/file-format-generator/const.move:12:19
12 │ let vec = u(vector[1, 2, 3]);
│ ^^^^^^^^^^^^^^^^^^

warning: Unused assignment to s. Consider removing or prefixing with an underscore: `_s`
warning: Unused assignment to `s`. Consider removing or prefixing with an underscore: `_s`
┌─ tests/file-format-generator/const.move:13:17
13 │ let s = u(b"Hello!\n");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Diagnostics:
warning: Unused assignment to y. Consider removing or prefixing with an underscore: `_y`
warning: Unused assignment to `y`. Consider removing or prefixing with an underscore: `_y`
┌─ tests/reference-safety/write_ref_dest.move:16:9
16 │ (y, _) = (*&y, 1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Diagnostics:
warning: Unused assignment to y. Consider removing or prefixing with an underscore: `_y`
warning: Unused assignment to `y`. Consider removing or prefixing with an underscore: `_y`
┌─ tests/reference-safety/write_ref_dest.move:16:9
16 │ (y, _) = (*&y, 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ module 0x8675309::M {


Diagnostics:
warning: Unused assignment to f. Consider removing or prefixing with an underscore: `_f`
warning: Unused assignment to `f`. Consider removing or prefixing with an underscore: `_f`
┌─ tests/simplifier-elimination/bind_with_type_annot.move:7:20
7 │ let (x, b, R{f}): (u64, bool, R) = (0, false, R { f: 0 }); x; b; f;
│ ^^^^

warning: Unused assignment to b. Consider removing or prefixing with an underscore: `_b`
warning: Unused assignment to `b`. Consider removing or prefixing with an underscore: `_b`
┌─ tests/simplifier-elimination/bind_with_type_annot.move:7:13
7 │ let (x, b, R{f}): (u64, bool, R) = (0, false, R { f: 0 }); x; b; f;
│ ^^^^^^^^^^^^

warning: Unused assignment to x. Consider removing or prefixing with an underscore: `_x`
warning: Unused assignment to `x`. Consider removing or prefixing with an underscore: `_x`
┌─ tests/simplifier-elimination/bind_with_type_annot.move:7:13
7 │ let (x, b, R{f}): (u64, bool, R) = (0, false, R { f: 0 }); x; b; f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ error: use of unassigned local `x`


Diagnostics:
warning: Unused assignment to y. Consider removing or prefixing with an underscore: `_y`
warning: Unused assignment to `y`. Consider removing or prefixing with an underscore: `_y`
┌─ tests/simplifier-elimination/use_before_assign.move:4:13
4 │ let y = x;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ error: use of unassigned local `x`


Diagnostics:
warning: Unused assignment to x. Consider removing or prefixing with an underscore: `_x`
warning: Unused assignment to `x`. Consider removing or prefixing with an underscore: `_x`
┌─ tests/simplifier-elimination/use_before_assign_while.move:19:60
19 │ while (cond) { let y = &x; _ = move y; if (cond) { x = 0 }; break }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ module 0x8675::M {


Diagnostics:
warning: Unused assignment to q. Consider removing or prefixing with an underscore: `_q`
warning: Unused assignment to `q`. Consider removing or prefixing with an underscore: `_q`
┌─ tests/simplifier/random.move:48:17
48 │ let q = v;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ fun m::test($t0: bool, $t1: bool) {


Diagnostics:
warning: Unused assignment to i. Consider removing or prefixing with an underscore: `_i`
warning: Unused assignment to `i`. Consider removing or prefixing with an underscore: `_i`
┌─ tests/unreachable-code-remover/conditional_loop_unreachable.move:7:17
7 │ i = i + 1;
│ ^^^^^^^^^

warning: Unused assignment to i. Consider removing or prefixing with an underscore: `_i`
warning: Unused assignment to `i`. Consider removing or prefixing with an underscore: `_i`
┌─ tests/unreachable-code-remover/conditional_loop_unreachable.move:12:13
12 │ i = i + 1;
Expand Down
Loading

0 comments on commit 35d8327

Please sign in to comment.