From 33b27258e43eea4f65b17cefd6523ecbf515778f Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 6 Feb 2018 09:53:58 +0000 Subject: Add more tests for UnusedPruner --- test/libjulia/UnusedPruner.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'test') 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( -- cgit v1.2.3