Skip to content

Commit e66fedd

Browse files
committed
add poor man ipc for unit test
allow unit tests to test command directly
1 parent aa42fae commit e66fedd

25 files changed

+1448
-800
lines changed

jscomp/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ OUNIT_TESTS_SRCS = ounit_tests_util \
143143
ounit_sexp_tests\
144144
ounit_int_vec_tests\
145145
ounit_ident_mask_tests\
146+
ounit_cmd_tests\
146147
ounit_tests_main
147148
OUNIT_TESTS_CMXS = $(addprefix ounit_tests/, $(addsuffix .cmx, $(OUNIT_TESTS_SRCS)))
148149

jscomp/all.depend

+13-10
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ common/js_config.cmx : ext/ext_string.cmx ext/ext_pervasives.cmx \
136136
common/bs_pkg.cmx : ext/literals.cmx ext/ext_sys.cmx common/bs_pkg.cmi
137137
common/ext_log.cmx : common/js_config.cmx common/ext_log.cmi
138138
common/bs_loc.cmx : common/bs_loc.cmi
139-
common/bs_warnings.cmx : common/js_config.cmx common/bs_warnings.cmi
139+
common/bs_warnings.cmx : ext/literals.cmx common/js_config.cmx \
140+
common/bs_warnings.cmi
140141
common/lam_methname.cmx : ext/ext_string.cmx common/lam_methname.cmi
141142
common/binary_cache.cmx : ext/string_map.cmx ext/ext_filename.cmx \
142143
common/binary_cache.cmi
@@ -187,12 +188,12 @@ syntax/ast_util.cmx : ext/literals.cmx ext/ext_list.cmx \
187188
syntax/ast_core_type.cmx syntax/ast_comb.cmx syntax/ast_attributes.cmx \
188189
syntax/ast_util.cmi
189190
syntax/ppx_entry.cmx : ext/string_map.cmx ext/literals.cmx \
190-
ext/ext_string.cmx ext/ext_ref.cmx ext/ext_list.cmx syntax/ast_util.cmx \
191-
syntax/ast_structure.cmx syntax/ast_signature.cmx syntax/ast_payload.cmx \
192-
syntax/ast_literal.cmx syntax/ast_external_attributes.cmx \
193-
syntax/ast_derive_projector.cmx syntax/ast_derive_dyn.cmx \
194-
syntax/ast_derive.cmx syntax/ast_comb.cmx syntax/ast_attributes.cmx \
195-
syntax/ppx_entry.cmi
191+
ext/ext_string.cmx ext/ext_ref.cmx ext/ext_list.cmx \
192+
common/bs_warnings.cmx syntax/ast_util.cmx syntax/ast_structure.cmx \
193+
syntax/ast_signature.cmx syntax/ast_payload.cmx syntax/ast_literal.cmx \
194+
syntax/ast_external_attributes.cmx syntax/ast_derive_projector.cmx \
195+
syntax/ast_derive_dyn.cmx syntax/ast_derive.cmx syntax/ast_comb.cmx \
196+
syntax/ast_attributes.cmx syntax/ppx_entry.cmi
196197
syntax/ast_exp.cmi :
197198
syntax/ast_external.cmi :
198199
syntax/ast_lift.cmi :
@@ -613,6 +614,8 @@ ounit_tests/ounit_int_vec_tests.cmx : ounit/oUnit.cmx ext/int_vec_util.cmx \
613614
ext/int_vec.cmx
614615
ounit_tests/ounit_ident_mask_tests.cmx : ounit/oUnit.cmx \
615616
ext/hash_set_ident_mask.cmx
617+
ounit_tests/ounit_cmd_tests.cmx : ounit/oUnit.cmx ext/literals.cmx \
618+
ext/ext_string.cmx
616619
ounit_tests/ounit_tests_main.cmx : ext/resize_array.cmx \
617620
ounit_tests/ounit_vec_test.cmx ounit_tests/ounit_union_find_tests.cmx \
618621
ounit_tests/ounit_topsort_tests.cmx ounit_tests/ounit_string_tests.cmx \
@@ -623,9 +626,9 @@ ounit_tests/ounit_tests_main.cmx : ext/resize_array.cmx \
623626
ounit_tests/ounit_json_tests.cmx ounit_tests/ounit_int_vec_tests.cmx \
624627
ounit_tests/ounit_ident_mask_tests.cmx \
625628
ounit_tests/ounit_hashtbl_tests.cmx ounit_tests/ounit_hash_stubs_test.cmx \
626-
ounit_tests/ounit_hash_set_tests.cmx ounit_tests/ounit_bal_tree_tests.cmx \
627-
ounit_tests/ounit_array_tests.cmx ounit/oUnit.cmx \
628-
ounit_tests/ounit_tests_main.cmi
629+
ounit_tests/ounit_hash_set_tests.cmx ounit_tests/ounit_cmd_tests.cmx \
630+
ounit_tests/ounit_bal_tree_tests.cmx ounit_tests/ounit_array_tests.cmx \
631+
ounit/oUnit.cmx ounit_tests/ounit_tests_main.cmi
629632
bsb/bsb_build_schemas.cmx :
630633
bsb/bsb_build_ui.cmx : ext/string_vec.cmx ext/string_set.cmx \
631634
ext/string_map.cmx ext/ext_string.cmx ext/ext_json.cmx \

jscomp/bin/all_ounit_tests.d

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ bin/all_ounit_tests.ml : ext/set_int.mli
2020
bin/all_ounit_tests.ml : ext/set_poly.ml
2121
bin/all_ounit_tests.ml : ext/set_poly.mli
2222
bin/all_ounit_tests.ml : ounit_tests/ounit_bal_tree_tests.ml
23+
bin/all_ounit_tests.ml : ext/literals.ml
24+
bin/all_ounit_tests.ml : ext/literals.mli
25+
bin/all_ounit_tests.ml : ounit_tests/ounit_cmd_tests.ml
2326
bin/all_ounit_tests.ml : ext/ext_util.ml
2427
bin/all_ounit_tests.ml : ext/ext_util.mli
2528
bin/all_ounit_tests.ml : ext/hash_set_gen.ml
@@ -67,8 +70,6 @@ bin/all_ounit_tests.ml : ounit_tests/ounit_map_tests.ml
6770
bin/all_ounit_tests.ml : ounit_tests/ounit_ordered_hash_set_tests.ml
6871
bin/all_ounit_tests.ml : ext/ext_pervasives.ml
6972
bin/all_ounit_tests.ml : ext/ext_pervasives.mli
70-
bin/all_ounit_tests.ml : ext/literals.ml
71-
bin/all_ounit_tests.ml : ext/literals.mli
7273
bin/all_ounit_tests.ml : ext/ext_filename.ml
7374
bin/all_ounit_tests.ml : ext/ext_filename.mli
7475
bin/all_ounit_tests.ml : ounit_tests/ounit_path_tests.ml

0 commit comments

Comments
 (0)