summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-11-09 01:42:05 +0100
committerAraq <rumpf_a@web.de>2011-11-09 01:42:05 +0100
commit68be801f63dc41e79f96ef2516350cc8538c5d7e (patch)
tree79e30a2a6024daff3602099ac403bdc68eb8d385 /tests
parent8c03d96c6aaa9607d3cba4e1dab401b6e0a85890 (diff)
downloadNim-68be801f63dc41e79f96ef2516350cc8538c5d7e.tar.gz
operator precedence changed: assignment like operators are supported; escaping of operators with \ is supported
Diffstat (limited to 'tests')
-rw-r--r--tests/accept/run/tprecedence.nim11
-rwxr-xr-xtests/tester.nim4
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/accept/run/tprecedence.nim b/tests/accept/run/tprecedence.nim
new file mode 100644
index 000000000..6b1b250a2
--- /dev/null
+++ b/tests/accept/run/tprecedence.nim
@@ -0,0 +1,11 @@
+discard """
+  output: "true"
+"""
+
+# Test the new predence rules
+
+proc `\+` (x, y: int): int = result = x + y
+proc `\*` (x, y: int): int = result = x * y
+
+echo 5 \+ 1 \* 9 == 14
+
diff --git a/tests/tester.nim b/tests/tester.nim
index 9741d7719..2baffc81d 100755
--- a/tests/tester.nim
+++ b/tests/tester.nim
@@ -417,6 +417,10 @@ proc main() =
     var runRes = readResults(runJson)
     listResults(rejectRes, compileRes, runRes)
     outputJSON(rejectRes, compileRes, runRes)
+  of "dll":
+    var r = initResults()
+    runDLLTests r, p.cmdLineRest.string
+    echo r.data, r
   of "test":
     var r = initResults()
     if p.kind != cmdArgument: quit usage