[Compbench-devel] CompBenchmarks++/CBM-PI/t 05-CEL.pl,1.2,1.3
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-03-07 18:01:36
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27341 Modified Files: 05-CEL.pl Log Message: Variables are (implicitly) localy defined in blocks, function, and containers. Index: 05-CEL.pl =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/05-CEL.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 05-CEL.pl 6 Mar 2007 20:23:53 -0000 1.2 --- 05-CEL.pl 7 Mar 2007 18:01:28 -0000 1.3 *************** *** 233,236 **** --- 233,238 ---- sub test_var { + my $BL = new CBM::CelBlock(); + my $i0 = new CBM::CelStr("x"); my $i1 = new CBM::CelStr("y"); *************** *** 239,242 **** --- 241,245 ---- my $cs0 = new CBM::CelVarSet(); + $BL->add($cs0); $cs0->add($i0); $cs0->add($v0); *************** *** 244,251 **** --- 247,256 ---- my $cg0 = new CBM::CelVarGet(); + $BL->add($cg0); $cg0->add($i0); ok($cg0->Evaluate() eq "100", "Set/Get (x=100)"); my $cs1 = new CBM::CelVarSet(); + $BL->add($cs1); $cs1->add($i1); $cs1->add($v0); *************** *** 253,260 **** --- 258,267 ---- my $cg1 = new CBM::CelVarGet(); + $BL->add($cg1); $cg1->add($i1); ok($cg1->Evaluate() eq "100", "Set/Get (y=100)"); my $cs2 = new CBM::CelVarSet(); + $BL->add($cs2); $cs2->add($i1); $cs2->add($v1); *************** *** 262,269 **** --- 269,278 ---- my $cg2 = new CBM::CelVarGet(); + $BL->add($cg2); $cg2->add($i1); ok($cg2->Evaluate() eq "201", "Set/Get (y=201) - has " . $cg2->Evaluate()); my $u = new CBM::CelVarUndef(); + $BL->add($u); $u->add($i0); $u->Evaluate(); |