summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/scheme/eval-test.cpp
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-01-06 06:35:25 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-01-06 06:35:25 +0000
commit3a0eb8a5f2d211f88439db811ed32e23a8ce9b0b (patch)
treeaea6bd7220555857df695179296dc2552c56211f /sca-cpp/trunk/modules/scheme/eval-test.cpp
parent60ef14f12b5301fa7f117134044cf0716fb5ae61 (diff)
Minor cleanup, removed unnecessary references to GC pools.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@896327 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/scheme/eval-test.cpp')
-rw-r--r--sca-cpp/trunk/modules/scheme/eval-test.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/sca-cpp/trunk/modules/scheme/eval-test.cpp b/sca-cpp/trunk/modules/scheme/eval-test.cpp
index cd90dc8863..7c4c0c69c4 100644
--- a/sca-cpp/trunk/modules/scheme/eval-test.cpp
+++ b/sca-cpp/trunk/modules/scheme/eval-test.cpp
@@ -34,7 +34,7 @@ namespace scheme {
bool testEnv() {
gc_scoped_pool pool;
Env globalEnv = list<value>();
- Env env = extendEnvironment(mklist<value>("a"), mklist<value>(1), globalEnv, pool);
+ Env env = extendEnvironment(mklist<value>("a"), mklist<value>(1), globalEnv);
defineVariable("x", env, env);
assert(lookupVariableValue(value("x"), env) == env);
assert(lookupVariableValue("a", env) == value(1));
@@ -130,39 +130,39 @@ const string testSchemeForward(
"(define sqrt (lambda (x) (* x x))) "
"(testLambda)");
-const string evalOutput(const string& scm, const gc_pool& pool) {
+const string evalOutput(const string& scm) {
istringstream is(scm);
ostringstream os;
- evalDriverRun(is, os, pool);
+ evalDriverRun(is, os);
return str(os);
}
bool testEval() {
gc_scoped_pool pool;
- assert(contains(evalOutput(testSchemeNumber, pool), "testNumber ok"));
- assert(contains(evalOutput(testSchemeString, pool), "testString ok"));
- assert(contains(evalOutput(testSchemeDefinition, pool), "testDefinition ok"));
- assert(contains(evalOutput(testSchemeIf, pool), "testIf ok"));
- assert(contains(evalOutput(testSchemeCond, pool), "testCond ok"));
- assert(contains(evalOutput(testSchemeBegin, pool), "testBegin1 ok"));
- assert(contains(evalOutput(testSchemeBegin, pool), "testBegin2 ok"));
- assert(contains(evalOutput(testSchemeLambda, pool), "testLambda ok"));
- assert(contains(evalOutput(testSchemeForward, pool), "testForward ok"));
+ assert(contains(evalOutput(testSchemeNumber), "testNumber ok"));
+ assert(contains(evalOutput(testSchemeString), "testString ok"));
+ assert(contains(evalOutput(testSchemeDefinition), "testDefinition ok"));
+ assert(contains(evalOutput(testSchemeIf), "testIf ok"));
+ assert(contains(evalOutput(testSchemeCond), "testCond ok"));
+ assert(contains(evalOutput(testSchemeBegin), "testBegin1 ok"));
+ assert(contains(evalOutput(testSchemeBegin), "testBegin2 ok"));
+ assert(contains(evalOutput(testSchemeLambda), "testLambda ok"));
+ assert(contains(evalOutput(testSchemeForward), "testForward ok"));
return true;
}
bool testEvalExpr() {
gc_scoped_pool pool;
const value exp = mklist<value>("+", 2, 3);
- Env env = setupEnvironment(pool);
- const value r = evalExpr(exp, env, pool);
+ Env env = setupEnvironment();
+ const value r = evalExpr(exp, env);
assert(r == value(5));
return true;
}
bool testEvalRun() {
gc_scoped_pool pool;
- evalDriverRun(cin, cout, pool);
+ evalDriverRun(cin, cout);
return true;
}
@@ -180,20 +180,20 @@ const string testCallLambda(
bool testEvalLambda() {
gc_scoped_pool pool;
- Env env = setupEnvironment(pool);
+ Env env = setupEnvironment();
const value trl = mklist<value>("testReturnLambda");
istringstream trlis(testReturnLambda);
- const value trlv = evalScript(trl, trlis, env, pool);
+ const value trlv = evalScript(trl, trlis, env);
istringstream tclis(testCallLambda);
const value tcl = cons<value>("testCallLambda", quotedParameters(mklist<value>(trlv, 2, 3)));
- const value tclv = evalScript(tcl, tclis, env, pool);
+ const value tclv = evalScript(tcl, tclis, env);
assert(tclv == value(6));
istringstream tcelis(testCallLambda);
const value tcel = cons<value>("testCallLambda", quotedParameters(mklist<value>(primitiveProcedure(mult), 3, 4)));
- const value tcelv = evalScript(tcel, tcelis, env, pool);
+ const value tcelv = evalScript(tcel, tcelis, env);
assert(tcelv == value(12));
return true;
}