From cc085c83e78751b0b2d94ac0d79c358fff4a470d Mon Sep 17 00:00:00 2001 From: Carsten Larsen Date: Thu, 2 Feb 2017 22:57:26 +0100 Subject: [PATCH] Cleanup tests --- app/system/program_test.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/system/program_test.cpp b/app/system/program_test.cpp index 1658c7d4..bba2ac7d 100644 --- a/app/system/program_test.cpp +++ b/app/system/program_test.cpp @@ -76,9 +76,9 @@ void TestProgram::RunTests() RunTestset2(); RunTestset3(); RunTestset4(); - RunTestset5(); RunTestset6(); RunTestset7(); + RunTestset5(); } void TestProgram::TestExpression(const char* expression, const char* result) @@ -331,12 +331,13 @@ void TestProgram::RunTestset4() void TestProgram::RunTestset5() { + TestExecution("delete funtions"); TestStatement("f(x)=x*2+1", ""); TestStatement("g(y)=y^2+y*1.5+2", ""); - TestStatement("h(x)=|x^3-2*x^2-16*x+6|", ""); + TestStatement("h(x)=x^3-2*x^2-16*x+6", ""); TestStatement("a=2;b=3;c=a+b;", ""); TestStatement("vars", "a = 2" NEWLINE "b = 3" NEWLINE "c = 5"); - TestStatement("funcs", "f(x)=x*2+1" NEWLINE "g(y)=y^2+y*1.5+2" NEWLINE "h(x)=|x^3-2*x^2-16*x+6|"); + TestStatement("funcs", "f(x)=x*2+1" NEWLINE "g(y)=y^2+y*1.5+2" NEWLINE "h(x)=x^3-2*x^2-16*x+6"); TestStatement("f(2.2)", "f(2.2) = 5.4"); TestStatement("h(8.3)", "h(8.3) = 307.207"); TestStatement("c+1.1", "c+1.1 = 6.1"); @@ -345,6 +346,8 @@ void TestProgram::RunTestset5() TestStatement("eval d=d+1", "d=(d+1) = 3.1"); TestStatement("eval d=d*2", "d=(d*2) = 6.2"); TestStatement("vars", "a = 2" NEWLINE "b = 3" NEWLINE "c = 5" NEWLINE "d = 6.2"); + TestExecution("delete funtions"); + TestExecution("delete variable"); } void TestProgram::RunTestset6()