Skip to content

Commit 1ea3a49

Browse files
authored
Merge pull request #1033 from bloomberg/more_tests
add some tests
2 parents 2bb88ec + 4ba07b3 commit 1ea3a49

File tree

9 files changed

+2339
-1
lines changed

9 files changed

+2339
-1
lines changed

jscomp/stubs/ext_basic_hash_stubs.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,13 @@ CAMLprim value caml_bs_hash_small_int(value d){
5555
FINAL_MIX(h);
5656
return Val_int(h & 0x3FFFFFFFU);
5757
}
58+
59+
5860
/*
61+
* http://stackoverflow.com/questions/664014/what-integer-hash-function-are-good-that-accepts-an-integer-hash-key
62+
* https://en.wikipedia.org/wiki/MurmurHash
63+
* http://zimbry.blogspot.it/2011/09/better-bit-mixing-improving-on.html
64+
* http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx
5965
* We gave up the idea to hash Ident.t (take only one argument)
6066
* customized hash function for Ident.t, first
6167
* argument is stamp, second argument is string

jscomp/test/.depend

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ ffi_js_test.cmj : ../stdlib/obj.cmj mt.cmj ../others/js_obj.cmj \
150150
ffi_splice_test.cmj : mt.cmj
151151
ffi_test.cmj : ../runtime/js.cmj
152152
fib.cmj :
153+
flexible_array_test.cmj : ../stdlib/format.cmj ../stdlib/array.cmj
153154
float_array.cmj :
154155
float_of_bits_test.cmj : ../stdlib/printf.cmj mt.cmj ../stdlib/list.cmj \
155156
../stdlib/int64.cmj ../stdlib/int32.cmj ../stdlib/array.cmj
@@ -184,6 +185,7 @@ gpr_858_test.cmj : ../stdlib/list.cmj
184185
gpr_858_unit2_test.cmj :
185186
gpr_904_test.cmj : mt.cmj
186187
gpr_974_test.cmj : ../runtime/js.cmj
188+
gray_code_test.cmj : ../stdlib/bytes.cmj
187189
guide_for_ext.cmj :
188190
hamming_test.cmj : ../stdlib/printf.cmj mt.cmj ../stdlib/lazy.cmj \
189191
../stdlib/int64.cmj ../stdlib/buffer.cmj
@@ -470,6 +472,7 @@ tfloat_record_test.cmj : mt_global.cmj mt.cmj ../stdlib/format.cmj \
470472
ticker.cmj : ../stdlib/string.cmj ../stdlib/printf.cmj \
471473
../stdlib/pervasives.cmj ../stdlib/map.cmj ../stdlib/list.cmj
472474
to_string_test.cmj : mt.cmj
475+
topsort_test.cmj : ../stdlib/string.cmj ../stdlib/set.cmj ../stdlib/list.cmj
473476
tscanf_test.cmj : testing.cmj ../stdlib/string.cmj ../stdlib/scanf.cmj \
474477
../stdlib/printf.cmj ../stdlib/nativeint.cmj mt_global.cmj mt.cmj \
475478
../stdlib/list.cmj ../stdlib/int64.cmj ../stdlib/int32.cmj \

jscomp/test/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ OTHERS := literals a test_ari test_export2 test_internalOO test_obj_simple_ffi t
7272
gpr_904_test gpr_858_unit2_test inner_unused \
7373
set_gen bal_tree string_set string_set_test \
7474
math_test bal_set_mini gpr_974_test test_cpp\
75-
global_module_alias_test class_fib_open_recursion_test
75+
global_module_alias_test class_fib_open_recursion_test\
76+
topsort_test flexible_array_test\
77+
gray_code_test
7678

7779

7880

0 commit comments

Comments
 (0)