@@ -25,6 +25,8 @@ def test_move_publish(run_helper: RunHelper, test_name=None):
2525 "move" ,
2626 "publish" ,
2727 "--assume-yes" ,
28+ "--language-version" ,
29+ "2.4" ,
2830 "--package-dir" ,
2931 package_dir ,
3032 "--named-addresses" ,
@@ -73,6 +75,8 @@ def test_move_compile(run_helper: RunHelper, test_name=None):
7375 "aptos" ,
7476 "move" ,
7577 "compile" ,
78+ "--language-version" ,
79+ "2.4" ,
7680 "--package-dir" ,
7781 package_dir ,
7882 "--named-addresses" ,
@@ -140,6 +144,8 @@ def test_move_compile_script(run_helper: RunHelper, test_name=None):
140144 "aptos" ,
141145 "move" ,
142146 "compile-script" ,
147+ "--language-version" ,
148+ "2.4" ,
143149 "--package-dir" ,
144150 package_dir ,
145151 "--named-addresses" ,
@@ -404,7 +410,7 @@ def test_struct_argument_nested(run_helper: RunHelper, test_name=None):
404410@test_case
405411def test_option_variant_format (run_helper : RunHelper , test_name = None ):
406412 """
407- Test Option<T> with variant format: {"variant ": "Some", "fields": [...] }
413+ Test Option<T> with new enum format: {"Some ": {"0": "value"}} or {"None": {} }
408414 """
409415 import tempfile
410416 import os
@@ -419,8 +425,7 @@ def test_option_variant_format(run_helper: RunHelper, test_name=None):
419425 {
420426 "type" : "0x1::option::Option<u64>" ,
421427 "value" : {
422- "variant" : "Some" ,
423- "fields" : ["100" ]
428+ "Some" : {"0" : "100" }
424429 }
425430 }
426431 ]
@@ -442,7 +447,7 @@ def test_option_variant_format(run_helper: RunHelper, test_name=None):
442447
443448 if '"success": true' not in response .stdout :
444449 raise TestError (
445- "Transaction with Option::Some (variant format) failed"
450+ "Transaction with Option::Some (enum format) failed"
446451 )
447452 finally :
448453 os .unlink (json_path_some )
@@ -457,8 +462,7 @@ def test_option_variant_format(run_helper: RunHelper, test_name=None):
457462 {
458463 "type" : "0x1::option::Option<u64>" ,
459464 "value" : {
460- "variant" : "None" ,
461- "fields" : []
465+ "None" : {}
462466 }
463467 }
464468 ]
@@ -480,7 +484,7 @@ def test_option_variant_format(run_helper: RunHelper, test_name=None):
480484
481485 if '"success": true' not in response .stdout :
482486 raise TestError (
483- "Transaction with Option::None (variant format) failed"
487+ "Transaction with Option::None (enum format) failed"
484488 )
485489 finally :
486490 os .unlink (json_path_none )
@@ -582,13 +586,12 @@ def test_option_with_struct(run_helper: RunHelper, test_name=None):
582586 "::cli_e2e_tests::Point>"
583587 ),
584588 "value" : {
585- "variant" : "Some" ,
586- "fields" : [
587- {
589+ "Some" : {
590+ "0" : {
588591 "x" : "50" ,
589592 "y" : "75"
590593 }
591- ]
594+ }
592595 }
593596 }
594597 ]
0 commit comments