-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a lambda transactional-test, clean up test driver a bit to improv…
…e coverage of existing tests (#15463) * add a lambda transactional-test. while modifying test config, add a baseline test config to ensure we are running baseline for all tests.
- Loading branch information
1 parent
ac9302a
commit 9a6cc6f
Showing
38 changed files
with
2,264 additions
and
33 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
third_party/move/move-compiler-v2/tests/lambda/inline-parity/subtype_args_ok.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
Diagnostics: | ||
error: unexpected token | ||
┌─ tests/lambda/inline-parity/subtype_args_ok.move:23:37 | ||
│ | ||
23 │ fun t2(f: |&u64, &mut u64| with copy) { | ||
│ - ^ Expected ')' | ||
│ │ | ||
│ To match this '(' |
9 changes: 9 additions & 0 deletions
9
third_party/move/move-compiler-v2/tests/lambda/inline-parity/subtype_args_ok.lambda.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
Diagnostics: | ||
error: unexpected token | ||
┌─ tests/lambda/inline-parity/subtype_args_ok.move:23:37 | ||
│ | ||
23 │ fun t2(f: |&u64, &mut u64| with copy) { | ||
│ - ^ Expected ')' | ||
│ │ | ||
│ To match this '(' |
27 changes: 27 additions & 0 deletions
27
third_party/move/move-compiler-v2/tests/lambda/inline-parity/subtype_args_ok.move
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module 0x8675309::M { | ||
struct S has drop {} | ||
|
||
fun imm<T>(_x: &T) {} | ||
fun imm_mut<T>(_x: &T, _y: &mut T) {} | ||
fun mut_imm<T>(_x: &mut T, _y: &T) {} | ||
fun imm_imm<T>(_x: &T, _y: &T) {} | ||
|
||
fun t0() { | ||
imm(&mut 0); | ||
imm(&0); | ||
|
||
imm(&mut S{}); | ||
imm(&S{}); | ||
} | ||
|
||
fun t1() { | ||
imm_mut(&mut 0, &mut 0); | ||
mut_imm(&mut 0, &mut 0); | ||
imm_imm(&mut 0, &mut 0); | ||
} | ||
|
||
fun t2(f: |&u64, &mut u64| with copy) { | ||
f(&mut 0, &mut 0); | ||
f(&0, &mut 0); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
third_party/move/move-compiler-v2/tests/lambda/storable/generic_func.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
Diagnostics: | ||
error: unsupported language construct | ||
┌─ tests/lambda/storable/generic_func.move:36:18 | ||
│ | ||
36 │ let f1 = move |addr| 0x42::mod2::item_exists<MyStruct1>(addr) with store+copy; | ||
│ ^^^^ Move 2.2 language construct is not enabled: Modifier on lambda expression | ||
|
||
error: unsupported language construct | ||
┌─ tests/lambda/storable/generic_func.move:36:71 | ||
│ | ||
36 │ let f1 = move |addr| 0x42::mod2::item_exists<MyStruct1>(addr) with store+copy; | ||
│ ^^^^^^^^^^^^^^^ Move 2.2 language construct is not enabled: Abilities on function expressions | ||
|
||
error: unsupported language construct | ||
┌─ tests/lambda/storable/generic_func.move:37:18 | ||
│ | ||
37 │ let f2 = move |addr| 0x42::mod2::item_exists<MyStruct2>(addr) with store+copy; | ||
│ ^^^^ Move 2.2 language construct is not enabled: Modifier on lambda expression | ||
|
||
error: unsupported language construct | ||
┌─ tests/lambda/storable/generic_func.move:37:71 | ||
│ | ||
37 │ let f2 = move |addr| 0x42::mod2::item_exists<MyStruct2>(addr) with store+copy; | ||
│ ^^^^^^^^^^^^^^^ Move 2.2 language construct is not enabled: Abilities on function expressions | ||
|
||
error: unsupported language construct | ||
┌─ tests/lambda/storable/generic_func.move:53:55 | ||
│ | ||
53 │ assert!(0x42::mod2::item_exists<|address|bool with store+copy>(addr)); | ||
│ ^^^^^^^^^^^^^^^ Move 2.2 language construct is not enabled: Ability constraints on function types | ||
|
||
error: unsupported language construct | ||
┌─ tests/lambda/storable/generic_func.move:55:58 | ||
│ | ||
55 │ let found_f = 0x42::mod2::get_item<|address|bool with store+copy>(addr); | ||
│ ^^^^^^^^^^^^^^^ Move 2.2 language construct is not enabled: Ability constraints on function types |
Oops, something went wrong.