Skip to content

Commit 36b6986

Browse files
committed
add bug 1
1 parent bc0205c commit 36b6986

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/Expression.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,5 +268,19 @@ public function testCustomClosures()
268268
$this->assertEquals((bool)$expr->evaluate("even($number)"), $value);
269269
}
270270
}
271+
272+
// -------------------------------------------------------------------------
273+
public function testBug_1()
274+
{
275+
$expr = new Expression();
276+
$expr->v += [
277+
'f_price' => 500,
278+
'f_width' => 500,
279+
'f_turndown_0_2_f_count' => 2,
280+
'f_length_metal_f_length' => 1400
281+
];
282+
$formula = 'f_price*(f_width+f_turndown_0_2_f_count*10)*f_length_metal_f_length/1000000';
283+
$this->assertEquals($expr->evaluate($formula), 364);
284+
}
271285
// */
272286
}

0 commit comments

Comments
 (0)