Skip to content

Commit 233a5dd

Browse files
committed
more extreme tests
1 parent b9bd8f6 commit 233a5dd

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

jscomp/test/scanf_test.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,24 @@ eq("File \"scanf_test.ml\", line 6, characters 5-12", /* tuple */[
3737
63
3838
]);
3939

40+
eq("File \"scanf_test.ml\", line 7, characters 5-12", /* tuple */[
41+
Curry._1(Scanf.sscanf("12306459064359371967", /* Format */[
42+
/* Int64 */Block.__(7, [
43+
/* Int_u */12,
44+
/* No_padding */0,
45+
/* No_precision */0,
46+
/* End_of_format */0
47+
]),
48+
"%Lu"
49+
]), (function (i) {
50+
return i;
51+
})),
52+
/* int64 */[
53+
/* hi */-1429646511,
54+
/* lo */235324607
55+
]
56+
]);
57+
4058
Mt.from_pair_suites("scanf_test.ml", suites[0]);
4159

4260
exports.suites = suites;

jscomp/test/scanf_test.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ let test_id = ref 0
33
let eq f (a,b) = Mt_global.collect_eq test_id suites f a b
44

55
let () =
6-
eq __LOC__ (Scanf.sscanf "32 31" "%d %d"(fun x y -> x + y), 63)
6+
eq __LOC__ (Scanf.sscanf "32 31" "%d %d"(fun x y -> x + y), 63);
7+
eq __LOC__ (Scanf.sscanf "12306459064359371967" "%Lu" (fun i -> i)
8+
,-6140285009350179649L)
79

810

911
let () =

0 commit comments

Comments
 (0)