aboutsummaryrefslogtreecommitdiffstats
path: root/test/libjulia
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-08-21 18:29:04 +0800
committerchriseth <chris@ethereum.org>2017-08-22 18:43:44 +0800
commit97cb571ba49b81bd20b840e20f27c2cf55730d81 (patch)
treee9f3e7be88e8deb297b0e039f377ee0cbb158680 /test/libjulia
parentf874fc28d1cb657b6d4e04fa9d93bd8d061f30c4 (diff)
downloaddexon-solidity-97cb571ba49b81bd20b840e20f27c2cf55730d81.tar.gz
dexon-solidity-97cb571ba49b81bd20b840e20f27c2cf55730d81.tar.zst
dexon-solidity-97cb571ba49b81bd20b840e20f27c2cf55730d81.zip
Tests for recursion in JULIA.
Diffstat (limited to 'test/libjulia')
-rw-r--r--test/libjulia/Parser.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/libjulia/Parser.cpp b/test/libjulia/Parser.cpp
index e1bf5a3a..bfe76461 100644
--- a/test/libjulia/Parser.cpp
+++ b/test/libjulia/Parser.cpp
@@ -237,6 +237,18 @@ BOOST_AUTO_TEST_CASE(builtin_types)
BOOST_CHECK(successParse("{ let x:s256 := 1:s256 }"));
}
+BOOST_AUTO_TEST_CASE(recursion_depth)
+{
+ string input;
+ for (size_t i = 0; i < 20000; i++)
+ input += "{";
+ input += "let x:u256 := 0:u256";
+ for (size_t i = 0; i < 20000; i++)
+ input += "}";
+
+ CHECK_ERROR(input, ParserError, "recursio");
+}
+
BOOST_AUTO_TEST_SUITE_END()
}