From 015e22c8c0adc181992eede09acd8df24b488180 Mon Sep 17 00:00:00 2001 From: cheatfate Date: Sun, 4 Sep 2016 01:22:04 +0300 Subject: Add upcoming/asyncdispatch.nim to tests. --- tests/async/config.nims | 2 ++ tests/testament/categories.nim | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 tests/async/config.nims diff --git a/tests/async/config.nims b/tests/async/config.nims new file mode 100644 index 000000000..97c2e0aa4 --- /dev/null +++ b/tests/async/config.nims @@ -0,0 +1,2 @@ +when defined(upcoming): + patchFile("stdlib", "asyncdispatch", "$lib/upcoming/asyncdispatch") diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim index 29b6d9aba..f250d8a45 100644 --- a/tests/testament/categories.nim +++ b/tests/testament/categories.nim @@ -202,6 +202,14 @@ proc ioTests(r: var TResults, cat: Category, options: string) = testSpec c, makeTest("tests/system/helpers/readall_echo", options, cat) testSpec r, makeTest("tests/system/io", options, cat) +# ------------------------- async tests --------------------------------------- +proc asyncTests(r: var TResults, cat: Category, options: string) = + template test(filename: untyped) = + testSpec r, makeTest(filename, options, cat) + testSpec r, makeTest(filename, options & " -d:upcoming_async", cat) + for t in os.walkFiles("tests/async/t*.nim"): + test(t) + # ------------------------- debugger tests ------------------------------------ proc debuggerTests(r: var TResults, cat: Category, options: string) = @@ -390,6 +398,8 @@ proc processCategory(r: var TResults, cat: Category, options: string, fileGlob: threadTests r, cat, options & " --threads:on" of "io": ioTests r, cat, options + of "async": + asyncTests r, cat, options of "lib": testStdlib(r, "lib/pure/*.nim", options, cat) testStdlib(r, "lib/packages/docutils/highlite", options, cat) -- cgit 1.4.1-2-gfad0 From 5a1db8af54a227cac8e974734e67f1b2e29821ad Mon Sep 17 00:00:00 2001 From: cheatfate Date: Sun, 4 Sep 2016 01:48:13 +0300 Subject: Fix define. --- tests/testament/categories.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim index f250d8a45..13f732e3b 100644 --- a/tests/testament/categories.nim +++ b/tests/testament/categories.nim @@ -206,7 +206,7 @@ proc ioTests(r: var TResults, cat: Category, options: string) = proc asyncTests(r: var TResults, cat: Category, options: string) = template test(filename: untyped) = testSpec r, makeTest(filename, options, cat) - testSpec r, makeTest(filename, options & " -d:upcoming_async", cat) + testSpec r, makeTest(filename, options & " -d:upcoming", cat) for t in os.walkFiles("tests/async/t*.nim"): test(t) -- cgit 1.4.1-2-gfad0