Skip to content

Commit

Permalink
compiled using OCaml 3.10beta and added a few test cases; run them wi…
Browse files Browse the repository at this point in the history
…th "make test"

git-svn-id: http://ocaml-annot.googlecode.com/svn/trunk@28 790f693a-e429-0410-ac51-454e36e68905
  • Loading branch information
lindig committed Mar 27, 2007
1 parent 0ca18a7 commit 8010597
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README
Expand Up @@ -36,6 +36,8 @@ The configure script tries to locate all necessary tools and generates a
file config.mk that is included by the main Makefile. If something goes
wrong, try running "./configure -v".

The latest OCaml version that I have used for tests is OCaml 3.10 beta.

USING ANNOT FROM AN EDITOR

To use Annot from Vim, include the following code into your ~/.vimrc
Expand Down
9 changes: 9 additions & 0 deletions src/Makefile
Expand Up @@ -26,6 +26,7 @@ clean:
rm -f DEPEND
rm -f load.ml *.annot
rm -f pod2*
rm -f test.out

clobber: clean
rm -f $(NAME).byte $(NAME).opt
Expand All @@ -36,6 +37,14 @@ install: $(NAME).$(BINEXT) $(NAME).1 $(BINDIR) $(MAN1DIR)
cp $(NAME).$(BINEXT) $(BINDIR)/$(NAME)
cp $(NAME).1 $(MAN1DIR)


test: test.annot test.in
rm -f test.out
while read LINE COL; do \
./$(NAME).$(BINEXT) -type $$LINE $$COL test.annot >> test.out;\
done < test.in
diff test.ref test.out

$(BINDIR):
mkdir -p $@

Expand Down
6 changes: 6 additions & 0 deletions src/test.in
@@ -0,0 +1,6 @@
4 6
4 8
5 9
5 13
7 16
7 23
8 changes: 8 additions & 0 deletions src/test.ml
@@ -0,0 +1,8 @@

(* this module simply contains some test cases *)

let id x = x
let rec map f = function
| [] -> []
| x::xs -> f x :: map f xs

6 changes: 6 additions & 0 deletions src/test.ref
@@ -0,0 +1,6 @@
'a -> 'a
'a
('a -> 'b) -> 'a list -> 'b list
'a -> 'b
'a -> 'b
('a -> 'b) -> 'a list -> 'b list

0 comments on commit 8010597

Please sign in to comment.