mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 23:08:46 +00:00
Fix generation of tests for expressions
Signed-off-by: Kakadu <Kakadu@pm.me>
This commit is contained in:
parent
a91f4824c4
commit
bd6dd12df3
1 changed files with 7 additions and 8 deletions
|
|
@ -2,10 +2,11 @@
|
||||||
let count = 10000
|
let count = 10000
|
||||||
let () =
|
let () =
|
||||||
Out_channel.with_open_text "dune" (fun dunech ->
|
Out_channel.with_open_text "dune" (fun dunech ->
|
||||||
Printf.fprintf dunech "(cram (deps ../../src/Driver.exe ../../runtime/Std.i))\n\n";
|
let dprintfn fmt = Format.kasprintf (Printf.fprintf dunech "%s\n") fmt in
|
||||||
|
dprintfn "(cram (deps ../../src/Driver.exe ../../runtime/Std.i))\n";
|
||||||
for i=0 to count / 10 do
|
for i=0 to count / 10 do
|
||||||
(* let dunebuf = Buffer.create 100 in *)
|
|
||||||
let cram_buf = Buffer.create 100 in
|
let cram_buf = Buffer.create 100 in
|
||||||
|
let cram_printfn fmt = Format.kasprintf (Printf.bprintf cram_buf "%s\n") fmt in
|
||||||
let cram_file = Printf.sprintf "r%04dx.t" i in
|
let cram_file = Printf.sprintf "r%04dx.t" i in
|
||||||
let deps = ref [] in
|
let deps = ref [] in
|
||||||
for j=0 to 9 do
|
for j=0 to 9 do
|
||||||
|
|
@ -19,12 +20,10 @@ let () =
|
||||||
in
|
in
|
||||||
(
|
(
|
||||||
deps := lama_file :: !deps;
|
deps := lama_file :: !deps;
|
||||||
Printf.bprintf cram_buf " $ cat > test.input <<EOF\n";
|
cram_printfn " $ cat > test.input <<EOF";
|
||||||
List.iter (Printf.bprintf cram_buf " > %s\n") test;
|
List.iter (cram_printfn " > %s") test;
|
||||||
Printf.bprintf cram_buf " > EOF\n";
|
cram_printfn " > EOF";
|
||||||
(* Printf.fprintf ch " $ cat test.input\n";
|
cram_printfn " $ LAMA=../../runtime ../../src/Driver.exe -i generated%05d.lama < test.input" k
|
||||||
Printf.fprintf ch " $ ls -l\n"; *)
|
|
||||||
Printf.bprintf cram_buf " $ LAMA=../../runtime ../../src/Driver.exe -i generated%05d.lama < test.input\n" k
|
|
||||||
)
|
)
|
||||||
done;
|
done;
|
||||||
match !deps with
|
match !deps with
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue