aboutsummaryrefslogtreecommitdiffstats
path: root/test/libjulia
diff options
context:
space:
mode:
Diffstat (limited to 'test/libjulia')
-rw-r--r--test/libjulia/Simplifier.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/libjulia/Simplifier.cpp b/test/libjulia/Simplifier.cpp
index b48d45c8..4d4e8d53 100644
--- a/test/libjulia/Simplifier.cpp
+++ b/test/libjulia/Simplifier.cpp
@@ -127,4 +127,16 @@ BOOST_AUTO_TEST_CASE(inside_for)
);
}
+BOOST_AUTO_TEST_CASE(mod_and)
+{
+ CHECK(
+ "{ mstore(0, mod(calldataload(0), exp(2, 8))) }",
+ "{ mstore(0, and(calldataload(0), 255)) }"
+ );
+ CHECK(
+ "{ mstore(0, mod(calldataload(0), exp(2, 255))) }",
+ "{ mstore(0, and(calldataload(0), 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)) }"
+ );
+}
+
BOOST_AUTO_TEST_SUITE_END()