Commit 5271b7bc authored by Camil Staps's avatar Camil Staps 🚀

makecleantest: import module itself and toString for {#Char} (#11)

parent 825d97d4
Subproject commit 28d19cd2b939a405a16c8ceb3a6e30c18e74b758
Subproject commit a18ebf4d7b782c1e8b0a7fbae0d546f20b1a64a8
......@@ -200,7 +200,7 @@ handleModule opts fp w
# output_modname = opts.output_prefix +++ "." +++ modname
# output_filename = opts.output_directory </> replaceSubString "." {pathSeparator} output_modname +++ ".icl"
# (nprops,coverage,props) = generatePropertyModule
output_modname
output_modname modname
opts.print_options
opts.test_options
mod
......@@ -249,15 +249,17 @@ where
interleave _ [] = []
interleave g [x:xs] = [g,x:interleave g xs]
generatePropertyModule :: !String ![String] ![String] !ModuleEntry ![FunctionEntry] -> (!Int, !Real, !String)
generatePropertyModule name print_options test_options me fes
generatePropertyModule :: !String !String ![String] ![String] !ModuleEntry ![FunctionEntry] -> (!Int, !Real, !String)
generatePropertyModule testmodname modname print_options test_options me fes
= (length props, coverage, tests)
where
n_props = length props
coverage = toReal (length (filter (not o isEmpty) propsets)) / toReal (length fes)
tests = join "\n\n"
[ "module " +++ name
[ "module " +++ testmodname
, "import Gast, Gast.CommandLine"
, "from StdString import instance toString {#Char}"
, "import " +++ modname
, bootstrap
, generators_string
, start
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment