diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-02-06 17:53:58 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-02-06 18:15:41 +0800 |
commit | 33b27258e43eea4f65b17cefd6523ecbf515778f (patch) | |
tree | 945e908d3f0e53b518385533338851ee8f3a2a56 /test/libjulia/UnusedPruner.cpp | |
parent | 2cbbe5828191707f5e51ba699699bfa4dc6c3691 (diff) | |
download | dexon-solidity-33b27258e43eea4f65b17cefd6523ecbf515778f.tar.gz dexon-solidity-33b27258e43eea4f65b17cefd6523ecbf515778f.tar.zst dexon-solidity-33b27258e43eea4f65b17cefd6523ecbf515778f.zip |
Add more tests for UnusedPruner
Diffstat (limited to 'test/libjulia/UnusedPruner.cpp')
-rw-r--r-- | test/libjulia/UnusedPruner.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/libjulia/UnusedPruner.cpp b/test/libjulia/UnusedPruner.cpp index 48ada5ed..b86a54b3 100644 --- a/test/libjulia/UnusedPruner.cpp +++ b/test/libjulia/UnusedPruner.cpp @@ -71,6 +71,22 @@ BOOST_AUTO_TEST_CASE(multi_declarations) ); } +BOOST_AUTO_TEST_CASE(multi_assignments) +{ + CHECK( + "{ let x, y x := 1 y := 2 }", + "{ let x, y x := 1 y := 2 }" + ); +} + +BOOST_AUTO_TEST_CASE(multi_partial_assignments) +{ + CHECK( + "{ let x, y x := 1 }", + "{ let x, y x := 1 }" + ); +} + BOOST_AUTO_TEST_CASE(functions) { CHECK( @@ -87,6 +103,13 @@ BOOST_AUTO_TEST_CASE(intermediate_assignment) ); } +BOOST_AUTO_TEST_CASE(intermediate_multi_assignment){ + CHECK( + "{ let a, b function f() -> x { } a := f() b := 1 }", + "{ let a, b function f() -> x { } a := f() b := 1 }" + ); +} + BOOST_AUTO_TEST_CASE(multi_declare) { CHECK( |