From e0b3538721a71f6e8c016b12c8c257b8cebd3981 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 26 Apr 2019 18:01:12 -0400 Subject: WIP: Turning compiler tests into a re-usable specification. --- new-luxc/source/test/program.lux | 56 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 new-luxc/source/test/program.lux (limited to 'new-luxc/source/test/program.lux') diff --git a/new-luxc/source/test/program.lux b/new-luxc/source/test/program.lux new file mode 100644 index 000000000..40eb214c2 --- /dev/null +++ b/new-luxc/source/test/program.lux @@ -0,0 +1,56 @@ +(.module: + [lux #* + ["_" test (#+ Test)] + [abstract + [monad (#+ do)]] + [control + ["." io] + [parser + [cli (#+ program:)]]] + [math + ["r" random]]] + [spec + ["." compositor (#+ Runner) + [generation + ["." primitive] + ["." structure]]]] + {1 + ["." /]} + ## [test + ## [luxc + ## [lang + ## [translation + ## ## ["_.T" function] + ## ## ["_.T" reference] + ## ## ["_.T" case] + ## ## ["_.T" common] + ## ## ["_.T" jvm] + ## ## ["_.T" js] + ## ## ["_.T" lua] + ## ## ["_.T" ruby] + ## ## ["_.T" python] + ## ## ["_.T" r] + ## ## ["_.T" scheme] + ## ## ["_.T" common-lisp] + ## ## ["_.T" php] + ## ]]]] + ) + +(def: (test runner) + (-> Runner Test) + ($_ _.and + (primitive.spec runner) + (structure.spec runner) + )) + +(program: args + (<| io.io + _.run! + (_.times 100) + (do r.monad + [_ (wrap []) + #let [platform (io.run /.jvm)]]) + (..test (compositor.runner platform + /.bundle + /.expander + /.program)))) -- cgit v1.2.3