Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,13 @@
|
|||
for expr,res in [
|
||||
['2+3' => 5],
|
||||
['-4-3' => -7],
|
||||
['-+2+3/4' => -1.25],
|
||||
['2*3-4' => 2],
|
||||
['2*(3+4)+2/4' => 2/4 + 14],
|
||||
['2*-3--4+-0.25' => -2.25],
|
||||
['2 * (3 + (4 * 5 + (6 * 7) * 8) - 9) * 10' => 7000],
|
||||
] {
|
||||
var num = evalArithmeticExp(expr)
|
||||
assert_eq(num, res)
|
||||
"%-45s == %10g\n".printf(expr, num)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue