-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a linking and type equality tests
- Loading branch information
Showing
7 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
_build | ||
camlpstreams.opam | ||
*~ | ||
dune-workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
(lang dune 1.0) | ||
(context default) | ||
; Test on all 4.x versions as well | ||
(context (opam (switch 4.02))) | ||
(context (opam (switch 4.03))) | ||
(context (opam (switch 4.04))) | ||
(context (opam (switch 4.05))) | ||
(context (opam (switch 4.06))) | ||
(context (opam (switch 4.07))) | ||
(context (opam (switch 4.08))) | ||
(context (opam (switch 4.09))) | ||
(context (opam (switch 4.10))) | ||
(context (opam (switch 4.11))) | ||
(context (opam (switch 4.12))) | ||
(context (opam (switch 4.13))) | ||
(context (opam (switch 4.14))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
(library | ||
(name stream_stdlib) | ||
(flags :standard -w -3) | ||
(modules stream_stdlib) | ||
(enabled_if (< %{ocaml_version} 5.0))) | ||
|
||
(library | ||
(name stream_camlp_streams) | ||
(libraries camlp-streams) | ||
(modules stream_camlp_streams)) | ||
|
||
(executable | ||
(name equality) | ||
(libraries stream_stdlib stream_camlp_streams) | ||
(modules equality) | ||
(enabled_if (< %{ocaml_version} 5.0))) | ||
|
||
(rule | ||
(action (with-stdout-to equality.output (run ./equality.exe))) | ||
(enabled_if (< %{ocaml_version} 5.0))) | ||
|
||
(rule | ||
(alias runtest) | ||
(action (diff equality.expected equality.output)) | ||
(enabled_if (< %{ocaml_version} 5.0))) | ||
|
||
(executable | ||
(name linking) | ||
(libraries camlp-streams stream_stdlib) | ||
(modules linking) | ||
(flags :standard -w -3) | ||
(enabled_if (< %{ocaml_version} 5.0))) | ||
|
||
(rule | ||
(action (with-stdout-to issue4.output (run ./linking.exe))) | ||
(enabled_if (< %{ocaml_version} 5.0))) | ||
|
||
(rule | ||
(alias runtest) | ||
(action (diff issue4.expected issue4.output)) | ||
(enabled_if (< %{ocaml_version} 5.0))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(* Test type equality between a library using camlp-streams and one using | ||
Stdlib.Stream *) | ||
|
||
let () = | ||
Stream.empty Stream_stdlib.stream; | ||
Stream.empty Stream_camlp_streams.stream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(* Test that we can link programs using libraries which use Stream.t but don't | ||
necessarily use camlp-streams. Test is most relevant on 4.02-4.06 before the | ||
Stdlib module was introduced. *) | ||
|
||
let () = | ||
Stream.(empty (Stream.of_list Stream_stdlib.list)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
let stream = Stream.of_list ([] : unit list) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
let list = ([] : unit list) | ||
let stream = Stream.of_list list |