From eca70b2a2e263a055355e323f6a56212b81c9b96 Mon Sep 17 00:00:00 2001 From: ageay Date: Wed, 11 Jul 2012 12:42:39 +0000 Subject: [PATCH] Error protection on association phase for expression evaluator. --- src/INTERP_KERNELTest/ExprEvalInterpTest.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/INTERP_KERNELTest/ExprEvalInterpTest.cxx b/src/INTERP_KERNELTest/ExprEvalInterpTest.cxx index 075c00453..9178175fe 100644 --- a/src/INTERP_KERNELTest/ExprEvalInterpTest.cxx +++ b/src/INTERP_KERNELTest/ExprEvalInterpTest.cxx @@ -230,7 +230,7 @@ void ExprEvalInterpTest::testInterpreter2() double xyValue[2]={1.,3.}; double res1; std::vector vars; vars.push_back("x"); vars.push_back("y"); - expr1.prepareExprEvaluation(vars); + expr1.prepareExprEvaluation(vars,2,1); expr1.evaluateExpr(1,xyValue,&res1); CPPUNIT_ASSERT_DOUBLES_EQUAL(33.833333333333336,res1,1e-13); xyValue[0]=-2.; @@ -247,7 +247,7 @@ void ExprEvalInterpTest::testInterpreter2() CPPUNIT_ASSERT_EQUAL(4,(int)res.size()); expected.insert("x"); expected.insert("y"); expected.insert("IVec"); expected.insert("JVec"); CPPUNIT_ASSERT(std::equal(res.begin(),res.end(),expected.begin())); - expr2.prepareExprEvaluation(vars); + expr2.prepareExprEvaluation(vars,2,2); expr2.evaluateExpr(2,xyValue,res2); CPPUNIT_ASSERT_DOUBLES_EQUAL(-3.9172477460694637,res2[0],1e-14); CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.49026082134069943,res2[1],1e-14); @@ -480,7 +480,7 @@ void ExprEvalInterpTest::testInterpreter4() varsV[1] = "y"; varsV[2] = "z"; expr.parse(); - expr.prepareExprEvaluation(varsV); + expr.prepareExprEvaluation(varsV,3,1); double result; expr.evaluateExpr(1,vals, &result); CPPUNIT_ASSERT_DOUBLES_EQUAL(1.2,result,1e-12); -- 2.39.2