diff options
author | Eduardo Julian | 2019-04-26 18:01:12 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-04-26 18:01:12 -0400 |
commit | e0b3538721a71f6e8c016b12c8c257b8cebd3981 (patch) | |
tree | 1263740cda4bff9311e58d5bb217e7565060d724 /new-luxc/source/test/program.lux | |
parent | f2c0473640e8029f27797f6ecf21662dddb0685b (diff) |
WIP: Turning compiler tests into a re-usable specification.
Diffstat (limited to 'new-luxc/source/test/program.lux')
-rw-r--r-- | new-luxc/source/test/program.lux | 56 |
1 files changed, 56 insertions, 0 deletions
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)))) |