diff options
| author | Jun FURUSE / 古瀬 淳 <jun.furuse@gmail.com> | 2004-06-18 05:04:14 +0000 |
|---|---|---|
| committer | Jun FURUSE / 古瀬 淳 <jun.furuse@gmail.com> | 2004-06-18 05:04:14 +0000 |
| commit | 5e1bf20850aaa9b1ceb86a971848609ee9e84c47 (patch) | |
| tree | f3a6e5b5c38263fe527e6275ff95425f12637226 /test/Moretest | |
| parent | 8ec769214e067da9ee8b33d05f4ef275e9269dd5 (diff) | |
| download | ocaml-gcaml.tar.gz | |
port to the latest ocaml (2004/06/18)gcaml
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gcaml@6419 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'test/Moretest')
| -rw-r--r-- | test/Moretest/morematch.ml | 30 | ||||
| -rw-r--r-- | test/Moretest/tscanf.ml | 8 |
2 files changed, 38 insertions, 0 deletions
diff --git a/test/Moretest/morematch.ml b/test/Moretest/morematch.ml index b8f00b81f1..e6a0a1cb60 100644 --- a/test/Moretest/morematch.ml +++ b/test/Moretest/morematch.ml @@ -1105,3 +1105,33 @@ let _ = test "luc" f (B, A, A, A, A, A, A, A, A, A, A, B, A, A, A, A) "10" ; test "luc" f (B, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A) "12" ; () + +(* + By Gilles Peskine, compilation raised some assert false i make_failactionneg +*) + +type bg = [ + | `False + | `True + ] + +type vg = [ + | `A + | `B + | `U of int + | `V of int + ] + +type tg = { + v : vg; + x : bg; + } + +let predg x = true + +let rec gilles o = match o with + | {v = (`U data | `V data); x = `False} when predg o -> 1 + | {v = (`A|`B) ; x = `False} + | {v = (`U _ | `V _); x = `False} + | {v = _ ; x = `True} + -> 2 diff --git a/test/Moretest/tscanf.ml b/test/Moretest/tscanf.ml index 38605fe5fc..0cb7658f75 100644 --- a/test/Moretest/tscanf.ml +++ b/test/Moretest/tscanf.ml @@ -789,6 +789,14 @@ let test42 () = test (test42 ());; +let test50 () = + let s = "12.2" in + let ib = Scanning.from_string s in + bscanf ib "%[0-9].%[0-9]%s%!" (fun s1 s2 s3 -> + s1 = "12" && s2 = "2" && s3 = "");; + +test (test50 ());; + (******* print_string "Test number is "; |
