From d96083a5fb9d8c94e7b73d6a37f1431a9a749c69 Mon Sep 17 00:00:00 2001 From: cxl Date: Sat, 12 Nov 2016 19:52:08 +0000 Subject: [PATCH] .autotest git-svn-id: svn://ultimatepp.org/upp/trunk@10420 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- autotest/EscTest/EscTest.cpp | 5 +++++ autotest/EscTest/script.esc | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/autotest/EscTest/EscTest.cpp b/autotest/EscTest/EscTest.cpp index 4087ce5cc..cb4adf1d4 100644 --- a/autotest/EscTest/EscTest.cpp +++ b/autotest/EscTest/EscTest.cpp @@ -138,4 +138,9 @@ CONSOLE_APP_MAIN DDUMP(global.Get("out")); DDUMP(global.Get("out2")); DDUMP(global.Get("out3")); + DDUMP(global.Get("out4")); + + ASSERT(AsString(global.Get("out")) == "{ \"a\":123, \"b\":\"Hello!\" }"); + ASSERT(AsString(global.Get("out2")) == "\"test\""); + ASSERT(AsString(global.Get("out3")) == "[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]"); } diff --git a/autotest/EscTest/script.esc b/autotest/EscTest/script.esc index a75a7fa9c..b9fa440eb 100644 --- a/autotest/EscTest/script.esc +++ b/autotest/EscTest/script.esc @@ -14,4 +14,8 @@ main() { :out3 = []; for(i = 0; i < 10; i++) :out3[] = i; + + a = Zero(); + if(a == 0) + :out4 = 1; }