From e6a694ebccc5cbfc07c950614aed41775f0ffd5f Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Mon, 22 Jul 2013 17:58:28 -0700 Subject: [PATCH] Add expr test Signed-off-by: Leonardo de Moura --- src/tests/kernel/expr.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/tests/kernel/expr.cpp b/src/tests/kernel/expr.cpp index 7f6f559e7..be655a5ae 100644 --- a/src/tests/kernel/expr.cpp +++ b/src/tests/kernel/expr.cpp @@ -118,6 +118,14 @@ static void tst3() { lean_verify(r1 == r2); } +static void tst4() { + expr f = constant(name("f")); + expr a = var(0); + for (unsigned i = 0; i < 10000; i++) { + a = app({f, a}); + } +} + int main() { // continue_on_violation(true); std::cout << "sizeof(expr): " << sizeof(expr) << "\n"; @@ -125,5 +133,7 @@ int main() { tst1(); tst2(); tst3(); + tst4(); + std::cout << "done" << "\n"; return has_violations() ? 1 : 0; }