aboutsummaryrefslogtreecommitdiffstats
path: root/test/libjulia/Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/libjulia/Parser.cpp')
-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..51070370 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, "recursion");
+}
+
BOOST_AUTO_TEST_SUITE_END()
}