aboutsummaryrefslogtreecommitdiff
path: root/tests/debug
diff options
context:
space:
mode:
authorliu fengyun <liu@fengy.me>2017-02-09 15:42:12 +0100
committerliu fengyun <liu@fengy.me>2017-02-10 19:26:07 +0100
commit22056d080e29e53bccd1b1b1ba9ffa2cbe8d0c64 (patch)
treeeb3e37e22a2c394f07b060b3574ac9a065e16b23 /tests/debug
parent6823e15cf08c68ca67f688159536f7a506d1969e (diff)
downloaddotty-22056d080e29e53bccd1b1b1ba9ffa2cbe8d0c64.tar.gz
dotty-22056d080e29e53bccd1b1b1ba9ffa2cbe8d0c64.tar.bz2
dotty-22056d080e29e53bccd1b1b1ba9ffa2cbe8d0c64.zip
add debug for if
Diffstat (limited to 'tests/debug')
-rw-r--r--tests/debug/if.scala20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/debug/if.scala b/tests/debug/if.scala
new file mode 100644
index 000000000..af598c1cd
--- /dev/null
+++ b/tests/debug/if.scala
@@ -0,0 +1,20 @@
+object Test {
+
+ def main(args: Array[String]): Unit = {
+ var a = 1 + 2 // [break] [step: a + 3]
+ a = a + 3 // [step: 4 + 5]
+ a = 4 + 5 // [step: if]
+
+ if (a * 8 > 20) // [step: 9 * 9]
+ a = 9 * 9 // [step: if]
+ else
+ a = 34 * 23
+
+ if (a * 8 < 20) // [step: 34 * 23]
+ a = 9 * 9
+ else
+ a = 34 * 23 // [step: print]
+
+ print(a)
+ }
+}