From ba9441a1342339128fa021800b8b23d744fd5c20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Suzanne=20Dup=C3=A9ron?= Date: Fri, 27 Mar 2020 16:29:40 +0100 Subject: [PATCH] moved adt_generator tests to a separate folder --- src/stages/adt_generator/adt_generator.ml | 3 +-- src/stages/adt_generator/dune | 20 +------------------ src/stages/adt_generator/generator.raku | 2 +- src/{stages => test}/adt_generator/amodule.ml | 0 .../adt_generator/amodule_utils.ml | 0 src/test/adt_generator/dune | 17 ++++++++++++++++ src/{stages => test}/adt_generator/fold.ml | 0 src/test/adt_generator/test_adt_generator.ml | 2 ++ .../adt_generator/use_a_fold.ml | 0 9 files changed, 22 insertions(+), 22 deletions(-) rename src/{stages => test}/adt_generator/amodule.ml (100%) rename src/{stages => test}/adt_generator/amodule_utils.ml (100%) create mode 100644 src/test/adt_generator/dune rename src/{stages => test}/adt_generator/fold.ml (100%) create mode 100644 src/test/adt_generator/test_adt_generator.ml rename src/{stages => test}/adt_generator/use_a_fold.ml (100%) diff --git a/src/stages/adt_generator/adt_generator.ml b/src/stages/adt_generator/adt_generator.ml index 840fe1b02..f96857f7b 100644 --- a/src/stages/adt_generator/adt_generator.ml +++ b/src/stages/adt_generator/adt_generator.ml @@ -1,2 +1 @@ -module Amodule = Amodule -module Use_a_fold = Use_a_fold +module Generic = Generic diff --git a/src/stages/adt_generator/dune b/src/stages/adt_generator/dune index 4d7d78239..0e1a15f71 100644 --- a/src/stages/adt_generator/dune +++ b/src/stages/adt_generator/dune @@ -1,24 +1,6 @@ -(rule - (target generated_fold.ml) - (deps generator.raku amodule.ml) - (action (with-stdout-to generated_fold.ml (run perl6 ./generator.raku amodule.ml))) -; (mode (promote (until-clean))) -) -; (library -; (name adt_generator) -; (public_name ligo.adt_generator) -; (libraries -; ) -; ) - -(executable +(library (name adt_generator) (public_name ligo.adt_generator) (libraries ) ) - -(alias - (name runtest) - (action (run ./adt_generator.exe)) -) diff --git a/src/stages/adt_generator/generator.raku b/src/stages/adt_generator/generator.raku index f3a5ec6ca..555e98f22 100644 --- a/src/stages/adt_generator/generator.raku +++ b/src/stages/adt_generator/generator.raku @@ -140,7 +140,7 @@ for $statements -> $statement { say "$statement" } say "open $moduleName"; -say "module Adt_info = Generic.Adt_info"; +say "module Adt_info = Adt_generator.Generic.Adt_info"; say ""; for $adts.kv -> $index, $t { diff --git a/src/stages/adt_generator/amodule.ml b/src/test/adt_generator/amodule.ml similarity index 100% rename from src/stages/adt_generator/amodule.ml rename to src/test/adt_generator/amodule.ml diff --git a/src/stages/adt_generator/amodule_utils.ml b/src/test/adt_generator/amodule_utils.ml similarity index 100% rename from src/stages/adt_generator/amodule_utils.ml rename to src/test/adt_generator/amodule_utils.ml diff --git a/src/test/adt_generator/dune b/src/test/adt_generator/dune new file mode 100644 index 000000000..679b3a0fd --- /dev/null +++ b/src/test/adt_generator/dune @@ -0,0 +1,17 @@ +(rule + (target generated_fold.ml) + (deps ../../../src/stages/adt_generator/generator.raku amodule.ml) + (action (with-stdout-to generated_fold.ml (run perl6 ../../../src/stages/adt_generator/generator.raku amodule.ml))) +; (mode (promote (until-clean))) +) + +(executable + (name test_adt_generator) + (public_name ligo.test_adt_generator) + (libraries adt_generator) +) + +(alias + (name runtest) + (action (run ./test_adt_generator.exe)) +) diff --git a/src/stages/adt_generator/fold.ml b/src/test/adt_generator/fold.ml similarity index 100% rename from src/stages/adt_generator/fold.ml rename to src/test/adt_generator/fold.ml diff --git a/src/test/adt_generator/test_adt_generator.ml b/src/test/adt_generator/test_adt_generator.ml new file mode 100644 index 000000000..840fe1b02 --- /dev/null +++ b/src/test/adt_generator/test_adt_generator.ml @@ -0,0 +1,2 @@ +module Amodule = Amodule +module Use_a_fold = Use_a_fold diff --git a/src/stages/adt_generator/use_a_fold.ml b/src/test/adt_generator/use_a_fold.ml similarity index 100% rename from src/stages/adt_generator/use_a_fold.ml rename to src/test/adt_generator/use_a_fold.ml