@@ -63,23 +63,86 @@ function normalize(x) {
63
63
return x & 1073741823 ;
64
64
}
65
65
66
- var param = $$Array . map ( function ( x ) {
67
- return Hashtbl . hash ( x ) & 1073741823 ;
68
- } , test_strings ) ;
66
+ function caml_hash ( x ) {
67
+ return Hashtbl . hash ( x ) & 1073741823 ;
68
+ }
69
+
70
+ var param = $$Array . map ( caml_hash , test_strings ) ;
69
71
70
- Mt_global . collect_eq ( test_id , suites , 'File "hash_test.ml", line 17 , characters 5-12' , param , test_strings_hash_results ) ;
72
+ Mt_global . collect_eq ( test_id , suites , 'File "hash_test.ml", line 18 , characters 5-12' , param , test_strings_hash_results ) ;
71
73
72
74
var param$1 = Hashtbl . hash ( 0 ) & 1073741823 ;
73
75
74
- Mt_global . collect_eq ( test_id , suites , 'File "hash_test.ml", line 23 , characters 5-12' , param$1 , 129913994 ) ;
76
+ Mt_global . collect_eq ( test_id , suites , 'File "hash_test.ml", line 24 , characters 5-12' , param$1 , 129913994 ) ;
75
77
76
78
var param$2 = Hashtbl . hash ( "x" ) & 1073741823 ;
77
79
78
- Mt_global . collect_eq ( test_id , suites , 'File "hash_test.ml", line 26 , characters 5-12' , param$2 , 780510073 ) ;
80
+ Mt_global . collect_eq ( test_id , suites , 'File "hash_test.ml", line 27 , characters 5-12' , param$2 , 780510073 ) ;
79
81
80
82
var param$3 = Hashtbl . hash ( "xy" ) & 1073741823 ;
81
83
82
- Mt_global . collect_eq ( test_id , suites , 'File "hash_test.ml", line 29, characters 5-12' , param$3 , 194127723 ) ;
84
+ Mt_global . collect_eq ( test_id , suites , 'File "hash_test.ml", line 30, characters 5-12' , param$3 , 194127723 ) ;
85
+
86
+ var param$4 = Hashtbl . hash ( /* A */ 65 ) & 1073741823 ;
87
+
88
+ Mt_global . collect_eq ( test_id , suites , 'File "hash_test.ml", line 33, characters 5-12' , param$4 , 381663642 ) ;
89
+
90
+ var param$5 = Hashtbl . hash ( /* `A */ [
91
+ 65 ,
92
+ 3
93
+ ] ) & 1073741823 ;
94
+
95
+ Mt_global . collect_eq ( test_id , suites , 'File "hash_test.ml", line 34, characters 5-12' , param$5 , 294279345 ) ;
96
+
97
+ var param$6 = Hashtbl . hash ( /* :: */ [
98
+ /* `A */ [
99
+ 65 ,
100
+ 3
101
+ ] ,
102
+ /* :: */ [
103
+ /* `B */ [
104
+ 66 ,
105
+ 2
106
+ ] ,
107
+ /* :: */ [
108
+ /* `C */ [
109
+ 67 ,
110
+ 3
111
+ ] ,
112
+ /* [] */ 0
113
+ ]
114
+ ]
115
+ ] ) & 1073741823 ;
116
+
117
+ Mt_global . collect_eq ( test_id , suites , 'File "hash_test.ml", line 35, characters 5-12' , param$6 , 1017654909 ) ;
118
+
119
+ var param$7 = Hashtbl . hash ( /* :: */ [
120
+ /* tuple */ [
121
+ /* `A */ [
122
+ 65 ,
123
+ "3"
124
+ ] ,
125
+ /* `B */ [
126
+ 66 ,
127
+ "2"
128
+ ]
129
+ ] ,
130
+ /* :: */ [
131
+ /* tuple */ [
132
+ /* `C */ [
133
+ 67 ,
134
+ "3"
135
+ ] ,
136
+ /* `D */ [
137
+ 68 ,
138
+ "4"
139
+ ]
140
+ ] ,
141
+ /* [] */ 0
142
+ ]
143
+ ] ) & 1073741823 ;
144
+
145
+ Mt_global . collect_eq ( test_id , suites , 'File "hash_test.ml", line 36, characters 5-12' , param$7 , 81986873 ) ;
83
146
84
147
Mt . from_pair_suites ( "hash_test.ml" , suites [ 0 ] ) ;
85
148
@@ -89,4 +152,5 @@ exports.eq = eq;
89
152
exports . test_strings = test_strings ;
90
153
exports . test_strings_hash_results = test_strings_hash_results ;
91
154
exports . normalize = normalize ;
155
+ exports . caml_hash = caml_hash ;
92
156
/* test_strings Not a pure module */
0 commit comments