Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
6d121fbf
Commit
6d121fbf
authored
Feb 26, 2014
by
Julien Lopez
Browse files
Tests reorganized in separate folders
parent
18033693
Changes
13
Hide whitespace changes
Inline
Side-by-side
tests/ocaml/Makefile
View file @
6d121fbf
CAML
=
ocamlc
CDUCE
=
../../cduce
CAML
=
ocamlc
-I
$@
CDUCE
=
../../cduce
-I
$@
CDO2ML
=
$(CDUCE)
--mlstub
run
:
$(CAML)
-c
a.mli
$(CDUCE)
--compile
c.cd
$(CDUCE)
--compile
a.cd
$(CDO2ML)
c.cdo
>
c.ml
$(CDO2ML)
a.cdo
>
a.ml
ocamlfind
$(CAML)
-package
cduce
-linkpkg
-o
a c.ml a.ml b.ml
ifeq
($(STATIC),-static)
rm
*
.cdo
endif
./a
.PHONY
:
a
a
:
$(CAML)
-c
a.mli
$(CDUCE)
--compile
c.cd
$(CDUCE)
--compile
a.cd
$(CDO2ML)
c.cdo
>
c.ml
$(CDO2ML)
a.cdo
>
a.ml
ocamlfind
$(CAML)
-g
-package
cduce,oUnit
-linkpkg
-o
$@
c.ml
$@
.ml
$@
test.ml
./
$@
.PHONY
:
cdsdl
cdsdl
:
$(CAML)
-c
-I
`
ocamlfind query sdl
`
$@
.mli
$(CDUCE)
--compile
-I
`
ocamlfind query sdl
`
$@
.cd
$(CDO2ML)
-I
`
ocamlfind query sdl
`
$@
.cdo
>
$@
.ml
ocamlfind
$(CAML)
-package
cduce,sdl,oUnit
-linkpkg
-o
$@
$@
.ml
$@
test.ml
./
$@
all
:
a cdsdl cdmysql eval cdnum
.PHONY
:
cdmysql
cdmysql
:
$(CDUCE)
--compile
$@
.cd
-I
`
ocamlfind query mysql
`
ocamlfind
$(CAML)
-o
$@
-pp
"
$(CDO2ML)
"
-impl
$@
.cdo
-package
cduce,mysql
-linkpkg
./
$@
a
:
$(CAML)
-c
$@
/
$@
.mli
$(CDUCE)
--compile
$@
/c.cd
$(CDUCE)
--compile
$@
/
$@
.cd
$(CDO2ML)
$@
/c.cdo
>
c.ml
$(CDO2ML)
$@
/
$@
.cdo
>
$@
/
$@
.ml
ocamlfind
$(CAML)
-g
-package
cduce,oUnit
-linkpkg
-o
$@
/
$@
c.ml
$@
/
$@
.ml
$@
/
$@
test.ml
./
$@
/
$@
cdsdl
:
$(CAML)
-c
-I
`
ocamlfind query sdl
`
$@
/
$@
.mli
$(CDUCE)
--compile
-I
`
ocamlfind query sdl
`
$@
/
$@
.cd
$(CDO2ML)
-I
`
ocamlfind query sdl
`
$@
/
$@
.cdo
>
$@
/
$@
.ml
ocamlfind
$(CAML)
-package
cduce,sdl,oUnit
-linkpkg
-o
$@
/
$@
$@
/
$@
.ml
$@
/
$@
test.ml
./
$@
/
$@
.PHONY
:
eval
eval
:
$(CDUCE)
--compile
$@
.cd
-I
`
ocamlfind query cduce
`
ocamlfind
$(CAML)
-o
$@
-pp
"
$(CDO2ML)
"
-impl
$@
.cdo
-package
cduce
-linkpkg
./
$@
$(CDUCE)
--compile
$@
/
$@
.cd
-I
`
ocamlfind query cduce
`
ocamlfind
$(CAML)
-o
$@
/
$@
-pp
"
$(CDO2ML)
"
-impl
$@
/
$@
.cdo
-package
cduce
-linkpkg
./
$@
/
$@
.PHONY
:
cdnum
cdnum
:
$(CAML)
-c
$@
.mli
$(CDUCE)
--compile
$@
.cd
-I
`
ocamlfind query num
`
$(CDO2ML)
$@
.cdo
>
$@
.ml
ocamlfind
$(CAML)
-package
cduce,num,oUnit
-linkpkg
-o
$@
$@
.ml
$@
test.ml
./
$@
$(CAML)
-c
$@
/
$@
.mli
$(CDUCE)
--compile
$@
/
$@
.cd
-I
`
ocamlfind query num
`
$(CDO2ML)
$@
/
$@
.cdo
>
$@
/
$@
.ml
ocamlfind
$(CAML)
-I
$@
-package
cduce,num,oUnit
-linkpkg
-o
$@
/
$@
$@
/
$@
.ml
$@
/
$@
test.ml
./
$@
/
$@
clean
:
rm
-f
*
.cmo
*
.cmx
*
.o
*
.cdo
*
.cmi a.ml c.ml cdnum cdnum.ml cdsdl.ml
eval
cdsdl cdmysql a oUnit-
*
find
.
-name
'*.c[dm][oxi]'
-delete
find
.
-name
'*.o'
-delete
find
.
-name
'oUnit-*'
-delete
rm
-f
a/a.ml a/c.ml cdnum/cdnum cdnum/cdnum.ml cdsdl/cdsdl.ml
eval
/eval cdsdl/cdsdl a/a
check
:
./check.sh
.PHONY
:
a cdsdl cdmysql eval cdnum
tests/ocaml/a.cd
→
tests/ocaml/a
/a
.cd
View file @
6d121fbf
File moved
tests/ocaml/a.mli
→
tests/ocaml/a
/a
.mli
View file @
6d121fbf
File moved
tests/ocaml/atest.ml
→
tests/ocaml/
a/
atest.ml
View file @
6d121fbf
File moved
tests/ocaml/c.cd
→
tests/ocaml/
a/
c.cd
View file @
6d121fbf
File moved
tests/ocaml/b.ml
deleted
100644 → 0
View file @
18033693
print_int
A
.
i
;;
print_endline
(
A
.
f
Char
.
uppercase
"Abc"
);;
print_endline
(
A
.
pp
(
A
.
A
(
A
.
C
2
)));;
print_endline
A
.
home
;;
print_newline
()
;;
tests/ocaml/cdnum.cd
→
tests/ocaml/cdnum
/cdnum
.cd
View file @
6d121fbf
...
...
@@ -2,5 +2,5 @@ let aux ((Int,Int) -> Int)
| (x, 0 | 1) -> x
| (x, n) -> aux (x * n, n - 1)
let fact (x : Int) : Int = aux (Big_int.unit_big_int, x)
let fact (x : Int) : Int = aux (Big_int.unit_big_int, x)
(* Could write 1 instead of Big_int.unit_big_int. Just for fun. *)
tests/ocaml/cdnum.mli
→
tests/ocaml/cdnum
/cdnum
.mli
View file @
6d121fbf
File moved
tests/ocaml/cdnumtest.ml
→
tests/ocaml/
cdnum/
cdnumtest.ml
View file @
6d121fbf
File moved
tests/ocaml/cdsdl.cd
→
tests/ocaml/cdsdl
/cdsdl
.cd
View file @
6d121fbf
File moved
tests/ocaml/cdsdl.mli
→
tests/ocaml/cdsdl
/cdsdl
.mli
View file @
6d121fbf
File moved
tests/ocaml/cdsdltest.ml
→
tests/ocaml/
cdsdl/
cdsdltest.ml
View file @
6d121fbf
File moved
tests/ocaml/eval.cd
→
tests/ocaml/eval
/eval
.cd
View file @
6d121fbf
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment