From 344e0e58ad63fba551f46fc4d9a2468e395f473a Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Sun, 18 Oct 2009 22:24:59 +0000 Subject: Minor code cleanup, refactored list functions and cleaned up function names, moved support for elements to a new header file. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@826543 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/sca/modules/eval/eval-test.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'cpp/sca/modules/eval/eval-test.cpp') diff --git a/cpp/sca/modules/eval/eval-test.cpp b/cpp/sca/modules/eval/eval-test.cpp index 725f1b43fa..c536ed51a4 100644 --- a/cpp/sca/modules/eval/eval-test.cpp +++ b/cpp/sca/modules/eval/eval-test.cpp @@ -33,7 +33,7 @@ namespace tuscany { bool testEnv() { Env globalEnv = list(); - Env env = extendEnvironment(makeList("a"), makeList(1), globalEnv); + Env env = extendEnvironment(mklist("a"), mklist(1), globalEnv); defineVariable("x", env, env); //assert(lookupVariableValue(value("x"), env) == env); assert(lookupVariableValue("a", env) == value(1)); @@ -62,13 +62,13 @@ bool testRead() { assert(read(is2) == value(123)); std::istringstream is3("(abcd)"); - assert(read(is3) == makeList(value("abcd"))); + assert(read(is3) == mklist(value("abcd"))); std::istringstream is4("(abcd xyz)"); - assert(read(is4) == makeList("abcd", "xyz")); + assert(read(is4) == mklist("abcd", "xyz")); std::istringstream is5("(abcd (xyz tuv))"); - assert(read(is5) == makeList("abcd", makeList("xyz", "tuv"))); + assert(read(is5) == mklist("abcd", mklist("xyz", "tuv"))); return true; } @@ -133,7 +133,7 @@ bool testEval() { } bool testEvalExpr() { - const value exp = makeList("+", 2, 3); + const value exp = mklist("+", 2, 3); Env env = setupEnvironment(); const value r = eval(exp, env); assert(r == value(5)); @@ -172,8 +172,5 @@ int main() { tuscany::testEvalGC(); std::cout << "OK" << std::endl; - - tuscany::testEvalRun(); - return 0; } -- cgit v1.2.3