From 41e232df9917d447845ab0a477ca8729607653f6 Mon Sep 17 00:00:00 2001 From: "yang.yu" Date: Wed, 22 Nov 2023 12:49:11 +0800 Subject: [PATCH] feat: add go specwrite test --- ci-go | 6 ++++-- kst-adoption-report | 6 ++++-- spec/go/{ => spec}/bcd_user_type_be_test.go | 0 spec/go/{ => spec}/bcd_user_type_le_test.go | 0 spec/go/{ => spec}/bits_byte_aligned_test.go | 0 spec/go/{ => spec}/bits_enum_test.go | 0 spec/go/{ => spec}/bits_seq_endian_combo_test.go | 0 spec/go/{ => spec}/bits_shift_by_b32_le_test.go | 0 spec/go/{ => spec}/bits_shift_by_b64_le_test.go | 0 spec/go/{ => spec}/bits_signed_res_b32_be_test.go | 0 spec/go/{ => spec}/bits_signed_res_b32_le_test.go | 0 spec/go/{ => spec}/bits_signed_shift_b32_le_test.go | 0 spec/go/{ => spec}/bits_signed_shift_b64_le_test.go | 0 spec/go/{ => spec}/bits_simple_le_test.go | 0 spec/go/{ => spec}/bits_simple_test.go | 0 spec/go/{ => spec}/bits_unaligned_b32_be_test.go | 0 spec/go/{ => spec}/bits_unaligned_b32_le_test.go | 0 spec/go/{ => spec}/bits_unaligned_b64_be_test.go | 0 spec/go/{ => spec}/bits_unaligned_b64_le_test.go | 0 spec/go/{ => spec}/buffered_struct_test.go | 0 spec/go/{ => spec}/bytes_pad_term_test.go | 0 spec/go/{ => spec}/combine_bool_test.go | 0 spec/go/{ => spec}/combine_bytes_test.go | 0 spec/go/{ => spec}/combine_enum_test.go | 0 spec/go/{ => spec}/combine_str_test.go | 0 spec/go/{ => spec}/debug_array_user_test.go | 0 spec/go/{ => spec}/default_big_endian_test.go | 0 spec/go/{ => spec}/default_bit_endian_mod_test.go | 0 spec/go/{ => spec}/default_endian_expr_exception_test.go | 0 spec/go/{ => spec}/default_endian_expr_inherited_test.go | 0 spec/go/{ => spec}/default_endian_expr_is_be_test.go | 0 spec/go/{ => spec}/default_endian_expr_is_le_test.go | 0 spec/go/{ => spec}/default_endian_mod_test.go | 0 spec/go/{ => spec}/docstrings_docref_multi_test.go | 0 spec/go/{ => spec}/docstrings_docref_test.go | 0 spec/go/{ => spec}/docstrings_test.go | 0 spec/go/{ => spec}/enum_0_test.go | 0 spec/go/{ => spec}/enum_1_test.go | 0 spec/go/{ => spec}/enum_deep_literals_test.go | 0 spec/go/{ => spec}/enum_deep_test.go | 0 spec/go/{ => spec}/enum_fancy_test.go | 0 spec/go/{ => spec}/enum_if_test.go | 0 spec/go/{ => spec}/enum_import_test.go | 0 spec/go/{ => spec}/enum_int_range_s_test.go | 0 spec/go/{ => spec}/enum_int_range_u_test.go | 0 spec/go/{ => spec}/enum_invalid_test.go | 0 spec/go/{ => spec}/enum_long_range_s_test.go | 0 spec/go/{ => spec}/enum_long_range_u_test.go | 0 spec/go/{ => spec}/enum_negative_test.go | 0 spec/go/{ => spec}/enum_of_value_inst_test.go | 0 spec/go/{ => spec}/enum_to_i_class_border_1_test.go | 0 spec/go/{ => spec}/enum_to_i_invalid_test.go | 0 spec/go/{ => spec}/enum_to_i_test.go | 0 spec/go/{ => spec}/eof_exception_bytes_test.go | 0 spec/go/{ => spec}/eof_exception_u4_test.go | 0 spec/go/{ => spec}/eos_exception_bytes_test.go | 0 spec/go/{ => spec}/eos_exception_u4_test.go | 0 spec/go/{ => spec}/expr_0_test.go | 0 spec/go/{ => spec}/expr_1_test.go | 0 spec/go/{ => spec}/expr_2_test.go | 0 spec/go/{ => spec}/expr_3_test.go | 0 spec/go/{ => spec}/expr_array_test.go | 0 spec/go/{ => spec}/expr_bits_test.go | 0 spec/go/{ => spec}/expr_bytes_cmp_test.go | 0 spec/go/{ => spec}/expr_bytes_non_literal_test.go | 0 spec/go/{ => spec}/expr_bytes_ops_test.go | 0 spec/go/{ => spec}/expr_calc_array_ops_test.go | 0 spec/go/{ => spec}/expr_enum_test.go | 0 spec/go/{ => spec}/expr_if_int_ops_test.go | 0 spec/go/{ => spec}/expr_int_div_test.go | 0 spec/go/{ => spec}/expr_io_eof_test.go | 0 spec/go/{ => spec}/expr_io_pos_test.go | 0 spec/go/{ => spec}/expr_mod_test.go | 0 spec/go/{ => spec}/expr_sizeof_type_0_test.go | 0 spec/go/{ => spec}/expr_sizeof_type_1_test.go | 0 spec/go/{ => spec}/expr_sizeof_value_0_test.go | 0 spec/go/{ => spec}/expr_sizeof_value_sized_test.go | 0 spec/go/{ => spec}/expr_str_encodings_test.go | 0 spec/go/{ => spec}/expr_str_ops_test.go | 0 spec/go/{ => spec}/fixed_contents_test.go | 0 spec/go/{ => spec}/fixed_struct_test.go | 0 spec/go/{ => spec}/float_to_i_test.go | 0 spec/go/{ => spec}/floating_points_test.go | 0 spec/go/{ => spec}/hello_world_test.go | 0 spec/go/{ => spec}/if_instances_test.go | 0 spec/go/{ => spec}/if_struct_test.go | 0 spec/go/{ => spec}/if_values_test.go | 0 spec/go/{ => spec}/imports0_test.go | 0 spec/go/{ => spec}/imports_abs_abs_test.go | 0 spec/go/{ => spec}/imports_abs_rel_test.go | 0 spec/go/{ => spec}/imports_abs_test.go | 0 spec/go/{ => spec}/imports_circular_a_test.go | 0 spec/go/{ => spec}/imports_rel_1_test.go | 0 spec/go/{ => spec}/index_sizes_test.go | 0 spec/go/{ => spec}/instance_io_user_test.go | 0 spec/go/{ => spec}/instance_std_array_test.go | 0 spec/go/{ => spec}/instance_std_test.go | 0 spec/go/{ => spec}/instance_user_array_test.go | 0 spec/go/{ => spec}/integers_double_overflow_test.go | 0 spec/go/{ => spec}/integers_test.go | 0 spec/go/{ => spec}/js_signed_right_shift_test.go | 0 spec/go/{ => spec}/meta_tags_test.go | 0 spec/go/{ => spec}/meta_xref_test.go | 0 spec/go/{ => spec}/multiple_use_test.go | 0 spec/go/{ => spec}/nav_parent2_test.go | 0 spec/go/{ => spec}/nav_parent3_test.go | 0 spec/go/{ => spec}/nav_parent_false2_test.go | 0 spec/go/{ => spec}/nav_parent_false_test.go | 0 spec/go/{ => spec}/nav_parent_override_test.go | 0 spec/go/{ => spec}/nav_parent_test.go | 0 spec/go/{ => spec}/nav_parent_vs_value_inst_test.go | 0 spec/go/{ => spec}/nav_root_test.go | 0 spec/go/{ => spec}/nested_same_name2_test.go | 0 spec/go/{ => spec}/nested_same_name_test.go | 0 spec/go/{ => spec}/nested_type_param_test.go | 0 spec/go/{ => spec}/nested_types2_test.go | 0 spec/go/{ => spec}/nested_types3_test.go | 0 spec/go/{ => spec}/nested_types_test.go | 0 spec/go/{ => spec}/non_standard_test.go | 0 spec/go/{ => spec}/opaque_external_type_02_parent_test.go | 0 spec/go/{ => spec}/opaque_external_type_test.go | 0 spec/go/{ => spec}/opaque_with_param_test.go | 0 spec/go/{ => spec}/params_call_extra_parens_test.go | 0 spec/go/{ => spec}/params_call_short_test.go | 0 spec/go/{ => spec}/params_def_test.go | 0 spec/go/{ => spec}/params_enum_test.go | 0 spec/go/{ => spec}/params_pass_array_str_test.go | 0 spec/go/{ => spec}/params_pass_array_usertype_test.go | 0 spec/go/{ => spec}/params_pass_bool_test.go | 0 spec/go/{ => spec}/params_pass_usertype_test.go | 0 spec/go/{ => spec}/position_abs_test.go | 0 spec/go/{ => spec}/position_in_seq_test.go | 0 spec/go/{ => spec}/position_to_end_test.go | 0 spec/go/{ => spec}/process_coerce_bytes_test.go | 0 spec/go/{ => spec}/process_coerce_usertype1_test.go | 0 spec/go/{ => spec}/process_coerce_usertype2_test.go | 0 spec/go/{ => spec}/process_custom_no_args_test.go | 0 spec/go/{ => spec}/process_custom_test.go | 0 spec/go/{ => spec}/process_repeat_bytes_test.go | 0 spec/go/{ => spec}/process_repeat_usertype_test.go | 0 spec/go/{ => spec}/process_rotate_test.go | 0 spec/go/{ => spec}/process_to_user_test.go | 0 spec/go/{ => spec}/process_xor4_const_test.go | 0 spec/go/{ => spec}/process_xor4_value_test.go | 0 spec/go/{ => spec}/process_xor_const_test.go | 0 spec/go/{ => spec}/process_xor_value_test.go | 0 spec/go/{ => spec}/repeat_eos_bit_test.go | 0 spec/go/{ => spec}/repeat_eos_struct_test.go | 0 spec/go/{ => spec}/repeat_eos_u4_test.go | 0 spec/go/{ => spec}/repeat_n_struct_test.go | 0 spec/go/{ => spec}/repeat_n_strz_double_test.go | 0 spec/go/{ => spec}/repeat_n_strz_test.go | 0 spec/go/{ => spec}/repeat_until_calc_array_type_test.go | 0 spec/go/{ => spec}/repeat_until_complex_test.go | 0 spec/go/{ => spec}/repeat_until_s4_test.go | 0 spec/go/{ => spec}/repeat_until_sized_test.go | 0 spec/go/{ => spec}/str_encodings_default_test.go | 0 spec/go/{ => spec}/str_encodings_test.go | 0 spec/go/{ => spec}/str_encodings_utf16_test.go | 0 spec/go/{ => spec}/str_eos_test.go | 0 spec/go/{ => spec}/str_literals2_test.go | 0 spec/go/{ => spec}/str_literals_test.go | 0 spec/go/{ => spec}/str_pad_term_empty_test.go | 0 spec/go/{ => spec}/str_pad_term_test.go | 0 spec/go/{ => spec}/switch_else_only_test.go | 0 spec/go/{ => spec}/switch_integers2_test.go | 0 spec/go/{ => spec}/switch_integers_test.go | 0 spec/go/{ => spec}/switch_manual_enum_invalid_test.go | 0 spec/go/{ => spec}/switch_multi_bool_ops_test.go | 0 spec/go/{ => spec}/term_bytes_test.go | 0 spec/go/{ => spec}/term_strz_test.go | 0 spec/go/{ => spec}/term_u1_val_test.go | 0 spec/go/{ => spec}/to_string_custom_test.go | 0 spec/go/{ => spec}/ts_packet_header_test.go | 0 spec/go/{ => spec}/type_int_unary_op_test.go | 0 spec/go/{ => spec}/type_ternary_2nd_falsy_test.go | 0 spec/go/{ => spec}/type_ternary_opaque_test.go | 0 spec/go/{ => spec}/type_ternary_test.go | 0 spec/go/{ => spec}/user_type_test.go | 0 spec/go/{ => spec}/valid_eq_str_encodings_test.go | 0 spec/go/{ => spec}/valid_fail_anyof_int_test.go | 0 spec/go/{ => spec}/valid_fail_contents_test.go | 0 spec/go/{ => spec}/valid_fail_eq_bytes_test.go | 0 spec/go/{ => spec}/valid_fail_eq_int_test.go | 0 spec/go/{ => spec}/valid_fail_eq_str_test.go | 0 spec/go/{ => spec}/valid_fail_expr_test.go | 0 spec/go/{ => spec}/valid_fail_inst_test.go | 0 spec/go/{ => spec}/valid_fail_max_int_test.go | 0 spec/go/{ => spec}/valid_fail_min_int_test.go | 0 spec/go/{ => spec}/valid_fail_range_bytes_test.go | 0 spec/go/{ => spec}/valid_fail_range_float_test.go | 0 spec/go/{ => spec}/valid_fail_range_int_test.go | 0 spec/go/{ => spec}/valid_fail_range_str_test.go | 0 spec/go/{ => spec}/valid_long_test.go | 0 spec/go/{ => spec}/valid_not_parsed_if_test.go | 0 spec/go/{ => spec}/valid_optional_id_test.go | 0 spec/go/{ => spec}/valid_short_test.go | 0 spec/go/{ => spec}/zlib_surrounded_test.go | 0 spec/go/{ => spec}/zlib_with_header_78_test.go | 0 .../io/kaitai/struct/testtranslator/TestTranslator.scala | 6 +++++- .../kaitai/struct/testtranslator/specgenerators/GoSG.scala | 4 ++-- 201 files changed, 15 insertions(+), 7 deletions(-) rename spec/go/{ => spec}/bcd_user_type_be_test.go (100%) rename spec/go/{ => spec}/bcd_user_type_le_test.go (100%) rename spec/go/{ => spec}/bits_byte_aligned_test.go (100%) rename spec/go/{ => spec}/bits_enum_test.go (100%) rename spec/go/{ => spec}/bits_seq_endian_combo_test.go (100%) rename spec/go/{ => spec}/bits_shift_by_b32_le_test.go (100%) rename spec/go/{ => spec}/bits_shift_by_b64_le_test.go (100%) rename spec/go/{ => spec}/bits_signed_res_b32_be_test.go (100%) rename spec/go/{ => spec}/bits_signed_res_b32_le_test.go (100%) rename spec/go/{ => spec}/bits_signed_shift_b32_le_test.go (100%) rename spec/go/{ => spec}/bits_signed_shift_b64_le_test.go (100%) rename spec/go/{ => spec}/bits_simple_le_test.go (100%) rename spec/go/{ => spec}/bits_simple_test.go (100%) rename spec/go/{ => spec}/bits_unaligned_b32_be_test.go (100%) rename spec/go/{ => spec}/bits_unaligned_b32_le_test.go (100%) rename spec/go/{ => spec}/bits_unaligned_b64_be_test.go (100%) rename spec/go/{ => spec}/bits_unaligned_b64_le_test.go (100%) rename spec/go/{ => spec}/buffered_struct_test.go (100%) rename spec/go/{ => spec}/bytes_pad_term_test.go (100%) rename spec/go/{ => spec}/combine_bool_test.go (100%) rename spec/go/{ => spec}/combine_bytes_test.go (100%) rename spec/go/{ => spec}/combine_enum_test.go (100%) rename spec/go/{ => spec}/combine_str_test.go (100%) rename spec/go/{ => spec}/debug_array_user_test.go (100%) rename spec/go/{ => spec}/default_big_endian_test.go (100%) rename spec/go/{ => spec}/default_bit_endian_mod_test.go (100%) rename spec/go/{ => spec}/default_endian_expr_exception_test.go (100%) rename spec/go/{ => spec}/default_endian_expr_inherited_test.go (100%) rename spec/go/{ => spec}/default_endian_expr_is_be_test.go (100%) rename spec/go/{ => spec}/default_endian_expr_is_le_test.go (100%) rename spec/go/{ => spec}/default_endian_mod_test.go (100%) rename spec/go/{ => spec}/docstrings_docref_multi_test.go (100%) rename spec/go/{ => spec}/docstrings_docref_test.go (100%) rename spec/go/{ => spec}/docstrings_test.go (100%) rename spec/go/{ => spec}/enum_0_test.go (100%) rename spec/go/{ => spec}/enum_1_test.go (100%) rename spec/go/{ => spec}/enum_deep_literals_test.go (100%) rename spec/go/{ => spec}/enum_deep_test.go (100%) rename spec/go/{ => spec}/enum_fancy_test.go (100%) rename spec/go/{ => spec}/enum_if_test.go (100%) rename spec/go/{ => spec}/enum_import_test.go (100%) rename spec/go/{ => spec}/enum_int_range_s_test.go (100%) rename spec/go/{ => spec}/enum_int_range_u_test.go (100%) rename spec/go/{ => spec}/enum_invalid_test.go (100%) rename spec/go/{ => spec}/enum_long_range_s_test.go (100%) rename spec/go/{ => spec}/enum_long_range_u_test.go (100%) rename spec/go/{ => spec}/enum_negative_test.go (100%) rename spec/go/{ => spec}/enum_of_value_inst_test.go (100%) rename spec/go/{ => spec}/enum_to_i_class_border_1_test.go (100%) rename spec/go/{ => spec}/enum_to_i_invalid_test.go (100%) rename spec/go/{ => spec}/enum_to_i_test.go (100%) rename spec/go/{ => spec}/eof_exception_bytes_test.go (100%) rename spec/go/{ => spec}/eof_exception_u4_test.go (100%) rename spec/go/{ => spec}/eos_exception_bytes_test.go (100%) rename spec/go/{ => spec}/eos_exception_u4_test.go (100%) rename spec/go/{ => spec}/expr_0_test.go (100%) rename spec/go/{ => spec}/expr_1_test.go (100%) rename spec/go/{ => spec}/expr_2_test.go (100%) rename spec/go/{ => spec}/expr_3_test.go (100%) rename spec/go/{ => spec}/expr_array_test.go (100%) rename spec/go/{ => spec}/expr_bits_test.go (100%) rename spec/go/{ => spec}/expr_bytes_cmp_test.go (100%) rename spec/go/{ => spec}/expr_bytes_non_literal_test.go (100%) rename spec/go/{ => spec}/expr_bytes_ops_test.go (100%) rename spec/go/{ => spec}/expr_calc_array_ops_test.go (100%) rename spec/go/{ => spec}/expr_enum_test.go (100%) rename spec/go/{ => spec}/expr_if_int_ops_test.go (100%) rename spec/go/{ => spec}/expr_int_div_test.go (100%) rename spec/go/{ => spec}/expr_io_eof_test.go (100%) rename spec/go/{ => spec}/expr_io_pos_test.go (100%) rename spec/go/{ => spec}/expr_mod_test.go (100%) rename spec/go/{ => spec}/expr_sizeof_type_0_test.go (100%) rename spec/go/{ => spec}/expr_sizeof_type_1_test.go (100%) rename spec/go/{ => spec}/expr_sizeof_value_0_test.go (100%) rename spec/go/{ => spec}/expr_sizeof_value_sized_test.go (100%) rename spec/go/{ => spec}/expr_str_encodings_test.go (100%) rename spec/go/{ => spec}/expr_str_ops_test.go (100%) rename spec/go/{ => spec}/fixed_contents_test.go (100%) rename spec/go/{ => spec}/fixed_struct_test.go (100%) rename spec/go/{ => spec}/float_to_i_test.go (100%) rename spec/go/{ => spec}/floating_points_test.go (100%) rename spec/go/{ => spec}/hello_world_test.go (100%) rename spec/go/{ => spec}/if_instances_test.go (100%) rename spec/go/{ => spec}/if_struct_test.go (100%) rename spec/go/{ => spec}/if_values_test.go (100%) rename spec/go/{ => spec}/imports0_test.go (100%) rename spec/go/{ => spec}/imports_abs_abs_test.go (100%) rename spec/go/{ => spec}/imports_abs_rel_test.go (100%) rename spec/go/{ => spec}/imports_abs_test.go (100%) rename spec/go/{ => spec}/imports_circular_a_test.go (100%) rename spec/go/{ => spec}/imports_rel_1_test.go (100%) rename spec/go/{ => spec}/index_sizes_test.go (100%) rename spec/go/{ => spec}/instance_io_user_test.go (100%) rename spec/go/{ => spec}/instance_std_array_test.go (100%) rename spec/go/{ => spec}/instance_std_test.go (100%) rename spec/go/{ => spec}/instance_user_array_test.go (100%) rename spec/go/{ => spec}/integers_double_overflow_test.go (100%) rename spec/go/{ => spec}/integers_test.go (100%) rename spec/go/{ => spec}/js_signed_right_shift_test.go (100%) rename spec/go/{ => spec}/meta_tags_test.go (100%) rename spec/go/{ => spec}/meta_xref_test.go (100%) rename spec/go/{ => spec}/multiple_use_test.go (100%) rename spec/go/{ => spec}/nav_parent2_test.go (100%) rename spec/go/{ => spec}/nav_parent3_test.go (100%) rename spec/go/{ => spec}/nav_parent_false2_test.go (100%) rename spec/go/{ => spec}/nav_parent_false_test.go (100%) rename spec/go/{ => spec}/nav_parent_override_test.go (100%) rename spec/go/{ => spec}/nav_parent_test.go (100%) rename spec/go/{ => spec}/nav_parent_vs_value_inst_test.go (100%) rename spec/go/{ => spec}/nav_root_test.go (100%) rename spec/go/{ => spec}/nested_same_name2_test.go (100%) rename spec/go/{ => spec}/nested_same_name_test.go (100%) rename spec/go/{ => spec}/nested_type_param_test.go (100%) rename spec/go/{ => spec}/nested_types2_test.go (100%) rename spec/go/{ => spec}/nested_types3_test.go (100%) rename spec/go/{ => spec}/nested_types_test.go (100%) rename spec/go/{ => spec}/non_standard_test.go (100%) rename spec/go/{ => spec}/opaque_external_type_02_parent_test.go (100%) rename spec/go/{ => spec}/opaque_external_type_test.go (100%) rename spec/go/{ => spec}/opaque_with_param_test.go (100%) rename spec/go/{ => spec}/params_call_extra_parens_test.go (100%) rename spec/go/{ => spec}/params_call_short_test.go (100%) rename spec/go/{ => spec}/params_def_test.go (100%) rename spec/go/{ => spec}/params_enum_test.go (100%) rename spec/go/{ => spec}/params_pass_array_str_test.go (100%) rename spec/go/{ => spec}/params_pass_array_usertype_test.go (100%) rename spec/go/{ => spec}/params_pass_bool_test.go (100%) rename spec/go/{ => spec}/params_pass_usertype_test.go (100%) rename spec/go/{ => spec}/position_abs_test.go (100%) rename spec/go/{ => spec}/position_in_seq_test.go (100%) rename spec/go/{ => spec}/position_to_end_test.go (100%) rename spec/go/{ => spec}/process_coerce_bytes_test.go (100%) rename spec/go/{ => spec}/process_coerce_usertype1_test.go (100%) rename spec/go/{ => spec}/process_coerce_usertype2_test.go (100%) rename spec/go/{ => spec}/process_custom_no_args_test.go (100%) rename spec/go/{ => spec}/process_custom_test.go (100%) rename spec/go/{ => spec}/process_repeat_bytes_test.go (100%) rename spec/go/{ => spec}/process_repeat_usertype_test.go (100%) rename spec/go/{ => spec}/process_rotate_test.go (100%) rename spec/go/{ => spec}/process_to_user_test.go (100%) rename spec/go/{ => spec}/process_xor4_const_test.go (100%) rename spec/go/{ => spec}/process_xor4_value_test.go (100%) rename spec/go/{ => spec}/process_xor_const_test.go (100%) rename spec/go/{ => spec}/process_xor_value_test.go (100%) rename spec/go/{ => spec}/repeat_eos_bit_test.go (100%) rename spec/go/{ => spec}/repeat_eos_struct_test.go (100%) rename spec/go/{ => spec}/repeat_eos_u4_test.go (100%) rename spec/go/{ => spec}/repeat_n_struct_test.go (100%) rename spec/go/{ => spec}/repeat_n_strz_double_test.go (100%) rename spec/go/{ => spec}/repeat_n_strz_test.go (100%) rename spec/go/{ => spec}/repeat_until_calc_array_type_test.go (100%) rename spec/go/{ => spec}/repeat_until_complex_test.go (100%) rename spec/go/{ => spec}/repeat_until_s4_test.go (100%) rename spec/go/{ => spec}/repeat_until_sized_test.go (100%) rename spec/go/{ => spec}/str_encodings_default_test.go (100%) rename spec/go/{ => spec}/str_encodings_test.go (100%) rename spec/go/{ => spec}/str_encodings_utf16_test.go (100%) rename spec/go/{ => spec}/str_eos_test.go (100%) rename spec/go/{ => spec}/str_literals2_test.go (100%) rename spec/go/{ => spec}/str_literals_test.go (100%) rename spec/go/{ => spec}/str_pad_term_empty_test.go (100%) rename spec/go/{ => spec}/str_pad_term_test.go (100%) rename spec/go/{ => spec}/switch_else_only_test.go (100%) rename spec/go/{ => spec}/switch_integers2_test.go (100%) rename spec/go/{ => spec}/switch_integers_test.go (100%) rename spec/go/{ => spec}/switch_manual_enum_invalid_test.go (100%) rename spec/go/{ => spec}/switch_multi_bool_ops_test.go (100%) rename spec/go/{ => spec}/term_bytes_test.go (100%) rename spec/go/{ => spec}/term_strz_test.go (100%) rename spec/go/{ => spec}/term_u1_val_test.go (100%) rename spec/go/{ => spec}/to_string_custom_test.go (100%) rename spec/go/{ => spec}/ts_packet_header_test.go (100%) rename spec/go/{ => spec}/type_int_unary_op_test.go (100%) rename spec/go/{ => spec}/type_ternary_2nd_falsy_test.go (100%) rename spec/go/{ => spec}/type_ternary_opaque_test.go (100%) rename spec/go/{ => spec}/type_ternary_test.go (100%) rename spec/go/{ => spec}/user_type_test.go (100%) rename spec/go/{ => spec}/valid_eq_str_encodings_test.go (100%) rename spec/go/{ => spec}/valid_fail_anyof_int_test.go (100%) rename spec/go/{ => spec}/valid_fail_contents_test.go (100%) rename spec/go/{ => spec}/valid_fail_eq_bytes_test.go (100%) rename spec/go/{ => spec}/valid_fail_eq_int_test.go (100%) rename spec/go/{ => spec}/valid_fail_eq_str_test.go (100%) rename spec/go/{ => spec}/valid_fail_expr_test.go (100%) rename spec/go/{ => spec}/valid_fail_inst_test.go (100%) rename spec/go/{ => spec}/valid_fail_max_int_test.go (100%) rename spec/go/{ => spec}/valid_fail_min_int_test.go (100%) rename spec/go/{ => spec}/valid_fail_range_bytes_test.go (100%) rename spec/go/{ => spec}/valid_fail_range_float_test.go (100%) rename spec/go/{ => spec}/valid_fail_range_int_test.go (100%) rename spec/go/{ => spec}/valid_fail_range_str_test.go (100%) rename spec/go/{ => spec}/valid_long_test.go (100%) rename spec/go/{ => spec}/valid_not_parsed_if_test.go (100%) rename spec/go/{ => spec}/valid_optional_id_test.go (100%) rename spec/go/{ => spec}/valid_short_test.go (100%) rename spec/go/{ => spec}/zlib_surrounded_test.go (100%) rename spec/go/{ => spec}/zlib_with_header_78_test.go (100%) diff --git a/ci-go b/ci-go index 41779843b..41e8b5ae2 100755 --- a/ci-go +++ b/ci-go @@ -20,8 +20,8 @@ ln -s ../../../../../../runtime/go compiled/go/src/github.com/kaitai-io/kaitai_s ABS_TEST_OUT_DIR="$(pwd)/$TEST_OUT_DIR" ABS_TEST_RUN_LOG="$ABS_TEST_OUT_DIR/go/test_run.stdout" -rm -rf "$TEST_OUT_DIR/go" -mkdir -p "$TEST_OUT_DIR/go" +rm -rf "$TEST_OUT_DIR/go" "$TEST_OUT_DIR/go-write" +mkdir -p "$TEST_OUT_DIR/go" "$TEST_OUT_DIR/go-write" ABS_SPEC_DIR="$(pwd)/spec/go" ABS_COMPILED_DIR="$(pwd)/compiled/go" @@ -95,4 +95,6 @@ COUNT_PASS=$(grep -c '^--- PASS' "$ABS_TEST_RUN_LOG") echo "Totals: $COUNT_TOTAL ran, $COUNT_PASS passed, $COUNT_FAIL failed" ./kst-adoption-report go +./kst-adoption-report go-write aggregate/convert_to_json go "$TEST_OUT_DIR/go" "$TEST_OUT_DIR/go/ci.json" +aggregate/convert_to_json go-write "$TEST_OUT_DIR/go-write" "$TEST_OUT_DIR/go-write/ci.json" diff --git a/kst-adoption-report b/kst-adoption-report index 659f78f8d..9c93ffcf2 100755 --- a/kst-adoption-report +++ b/kst-adoption-report @@ -15,7 +15,9 @@ def glob_spec_files(lang) when 'csharp' Dir.glob('spec/csharp/kaitai_struct_csharp_tests/tests/Spec*.cs') when 'go' - Dir.glob('spec/go/*_test.go') + Dir.glob('spec/go/spec/*_test.go') + when 'go-write' + Dir.glob('spec/go/specwrite/*_test.go') when 'java' Dir.glob('spec/java/src/**/spec/Test*.java') when 'java-write' @@ -51,7 +53,7 @@ def spec_file_to_test_name(lang, fn) when 'csharp' raise "Unable to extract test name from #{fn.inspect}" unless fn =~ /^Spec(.*?)\.cs$/ $1 - when 'go' + when 'go', 'go-write' raise "Unable to extract test name from #{fn.inspect}" unless fn =~ /^(.*?)_test\.go$/ underscore_to_ucamelcase($1) when 'java', 'java-write' diff --git a/spec/go/bcd_user_type_be_test.go b/spec/go/spec/bcd_user_type_be_test.go similarity index 100% rename from spec/go/bcd_user_type_be_test.go rename to spec/go/spec/bcd_user_type_be_test.go diff --git a/spec/go/bcd_user_type_le_test.go b/spec/go/spec/bcd_user_type_le_test.go similarity index 100% rename from spec/go/bcd_user_type_le_test.go rename to spec/go/spec/bcd_user_type_le_test.go diff --git a/spec/go/bits_byte_aligned_test.go b/spec/go/spec/bits_byte_aligned_test.go similarity index 100% rename from spec/go/bits_byte_aligned_test.go rename to spec/go/spec/bits_byte_aligned_test.go diff --git a/spec/go/bits_enum_test.go b/spec/go/spec/bits_enum_test.go similarity index 100% rename from spec/go/bits_enum_test.go rename to spec/go/spec/bits_enum_test.go diff --git a/spec/go/bits_seq_endian_combo_test.go b/spec/go/spec/bits_seq_endian_combo_test.go similarity index 100% rename from spec/go/bits_seq_endian_combo_test.go rename to spec/go/spec/bits_seq_endian_combo_test.go diff --git a/spec/go/bits_shift_by_b32_le_test.go b/spec/go/spec/bits_shift_by_b32_le_test.go similarity index 100% rename from spec/go/bits_shift_by_b32_le_test.go rename to spec/go/spec/bits_shift_by_b32_le_test.go diff --git a/spec/go/bits_shift_by_b64_le_test.go b/spec/go/spec/bits_shift_by_b64_le_test.go similarity index 100% rename from spec/go/bits_shift_by_b64_le_test.go rename to spec/go/spec/bits_shift_by_b64_le_test.go diff --git a/spec/go/bits_signed_res_b32_be_test.go b/spec/go/spec/bits_signed_res_b32_be_test.go similarity index 100% rename from spec/go/bits_signed_res_b32_be_test.go rename to spec/go/spec/bits_signed_res_b32_be_test.go diff --git a/spec/go/bits_signed_res_b32_le_test.go b/spec/go/spec/bits_signed_res_b32_le_test.go similarity index 100% rename from spec/go/bits_signed_res_b32_le_test.go rename to spec/go/spec/bits_signed_res_b32_le_test.go diff --git a/spec/go/bits_signed_shift_b32_le_test.go b/spec/go/spec/bits_signed_shift_b32_le_test.go similarity index 100% rename from spec/go/bits_signed_shift_b32_le_test.go rename to spec/go/spec/bits_signed_shift_b32_le_test.go diff --git a/spec/go/bits_signed_shift_b64_le_test.go b/spec/go/spec/bits_signed_shift_b64_le_test.go similarity index 100% rename from spec/go/bits_signed_shift_b64_le_test.go rename to spec/go/spec/bits_signed_shift_b64_le_test.go diff --git a/spec/go/bits_simple_le_test.go b/spec/go/spec/bits_simple_le_test.go similarity index 100% rename from spec/go/bits_simple_le_test.go rename to spec/go/spec/bits_simple_le_test.go diff --git a/spec/go/bits_simple_test.go b/spec/go/spec/bits_simple_test.go similarity index 100% rename from spec/go/bits_simple_test.go rename to spec/go/spec/bits_simple_test.go diff --git a/spec/go/bits_unaligned_b32_be_test.go b/spec/go/spec/bits_unaligned_b32_be_test.go similarity index 100% rename from spec/go/bits_unaligned_b32_be_test.go rename to spec/go/spec/bits_unaligned_b32_be_test.go diff --git a/spec/go/bits_unaligned_b32_le_test.go b/spec/go/spec/bits_unaligned_b32_le_test.go similarity index 100% rename from spec/go/bits_unaligned_b32_le_test.go rename to spec/go/spec/bits_unaligned_b32_le_test.go diff --git a/spec/go/bits_unaligned_b64_be_test.go b/spec/go/spec/bits_unaligned_b64_be_test.go similarity index 100% rename from spec/go/bits_unaligned_b64_be_test.go rename to spec/go/spec/bits_unaligned_b64_be_test.go diff --git a/spec/go/bits_unaligned_b64_le_test.go b/spec/go/spec/bits_unaligned_b64_le_test.go similarity index 100% rename from spec/go/bits_unaligned_b64_le_test.go rename to spec/go/spec/bits_unaligned_b64_le_test.go diff --git a/spec/go/buffered_struct_test.go b/spec/go/spec/buffered_struct_test.go similarity index 100% rename from spec/go/buffered_struct_test.go rename to spec/go/spec/buffered_struct_test.go diff --git a/spec/go/bytes_pad_term_test.go b/spec/go/spec/bytes_pad_term_test.go similarity index 100% rename from spec/go/bytes_pad_term_test.go rename to spec/go/spec/bytes_pad_term_test.go diff --git a/spec/go/combine_bool_test.go b/spec/go/spec/combine_bool_test.go similarity index 100% rename from spec/go/combine_bool_test.go rename to spec/go/spec/combine_bool_test.go diff --git a/spec/go/combine_bytes_test.go b/spec/go/spec/combine_bytes_test.go similarity index 100% rename from spec/go/combine_bytes_test.go rename to spec/go/spec/combine_bytes_test.go diff --git a/spec/go/combine_enum_test.go b/spec/go/spec/combine_enum_test.go similarity index 100% rename from spec/go/combine_enum_test.go rename to spec/go/spec/combine_enum_test.go diff --git a/spec/go/combine_str_test.go b/spec/go/spec/combine_str_test.go similarity index 100% rename from spec/go/combine_str_test.go rename to spec/go/spec/combine_str_test.go diff --git a/spec/go/debug_array_user_test.go b/spec/go/spec/debug_array_user_test.go similarity index 100% rename from spec/go/debug_array_user_test.go rename to spec/go/spec/debug_array_user_test.go diff --git a/spec/go/default_big_endian_test.go b/spec/go/spec/default_big_endian_test.go similarity index 100% rename from spec/go/default_big_endian_test.go rename to spec/go/spec/default_big_endian_test.go diff --git a/spec/go/default_bit_endian_mod_test.go b/spec/go/spec/default_bit_endian_mod_test.go similarity index 100% rename from spec/go/default_bit_endian_mod_test.go rename to spec/go/spec/default_bit_endian_mod_test.go diff --git a/spec/go/default_endian_expr_exception_test.go b/spec/go/spec/default_endian_expr_exception_test.go similarity index 100% rename from spec/go/default_endian_expr_exception_test.go rename to spec/go/spec/default_endian_expr_exception_test.go diff --git a/spec/go/default_endian_expr_inherited_test.go b/spec/go/spec/default_endian_expr_inherited_test.go similarity index 100% rename from spec/go/default_endian_expr_inherited_test.go rename to spec/go/spec/default_endian_expr_inherited_test.go diff --git a/spec/go/default_endian_expr_is_be_test.go b/spec/go/spec/default_endian_expr_is_be_test.go similarity index 100% rename from spec/go/default_endian_expr_is_be_test.go rename to spec/go/spec/default_endian_expr_is_be_test.go diff --git a/spec/go/default_endian_expr_is_le_test.go b/spec/go/spec/default_endian_expr_is_le_test.go similarity index 100% rename from spec/go/default_endian_expr_is_le_test.go rename to spec/go/spec/default_endian_expr_is_le_test.go diff --git a/spec/go/default_endian_mod_test.go b/spec/go/spec/default_endian_mod_test.go similarity index 100% rename from spec/go/default_endian_mod_test.go rename to spec/go/spec/default_endian_mod_test.go diff --git a/spec/go/docstrings_docref_multi_test.go b/spec/go/spec/docstrings_docref_multi_test.go similarity index 100% rename from spec/go/docstrings_docref_multi_test.go rename to spec/go/spec/docstrings_docref_multi_test.go diff --git a/spec/go/docstrings_docref_test.go b/spec/go/spec/docstrings_docref_test.go similarity index 100% rename from spec/go/docstrings_docref_test.go rename to spec/go/spec/docstrings_docref_test.go diff --git a/spec/go/docstrings_test.go b/spec/go/spec/docstrings_test.go similarity index 100% rename from spec/go/docstrings_test.go rename to spec/go/spec/docstrings_test.go diff --git a/spec/go/enum_0_test.go b/spec/go/spec/enum_0_test.go similarity index 100% rename from spec/go/enum_0_test.go rename to spec/go/spec/enum_0_test.go diff --git a/spec/go/enum_1_test.go b/spec/go/spec/enum_1_test.go similarity index 100% rename from spec/go/enum_1_test.go rename to spec/go/spec/enum_1_test.go diff --git a/spec/go/enum_deep_literals_test.go b/spec/go/spec/enum_deep_literals_test.go similarity index 100% rename from spec/go/enum_deep_literals_test.go rename to spec/go/spec/enum_deep_literals_test.go diff --git a/spec/go/enum_deep_test.go b/spec/go/spec/enum_deep_test.go similarity index 100% rename from spec/go/enum_deep_test.go rename to spec/go/spec/enum_deep_test.go diff --git a/spec/go/enum_fancy_test.go b/spec/go/spec/enum_fancy_test.go similarity index 100% rename from spec/go/enum_fancy_test.go rename to spec/go/spec/enum_fancy_test.go diff --git a/spec/go/enum_if_test.go b/spec/go/spec/enum_if_test.go similarity index 100% rename from spec/go/enum_if_test.go rename to spec/go/spec/enum_if_test.go diff --git a/spec/go/enum_import_test.go b/spec/go/spec/enum_import_test.go similarity index 100% rename from spec/go/enum_import_test.go rename to spec/go/spec/enum_import_test.go diff --git a/spec/go/enum_int_range_s_test.go b/spec/go/spec/enum_int_range_s_test.go similarity index 100% rename from spec/go/enum_int_range_s_test.go rename to spec/go/spec/enum_int_range_s_test.go diff --git a/spec/go/enum_int_range_u_test.go b/spec/go/spec/enum_int_range_u_test.go similarity index 100% rename from spec/go/enum_int_range_u_test.go rename to spec/go/spec/enum_int_range_u_test.go diff --git a/spec/go/enum_invalid_test.go b/spec/go/spec/enum_invalid_test.go similarity index 100% rename from spec/go/enum_invalid_test.go rename to spec/go/spec/enum_invalid_test.go diff --git a/spec/go/enum_long_range_s_test.go b/spec/go/spec/enum_long_range_s_test.go similarity index 100% rename from spec/go/enum_long_range_s_test.go rename to spec/go/spec/enum_long_range_s_test.go diff --git a/spec/go/enum_long_range_u_test.go b/spec/go/spec/enum_long_range_u_test.go similarity index 100% rename from spec/go/enum_long_range_u_test.go rename to spec/go/spec/enum_long_range_u_test.go diff --git a/spec/go/enum_negative_test.go b/spec/go/spec/enum_negative_test.go similarity index 100% rename from spec/go/enum_negative_test.go rename to spec/go/spec/enum_negative_test.go diff --git a/spec/go/enum_of_value_inst_test.go b/spec/go/spec/enum_of_value_inst_test.go similarity index 100% rename from spec/go/enum_of_value_inst_test.go rename to spec/go/spec/enum_of_value_inst_test.go diff --git a/spec/go/enum_to_i_class_border_1_test.go b/spec/go/spec/enum_to_i_class_border_1_test.go similarity index 100% rename from spec/go/enum_to_i_class_border_1_test.go rename to spec/go/spec/enum_to_i_class_border_1_test.go diff --git a/spec/go/enum_to_i_invalid_test.go b/spec/go/spec/enum_to_i_invalid_test.go similarity index 100% rename from spec/go/enum_to_i_invalid_test.go rename to spec/go/spec/enum_to_i_invalid_test.go diff --git a/spec/go/enum_to_i_test.go b/spec/go/spec/enum_to_i_test.go similarity index 100% rename from spec/go/enum_to_i_test.go rename to spec/go/spec/enum_to_i_test.go diff --git a/spec/go/eof_exception_bytes_test.go b/spec/go/spec/eof_exception_bytes_test.go similarity index 100% rename from spec/go/eof_exception_bytes_test.go rename to spec/go/spec/eof_exception_bytes_test.go diff --git a/spec/go/eof_exception_u4_test.go b/spec/go/spec/eof_exception_u4_test.go similarity index 100% rename from spec/go/eof_exception_u4_test.go rename to spec/go/spec/eof_exception_u4_test.go diff --git a/spec/go/eos_exception_bytes_test.go b/spec/go/spec/eos_exception_bytes_test.go similarity index 100% rename from spec/go/eos_exception_bytes_test.go rename to spec/go/spec/eos_exception_bytes_test.go diff --git a/spec/go/eos_exception_u4_test.go b/spec/go/spec/eos_exception_u4_test.go similarity index 100% rename from spec/go/eos_exception_u4_test.go rename to spec/go/spec/eos_exception_u4_test.go diff --git a/spec/go/expr_0_test.go b/spec/go/spec/expr_0_test.go similarity index 100% rename from spec/go/expr_0_test.go rename to spec/go/spec/expr_0_test.go diff --git a/spec/go/expr_1_test.go b/spec/go/spec/expr_1_test.go similarity index 100% rename from spec/go/expr_1_test.go rename to spec/go/spec/expr_1_test.go diff --git a/spec/go/expr_2_test.go b/spec/go/spec/expr_2_test.go similarity index 100% rename from spec/go/expr_2_test.go rename to spec/go/spec/expr_2_test.go diff --git a/spec/go/expr_3_test.go b/spec/go/spec/expr_3_test.go similarity index 100% rename from spec/go/expr_3_test.go rename to spec/go/spec/expr_3_test.go diff --git a/spec/go/expr_array_test.go b/spec/go/spec/expr_array_test.go similarity index 100% rename from spec/go/expr_array_test.go rename to spec/go/spec/expr_array_test.go diff --git a/spec/go/expr_bits_test.go b/spec/go/spec/expr_bits_test.go similarity index 100% rename from spec/go/expr_bits_test.go rename to spec/go/spec/expr_bits_test.go diff --git a/spec/go/expr_bytes_cmp_test.go b/spec/go/spec/expr_bytes_cmp_test.go similarity index 100% rename from spec/go/expr_bytes_cmp_test.go rename to spec/go/spec/expr_bytes_cmp_test.go diff --git a/spec/go/expr_bytes_non_literal_test.go b/spec/go/spec/expr_bytes_non_literal_test.go similarity index 100% rename from spec/go/expr_bytes_non_literal_test.go rename to spec/go/spec/expr_bytes_non_literal_test.go diff --git a/spec/go/expr_bytes_ops_test.go b/spec/go/spec/expr_bytes_ops_test.go similarity index 100% rename from spec/go/expr_bytes_ops_test.go rename to spec/go/spec/expr_bytes_ops_test.go diff --git a/spec/go/expr_calc_array_ops_test.go b/spec/go/spec/expr_calc_array_ops_test.go similarity index 100% rename from spec/go/expr_calc_array_ops_test.go rename to spec/go/spec/expr_calc_array_ops_test.go diff --git a/spec/go/expr_enum_test.go b/spec/go/spec/expr_enum_test.go similarity index 100% rename from spec/go/expr_enum_test.go rename to spec/go/spec/expr_enum_test.go diff --git a/spec/go/expr_if_int_ops_test.go b/spec/go/spec/expr_if_int_ops_test.go similarity index 100% rename from spec/go/expr_if_int_ops_test.go rename to spec/go/spec/expr_if_int_ops_test.go diff --git a/spec/go/expr_int_div_test.go b/spec/go/spec/expr_int_div_test.go similarity index 100% rename from spec/go/expr_int_div_test.go rename to spec/go/spec/expr_int_div_test.go diff --git a/spec/go/expr_io_eof_test.go b/spec/go/spec/expr_io_eof_test.go similarity index 100% rename from spec/go/expr_io_eof_test.go rename to spec/go/spec/expr_io_eof_test.go diff --git a/spec/go/expr_io_pos_test.go b/spec/go/spec/expr_io_pos_test.go similarity index 100% rename from spec/go/expr_io_pos_test.go rename to spec/go/spec/expr_io_pos_test.go diff --git a/spec/go/expr_mod_test.go b/spec/go/spec/expr_mod_test.go similarity index 100% rename from spec/go/expr_mod_test.go rename to spec/go/spec/expr_mod_test.go diff --git a/spec/go/expr_sizeof_type_0_test.go b/spec/go/spec/expr_sizeof_type_0_test.go similarity index 100% rename from spec/go/expr_sizeof_type_0_test.go rename to spec/go/spec/expr_sizeof_type_0_test.go diff --git a/spec/go/expr_sizeof_type_1_test.go b/spec/go/spec/expr_sizeof_type_1_test.go similarity index 100% rename from spec/go/expr_sizeof_type_1_test.go rename to spec/go/spec/expr_sizeof_type_1_test.go diff --git a/spec/go/expr_sizeof_value_0_test.go b/spec/go/spec/expr_sizeof_value_0_test.go similarity index 100% rename from spec/go/expr_sizeof_value_0_test.go rename to spec/go/spec/expr_sizeof_value_0_test.go diff --git a/spec/go/expr_sizeof_value_sized_test.go b/spec/go/spec/expr_sizeof_value_sized_test.go similarity index 100% rename from spec/go/expr_sizeof_value_sized_test.go rename to spec/go/spec/expr_sizeof_value_sized_test.go diff --git a/spec/go/expr_str_encodings_test.go b/spec/go/spec/expr_str_encodings_test.go similarity index 100% rename from spec/go/expr_str_encodings_test.go rename to spec/go/spec/expr_str_encodings_test.go diff --git a/spec/go/expr_str_ops_test.go b/spec/go/spec/expr_str_ops_test.go similarity index 100% rename from spec/go/expr_str_ops_test.go rename to spec/go/spec/expr_str_ops_test.go diff --git a/spec/go/fixed_contents_test.go b/spec/go/spec/fixed_contents_test.go similarity index 100% rename from spec/go/fixed_contents_test.go rename to spec/go/spec/fixed_contents_test.go diff --git a/spec/go/fixed_struct_test.go b/spec/go/spec/fixed_struct_test.go similarity index 100% rename from spec/go/fixed_struct_test.go rename to spec/go/spec/fixed_struct_test.go diff --git a/spec/go/float_to_i_test.go b/spec/go/spec/float_to_i_test.go similarity index 100% rename from spec/go/float_to_i_test.go rename to spec/go/spec/float_to_i_test.go diff --git a/spec/go/floating_points_test.go b/spec/go/spec/floating_points_test.go similarity index 100% rename from spec/go/floating_points_test.go rename to spec/go/spec/floating_points_test.go diff --git a/spec/go/hello_world_test.go b/spec/go/spec/hello_world_test.go similarity index 100% rename from spec/go/hello_world_test.go rename to spec/go/spec/hello_world_test.go diff --git a/spec/go/if_instances_test.go b/spec/go/spec/if_instances_test.go similarity index 100% rename from spec/go/if_instances_test.go rename to spec/go/spec/if_instances_test.go diff --git a/spec/go/if_struct_test.go b/spec/go/spec/if_struct_test.go similarity index 100% rename from spec/go/if_struct_test.go rename to spec/go/spec/if_struct_test.go diff --git a/spec/go/if_values_test.go b/spec/go/spec/if_values_test.go similarity index 100% rename from spec/go/if_values_test.go rename to spec/go/spec/if_values_test.go diff --git a/spec/go/imports0_test.go b/spec/go/spec/imports0_test.go similarity index 100% rename from spec/go/imports0_test.go rename to spec/go/spec/imports0_test.go diff --git a/spec/go/imports_abs_abs_test.go b/spec/go/spec/imports_abs_abs_test.go similarity index 100% rename from spec/go/imports_abs_abs_test.go rename to spec/go/spec/imports_abs_abs_test.go diff --git a/spec/go/imports_abs_rel_test.go b/spec/go/spec/imports_abs_rel_test.go similarity index 100% rename from spec/go/imports_abs_rel_test.go rename to spec/go/spec/imports_abs_rel_test.go diff --git a/spec/go/imports_abs_test.go b/spec/go/spec/imports_abs_test.go similarity index 100% rename from spec/go/imports_abs_test.go rename to spec/go/spec/imports_abs_test.go diff --git a/spec/go/imports_circular_a_test.go b/spec/go/spec/imports_circular_a_test.go similarity index 100% rename from spec/go/imports_circular_a_test.go rename to spec/go/spec/imports_circular_a_test.go diff --git a/spec/go/imports_rel_1_test.go b/spec/go/spec/imports_rel_1_test.go similarity index 100% rename from spec/go/imports_rel_1_test.go rename to spec/go/spec/imports_rel_1_test.go diff --git a/spec/go/index_sizes_test.go b/spec/go/spec/index_sizes_test.go similarity index 100% rename from spec/go/index_sizes_test.go rename to spec/go/spec/index_sizes_test.go diff --git a/spec/go/instance_io_user_test.go b/spec/go/spec/instance_io_user_test.go similarity index 100% rename from spec/go/instance_io_user_test.go rename to spec/go/spec/instance_io_user_test.go diff --git a/spec/go/instance_std_array_test.go b/spec/go/spec/instance_std_array_test.go similarity index 100% rename from spec/go/instance_std_array_test.go rename to spec/go/spec/instance_std_array_test.go diff --git a/spec/go/instance_std_test.go b/spec/go/spec/instance_std_test.go similarity index 100% rename from spec/go/instance_std_test.go rename to spec/go/spec/instance_std_test.go diff --git a/spec/go/instance_user_array_test.go b/spec/go/spec/instance_user_array_test.go similarity index 100% rename from spec/go/instance_user_array_test.go rename to spec/go/spec/instance_user_array_test.go diff --git a/spec/go/integers_double_overflow_test.go b/spec/go/spec/integers_double_overflow_test.go similarity index 100% rename from spec/go/integers_double_overflow_test.go rename to spec/go/spec/integers_double_overflow_test.go diff --git a/spec/go/integers_test.go b/spec/go/spec/integers_test.go similarity index 100% rename from spec/go/integers_test.go rename to spec/go/spec/integers_test.go diff --git a/spec/go/js_signed_right_shift_test.go b/spec/go/spec/js_signed_right_shift_test.go similarity index 100% rename from spec/go/js_signed_right_shift_test.go rename to spec/go/spec/js_signed_right_shift_test.go diff --git a/spec/go/meta_tags_test.go b/spec/go/spec/meta_tags_test.go similarity index 100% rename from spec/go/meta_tags_test.go rename to spec/go/spec/meta_tags_test.go diff --git a/spec/go/meta_xref_test.go b/spec/go/spec/meta_xref_test.go similarity index 100% rename from spec/go/meta_xref_test.go rename to spec/go/spec/meta_xref_test.go diff --git a/spec/go/multiple_use_test.go b/spec/go/spec/multiple_use_test.go similarity index 100% rename from spec/go/multiple_use_test.go rename to spec/go/spec/multiple_use_test.go diff --git a/spec/go/nav_parent2_test.go b/spec/go/spec/nav_parent2_test.go similarity index 100% rename from spec/go/nav_parent2_test.go rename to spec/go/spec/nav_parent2_test.go diff --git a/spec/go/nav_parent3_test.go b/spec/go/spec/nav_parent3_test.go similarity index 100% rename from spec/go/nav_parent3_test.go rename to spec/go/spec/nav_parent3_test.go diff --git a/spec/go/nav_parent_false2_test.go b/spec/go/spec/nav_parent_false2_test.go similarity index 100% rename from spec/go/nav_parent_false2_test.go rename to spec/go/spec/nav_parent_false2_test.go diff --git a/spec/go/nav_parent_false_test.go b/spec/go/spec/nav_parent_false_test.go similarity index 100% rename from spec/go/nav_parent_false_test.go rename to spec/go/spec/nav_parent_false_test.go diff --git a/spec/go/nav_parent_override_test.go b/spec/go/spec/nav_parent_override_test.go similarity index 100% rename from spec/go/nav_parent_override_test.go rename to spec/go/spec/nav_parent_override_test.go diff --git a/spec/go/nav_parent_test.go b/spec/go/spec/nav_parent_test.go similarity index 100% rename from spec/go/nav_parent_test.go rename to spec/go/spec/nav_parent_test.go diff --git a/spec/go/nav_parent_vs_value_inst_test.go b/spec/go/spec/nav_parent_vs_value_inst_test.go similarity index 100% rename from spec/go/nav_parent_vs_value_inst_test.go rename to spec/go/spec/nav_parent_vs_value_inst_test.go diff --git a/spec/go/nav_root_test.go b/spec/go/spec/nav_root_test.go similarity index 100% rename from spec/go/nav_root_test.go rename to spec/go/spec/nav_root_test.go diff --git a/spec/go/nested_same_name2_test.go b/spec/go/spec/nested_same_name2_test.go similarity index 100% rename from spec/go/nested_same_name2_test.go rename to spec/go/spec/nested_same_name2_test.go diff --git a/spec/go/nested_same_name_test.go b/spec/go/spec/nested_same_name_test.go similarity index 100% rename from spec/go/nested_same_name_test.go rename to spec/go/spec/nested_same_name_test.go diff --git a/spec/go/nested_type_param_test.go b/spec/go/spec/nested_type_param_test.go similarity index 100% rename from spec/go/nested_type_param_test.go rename to spec/go/spec/nested_type_param_test.go diff --git a/spec/go/nested_types2_test.go b/spec/go/spec/nested_types2_test.go similarity index 100% rename from spec/go/nested_types2_test.go rename to spec/go/spec/nested_types2_test.go diff --git a/spec/go/nested_types3_test.go b/spec/go/spec/nested_types3_test.go similarity index 100% rename from spec/go/nested_types3_test.go rename to spec/go/spec/nested_types3_test.go diff --git a/spec/go/nested_types_test.go b/spec/go/spec/nested_types_test.go similarity index 100% rename from spec/go/nested_types_test.go rename to spec/go/spec/nested_types_test.go diff --git a/spec/go/non_standard_test.go b/spec/go/spec/non_standard_test.go similarity index 100% rename from spec/go/non_standard_test.go rename to spec/go/spec/non_standard_test.go diff --git a/spec/go/opaque_external_type_02_parent_test.go b/spec/go/spec/opaque_external_type_02_parent_test.go similarity index 100% rename from spec/go/opaque_external_type_02_parent_test.go rename to spec/go/spec/opaque_external_type_02_parent_test.go diff --git a/spec/go/opaque_external_type_test.go b/spec/go/spec/opaque_external_type_test.go similarity index 100% rename from spec/go/opaque_external_type_test.go rename to spec/go/spec/opaque_external_type_test.go diff --git a/spec/go/opaque_with_param_test.go b/spec/go/spec/opaque_with_param_test.go similarity index 100% rename from spec/go/opaque_with_param_test.go rename to spec/go/spec/opaque_with_param_test.go diff --git a/spec/go/params_call_extra_parens_test.go b/spec/go/spec/params_call_extra_parens_test.go similarity index 100% rename from spec/go/params_call_extra_parens_test.go rename to spec/go/spec/params_call_extra_parens_test.go diff --git a/spec/go/params_call_short_test.go b/spec/go/spec/params_call_short_test.go similarity index 100% rename from spec/go/params_call_short_test.go rename to spec/go/spec/params_call_short_test.go diff --git a/spec/go/params_def_test.go b/spec/go/spec/params_def_test.go similarity index 100% rename from spec/go/params_def_test.go rename to spec/go/spec/params_def_test.go diff --git a/spec/go/params_enum_test.go b/spec/go/spec/params_enum_test.go similarity index 100% rename from spec/go/params_enum_test.go rename to spec/go/spec/params_enum_test.go diff --git a/spec/go/params_pass_array_str_test.go b/spec/go/spec/params_pass_array_str_test.go similarity index 100% rename from spec/go/params_pass_array_str_test.go rename to spec/go/spec/params_pass_array_str_test.go diff --git a/spec/go/params_pass_array_usertype_test.go b/spec/go/spec/params_pass_array_usertype_test.go similarity index 100% rename from spec/go/params_pass_array_usertype_test.go rename to spec/go/spec/params_pass_array_usertype_test.go diff --git a/spec/go/params_pass_bool_test.go b/spec/go/spec/params_pass_bool_test.go similarity index 100% rename from spec/go/params_pass_bool_test.go rename to spec/go/spec/params_pass_bool_test.go diff --git a/spec/go/params_pass_usertype_test.go b/spec/go/spec/params_pass_usertype_test.go similarity index 100% rename from spec/go/params_pass_usertype_test.go rename to spec/go/spec/params_pass_usertype_test.go diff --git a/spec/go/position_abs_test.go b/spec/go/spec/position_abs_test.go similarity index 100% rename from spec/go/position_abs_test.go rename to spec/go/spec/position_abs_test.go diff --git a/spec/go/position_in_seq_test.go b/spec/go/spec/position_in_seq_test.go similarity index 100% rename from spec/go/position_in_seq_test.go rename to spec/go/spec/position_in_seq_test.go diff --git a/spec/go/position_to_end_test.go b/spec/go/spec/position_to_end_test.go similarity index 100% rename from spec/go/position_to_end_test.go rename to spec/go/spec/position_to_end_test.go diff --git a/spec/go/process_coerce_bytes_test.go b/spec/go/spec/process_coerce_bytes_test.go similarity index 100% rename from spec/go/process_coerce_bytes_test.go rename to spec/go/spec/process_coerce_bytes_test.go diff --git a/spec/go/process_coerce_usertype1_test.go b/spec/go/spec/process_coerce_usertype1_test.go similarity index 100% rename from spec/go/process_coerce_usertype1_test.go rename to spec/go/spec/process_coerce_usertype1_test.go diff --git a/spec/go/process_coerce_usertype2_test.go b/spec/go/spec/process_coerce_usertype2_test.go similarity index 100% rename from spec/go/process_coerce_usertype2_test.go rename to spec/go/spec/process_coerce_usertype2_test.go diff --git a/spec/go/process_custom_no_args_test.go b/spec/go/spec/process_custom_no_args_test.go similarity index 100% rename from spec/go/process_custom_no_args_test.go rename to spec/go/spec/process_custom_no_args_test.go diff --git a/spec/go/process_custom_test.go b/spec/go/spec/process_custom_test.go similarity index 100% rename from spec/go/process_custom_test.go rename to spec/go/spec/process_custom_test.go diff --git a/spec/go/process_repeat_bytes_test.go b/spec/go/spec/process_repeat_bytes_test.go similarity index 100% rename from spec/go/process_repeat_bytes_test.go rename to spec/go/spec/process_repeat_bytes_test.go diff --git a/spec/go/process_repeat_usertype_test.go b/spec/go/spec/process_repeat_usertype_test.go similarity index 100% rename from spec/go/process_repeat_usertype_test.go rename to spec/go/spec/process_repeat_usertype_test.go diff --git a/spec/go/process_rotate_test.go b/spec/go/spec/process_rotate_test.go similarity index 100% rename from spec/go/process_rotate_test.go rename to spec/go/spec/process_rotate_test.go diff --git a/spec/go/process_to_user_test.go b/spec/go/spec/process_to_user_test.go similarity index 100% rename from spec/go/process_to_user_test.go rename to spec/go/spec/process_to_user_test.go diff --git a/spec/go/process_xor4_const_test.go b/spec/go/spec/process_xor4_const_test.go similarity index 100% rename from spec/go/process_xor4_const_test.go rename to spec/go/spec/process_xor4_const_test.go diff --git a/spec/go/process_xor4_value_test.go b/spec/go/spec/process_xor4_value_test.go similarity index 100% rename from spec/go/process_xor4_value_test.go rename to spec/go/spec/process_xor4_value_test.go diff --git a/spec/go/process_xor_const_test.go b/spec/go/spec/process_xor_const_test.go similarity index 100% rename from spec/go/process_xor_const_test.go rename to spec/go/spec/process_xor_const_test.go diff --git a/spec/go/process_xor_value_test.go b/spec/go/spec/process_xor_value_test.go similarity index 100% rename from spec/go/process_xor_value_test.go rename to spec/go/spec/process_xor_value_test.go diff --git a/spec/go/repeat_eos_bit_test.go b/spec/go/spec/repeat_eos_bit_test.go similarity index 100% rename from spec/go/repeat_eos_bit_test.go rename to spec/go/spec/repeat_eos_bit_test.go diff --git a/spec/go/repeat_eos_struct_test.go b/spec/go/spec/repeat_eos_struct_test.go similarity index 100% rename from spec/go/repeat_eos_struct_test.go rename to spec/go/spec/repeat_eos_struct_test.go diff --git a/spec/go/repeat_eos_u4_test.go b/spec/go/spec/repeat_eos_u4_test.go similarity index 100% rename from spec/go/repeat_eos_u4_test.go rename to spec/go/spec/repeat_eos_u4_test.go diff --git a/spec/go/repeat_n_struct_test.go b/spec/go/spec/repeat_n_struct_test.go similarity index 100% rename from spec/go/repeat_n_struct_test.go rename to spec/go/spec/repeat_n_struct_test.go diff --git a/spec/go/repeat_n_strz_double_test.go b/spec/go/spec/repeat_n_strz_double_test.go similarity index 100% rename from spec/go/repeat_n_strz_double_test.go rename to spec/go/spec/repeat_n_strz_double_test.go diff --git a/spec/go/repeat_n_strz_test.go b/spec/go/spec/repeat_n_strz_test.go similarity index 100% rename from spec/go/repeat_n_strz_test.go rename to spec/go/spec/repeat_n_strz_test.go diff --git a/spec/go/repeat_until_calc_array_type_test.go b/spec/go/spec/repeat_until_calc_array_type_test.go similarity index 100% rename from spec/go/repeat_until_calc_array_type_test.go rename to spec/go/spec/repeat_until_calc_array_type_test.go diff --git a/spec/go/repeat_until_complex_test.go b/spec/go/spec/repeat_until_complex_test.go similarity index 100% rename from spec/go/repeat_until_complex_test.go rename to spec/go/spec/repeat_until_complex_test.go diff --git a/spec/go/repeat_until_s4_test.go b/spec/go/spec/repeat_until_s4_test.go similarity index 100% rename from spec/go/repeat_until_s4_test.go rename to spec/go/spec/repeat_until_s4_test.go diff --git a/spec/go/repeat_until_sized_test.go b/spec/go/spec/repeat_until_sized_test.go similarity index 100% rename from spec/go/repeat_until_sized_test.go rename to spec/go/spec/repeat_until_sized_test.go diff --git a/spec/go/str_encodings_default_test.go b/spec/go/spec/str_encodings_default_test.go similarity index 100% rename from spec/go/str_encodings_default_test.go rename to spec/go/spec/str_encodings_default_test.go diff --git a/spec/go/str_encodings_test.go b/spec/go/spec/str_encodings_test.go similarity index 100% rename from spec/go/str_encodings_test.go rename to spec/go/spec/str_encodings_test.go diff --git a/spec/go/str_encodings_utf16_test.go b/spec/go/spec/str_encodings_utf16_test.go similarity index 100% rename from spec/go/str_encodings_utf16_test.go rename to spec/go/spec/str_encodings_utf16_test.go diff --git a/spec/go/str_eos_test.go b/spec/go/spec/str_eos_test.go similarity index 100% rename from spec/go/str_eos_test.go rename to spec/go/spec/str_eos_test.go diff --git a/spec/go/str_literals2_test.go b/spec/go/spec/str_literals2_test.go similarity index 100% rename from spec/go/str_literals2_test.go rename to spec/go/spec/str_literals2_test.go diff --git a/spec/go/str_literals_test.go b/spec/go/spec/str_literals_test.go similarity index 100% rename from spec/go/str_literals_test.go rename to spec/go/spec/str_literals_test.go diff --git a/spec/go/str_pad_term_empty_test.go b/spec/go/spec/str_pad_term_empty_test.go similarity index 100% rename from spec/go/str_pad_term_empty_test.go rename to spec/go/spec/str_pad_term_empty_test.go diff --git a/spec/go/str_pad_term_test.go b/spec/go/spec/str_pad_term_test.go similarity index 100% rename from spec/go/str_pad_term_test.go rename to spec/go/spec/str_pad_term_test.go diff --git a/spec/go/switch_else_only_test.go b/spec/go/spec/switch_else_only_test.go similarity index 100% rename from spec/go/switch_else_only_test.go rename to spec/go/spec/switch_else_only_test.go diff --git a/spec/go/switch_integers2_test.go b/spec/go/spec/switch_integers2_test.go similarity index 100% rename from spec/go/switch_integers2_test.go rename to spec/go/spec/switch_integers2_test.go diff --git a/spec/go/switch_integers_test.go b/spec/go/spec/switch_integers_test.go similarity index 100% rename from spec/go/switch_integers_test.go rename to spec/go/spec/switch_integers_test.go diff --git a/spec/go/switch_manual_enum_invalid_test.go b/spec/go/spec/switch_manual_enum_invalid_test.go similarity index 100% rename from spec/go/switch_manual_enum_invalid_test.go rename to spec/go/spec/switch_manual_enum_invalid_test.go diff --git a/spec/go/switch_multi_bool_ops_test.go b/spec/go/spec/switch_multi_bool_ops_test.go similarity index 100% rename from spec/go/switch_multi_bool_ops_test.go rename to spec/go/spec/switch_multi_bool_ops_test.go diff --git a/spec/go/term_bytes_test.go b/spec/go/spec/term_bytes_test.go similarity index 100% rename from spec/go/term_bytes_test.go rename to spec/go/spec/term_bytes_test.go diff --git a/spec/go/term_strz_test.go b/spec/go/spec/term_strz_test.go similarity index 100% rename from spec/go/term_strz_test.go rename to spec/go/spec/term_strz_test.go diff --git a/spec/go/term_u1_val_test.go b/spec/go/spec/term_u1_val_test.go similarity index 100% rename from spec/go/term_u1_val_test.go rename to spec/go/spec/term_u1_val_test.go diff --git a/spec/go/to_string_custom_test.go b/spec/go/spec/to_string_custom_test.go similarity index 100% rename from spec/go/to_string_custom_test.go rename to spec/go/spec/to_string_custom_test.go diff --git a/spec/go/ts_packet_header_test.go b/spec/go/spec/ts_packet_header_test.go similarity index 100% rename from spec/go/ts_packet_header_test.go rename to spec/go/spec/ts_packet_header_test.go diff --git a/spec/go/type_int_unary_op_test.go b/spec/go/spec/type_int_unary_op_test.go similarity index 100% rename from spec/go/type_int_unary_op_test.go rename to spec/go/spec/type_int_unary_op_test.go diff --git a/spec/go/type_ternary_2nd_falsy_test.go b/spec/go/spec/type_ternary_2nd_falsy_test.go similarity index 100% rename from spec/go/type_ternary_2nd_falsy_test.go rename to spec/go/spec/type_ternary_2nd_falsy_test.go diff --git a/spec/go/type_ternary_opaque_test.go b/spec/go/spec/type_ternary_opaque_test.go similarity index 100% rename from spec/go/type_ternary_opaque_test.go rename to spec/go/spec/type_ternary_opaque_test.go diff --git a/spec/go/type_ternary_test.go b/spec/go/spec/type_ternary_test.go similarity index 100% rename from spec/go/type_ternary_test.go rename to spec/go/spec/type_ternary_test.go diff --git a/spec/go/user_type_test.go b/spec/go/spec/user_type_test.go similarity index 100% rename from spec/go/user_type_test.go rename to spec/go/spec/user_type_test.go diff --git a/spec/go/valid_eq_str_encodings_test.go b/spec/go/spec/valid_eq_str_encodings_test.go similarity index 100% rename from spec/go/valid_eq_str_encodings_test.go rename to spec/go/spec/valid_eq_str_encodings_test.go diff --git a/spec/go/valid_fail_anyof_int_test.go b/spec/go/spec/valid_fail_anyof_int_test.go similarity index 100% rename from spec/go/valid_fail_anyof_int_test.go rename to spec/go/spec/valid_fail_anyof_int_test.go diff --git a/spec/go/valid_fail_contents_test.go b/spec/go/spec/valid_fail_contents_test.go similarity index 100% rename from spec/go/valid_fail_contents_test.go rename to spec/go/spec/valid_fail_contents_test.go diff --git a/spec/go/valid_fail_eq_bytes_test.go b/spec/go/spec/valid_fail_eq_bytes_test.go similarity index 100% rename from spec/go/valid_fail_eq_bytes_test.go rename to spec/go/spec/valid_fail_eq_bytes_test.go diff --git a/spec/go/valid_fail_eq_int_test.go b/spec/go/spec/valid_fail_eq_int_test.go similarity index 100% rename from spec/go/valid_fail_eq_int_test.go rename to spec/go/spec/valid_fail_eq_int_test.go diff --git a/spec/go/valid_fail_eq_str_test.go b/spec/go/spec/valid_fail_eq_str_test.go similarity index 100% rename from spec/go/valid_fail_eq_str_test.go rename to spec/go/spec/valid_fail_eq_str_test.go diff --git a/spec/go/valid_fail_expr_test.go b/spec/go/spec/valid_fail_expr_test.go similarity index 100% rename from spec/go/valid_fail_expr_test.go rename to spec/go/spec/valid_fail_expr_test.go diff --git a/spec/go/valid_fail_inst_test.go b/spec/go/spec/valid_fail_inst_test.go similarity index 100% rename from spec/go/valid_fail_inst_test.go rename to spec/go/spec/valid_fail_inst_test.go diff --git a/spec/go/valid_fail_max_int_test.go b/spec/go/spec/valid_fail_max_int_test.go similarity index 100% rename from spec/go/valid_fail_max_int_test.go rename to spec/go/spec/valid_fail_max_int_test.go diff --git a/spec/go/valid_fail_min_int_test.go b/spec/go/spec/valid_fail_min_int_test.go similarity index 100% rename from spec/go/valid_fail_min_int_test.go rename to spec/go/spec/valid_fail_min_int_test.go diff --git a/spec/go/valid_fail_range_bytes_test.go b/spec/go/spec/valid_fail_range_bytes_test.go similarity index 100% rename from spec/go/valid_fail_range_bytes_test.go rename to spec/go/spec/valid_fail_range_bytes_test.go diff --git a/spec/go/valid_fail_range_float_test.go b/spec/go/spec/valid_fail_range_float_test.go similarity index 100% rename from spec/go/valid_fail_range_float_test.go rename to spec/go/spec/valid_fail_range_float_test.go diff --git a/spec/go/valid_fail_range_int_test.go b/spec/go/spec/valid_fail_range_int_test.go similarity index 100% rename from spec/go/valid_fail_range_int_test.go rename to spec/go/spec/valid_fail_range_int_test.go diff --git a/spec/go/valid_fail_range_str_test.go b/spec/go/spec/valid_fail_range_str_test.go similarity index 100% rename from spec/go/valid_fail_range_str_test.go rename to spec/go/spec/valid_fail_range_str_test.go diff --git a/spec/go/valid_long_test.go b/spec/go/spec/valid_long_test.go similarity index 100% rename from spec/go/valid_long_test.go rename to spec/go/spec/valid_long_test.go diff --git a/spec/go/valid_not_parsed_if_test.go b/spec/go/spec/valid_not_parsed_if_test.go similarity index 100% rename from spec/go/valid_not_parsed_if_test.go rename to spec/go/spec/valid_not_parsed_if_test.go diff --git a/spec/go/valid_optional_id_test.go b/spec/go/spec/valid_optional_id_test.go similarity index 100% rename from spec/go/valid_optional_id_test.go rename to spec/go/spec/valid_optional_id_test.go diff --git a/spec/go/valid_short_test.go b/spec/go/spec/valid_short_test.go similarity index 100% rename from spec/go/valid_short_test.go rename to spec/go/spec/valid_short_test.go diff --git a/spec/go/zlib_surrounded_test.go b/spec/go/spec/zlib_surrounded_test.go similarity index 100% rename from spec/go/zlib_surrounded_test.go rename to spec/go/spec/zlib_surrounded_test.go diff --git a/spec/go/zlib_with_header_78_test.go b/spec/go/spec/zlib_with_header_78_test.go similarity index 100% rename from spec/go/zlib_with_header_78_test.go rename to spec/go/spec/zlib_with_header_78_test.go diff --git a/translator/src/main/scala/io/kaitai/struct/testtranslator/TestTranslator.scala b/translator/src/main/scala/io/kaitai/struct/testtranslator/TestTranslator.scala index 14824b8a5..7d3652140 100644 --- a/translator/src/main/scala/io/kaitai/struct/testtranslator/TestTranslator.scala +++ b/translator/src/main/scala/io/kaitai/struct/testtranslator/TestTranslator.scala @@ -112,7 +112,11 @@ class TestTranslator(options: CLIOptions) { case "cpp_stl_98" => new CppStlSG(testSpec, provider, CppRuntimeConfig().copyAsCpp98()) case "cpp_stl_11" => new CppStlSG(testSpec, provider, CppRuntimeConfig().copyAsCpp11()) case "csharp" => new CSharpSG(testSpec, provider) - case "go" => new GoSG(testSpec, provider) + case "go" => if (options.readWrite) { + new GoWriteSG(testSpec, provider) + } else { + new GoSG(testSpec, provider) + } case "java" => if (options.readWrite) { new JavaWriteSG(testSpec, provider) } else { diff --git a/translator/src/main/scala/io/kaitai/struct/testtranslator/specgenerators/GoSG.scala b/translator/src/main/scala/io/kaitai/struct/testtranslator/specgenerators/GoSG.scala index 20cf6d926..eb8988b00 100644 --- a/translator/src/main/scala/io/kaitai/struct/testtranslator/specgenerators/GoSG.scala +++ b/translator/src/main/scala/io/kaitai/struct/testtranslator/specgenerators/GoSG.scala @@ -1,6 +1,6 @@ package io.kaitai.struct.testtranslator.specgenerators -import _root_.io.kaitai.struct.datatype.{DataType, KSError} +import _root_.io.kaitai.struct.datatype.{DataType, KSError, EndOfStreamError} import _root_.io.kaitai.struct.exprlang.Ast import _root_.io.kaitai.struct.languages.GoCompiler import _root_.io.kaitai.struct.testtranslator.{Main, TestAssert, TestEquals, TestSpec} @@ -34,7 +34,7 @@ class GoSG(spec: TestSpec, provider: ClassTypeProvider) extends BaseGenerator(sp val className = GoCompiler.types2class(List(spec.id)) val translator = new GoTranslator(new GoOutputWriter(out), provider, importList) - override def fileName(name: String): String = s"${name}_test.go" + override def fileName(name: String): String = s"spec/${name}_test.go" importList.add("\"runtime/debug\"") importList.add("\"os\"")