testing4/postfix_test7.scala
author Christian Urban <urbanc@in.tum.de>
Fri, 16 Aug 2019 08:45:21 +0100
changeset 277 acaf2099406a
parent 249 1997cfcd6334
child 300 72688efdf17c
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
assert(syard(split("3 + 4 * ( 2 - 1 )")) == List("3", "4", "2", "1", "-", "*", "+"))
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
assert(syard(split("( ( ( 3 ) ) + ( ( 4 + ( 5 ) ) ) )")) == List("3", "4", "5", "+", "+"))
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
assert(syard(split("5 + 7 / 2")) == List("5", "7", "2", "/", "+"))
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
assert(syard(split("5 * 7 / 2")) == List("5", "7", "*", "2", "/"))