From 6a32c810703f4ec0c39fe18298ebe6c40acac8f1 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 9 Jan 2023 23:47:03 +0200 Subject: [PATCH] tests: extract slow tests (prod, valgrind, inout, repl etc), from vlib/v/tests/ to vlib/v/slow_tests/ (#16892) --- TESTS.md | 6 +- cmd/tools/vtest-cleancode.v | 6 +- cmd/tools/vtest-self.v | 14 ++--- cmd/tools/vvet/vvet.v | 2 +- vlib/.vdocignore | 1 + vlib/net/address.v | 23 +++++-- vlib/net/http/header_test.v | 60 +++++++++---------- vlib/net/tcp_test.v | 14 ++--- vlib/net/urllib/urllib_test.v | 14 ++--- .../assembly/asm_test.amd64.v | 2 +- .../assembly/asm_test.i386.v | 0 .../assembly/naked_attr_test.amd64.v | 0 .../assembly/naked_attr_test.i386.v | 0 .../assembly/util/dot_amd64_util.amd64.v | 0 .../comptime_if_expr_threads_test.v | 0 .../crun_mode/crun_test.v | 0 vlib/v/{tests => slow_tests}/inout/.gitignore | 0 .../{tests => slow_tests}/inout/bad_st_as.out | 0 vlib/v/slow_tests/inout/bad_st_as.vv | 20 +++++++ .../inout/cli_command_no_execute.out | 0 .../inout/cli_command_no_execute.vv | 2 +- .../inout/cli_root_default_help.out | 0 .../inout/cli_root_default_help.vv | 4 +- .../inout/closure_with_fn_variables.out | 0 .../inout/closure_with_fn_variables.vv | 0 .../inout/closure_with_nested_closure_var.out | 0 .../inout/closure_with_nested_closure_var.vv | 4 +- .../inout/compiler_test.v | 2 +- .../inout/comptime_bool_fields.out | 0 .../inout/comptime_bool_fields.vv | 0 .../inout/comptime_if_script_mode.out | 0 .../inout/comptime_if_script_mode.vv | 5 ++ .../inout/data_obj.v.templ | 0 vlib/v/slow_tests/inout/dump_expression.out | 32 ++++++++++ .../inout/dump_expression.vv | 6 +- .../inout/dump_generic_fn_mut_arg.out | 1 + .../inout/dump_generic_fn_mut_arg.vv | 0 .../inout/dump_generic_interface_ref_arg.out | 6 ++ .../inout/dump_generic_interface_ref_arg.vv | 0 vlib/v/slow_tests/inout/dump_match_expr.out | 1 + .../inout/dump_match_expr.vv | 0 vlib/v/slow_tests/inout/dump_multiple_ptr.out | 4 ++ .../inout/dump_multiple_ptr.vv | 0 .../dump_nested_generic_fn_call_ref_arg.out | 23 +++++++ .../dump_nested_generic_fn_call_ref_arg.vv | 8 +-- vlib/v/slow_tests/inout/dump_nil_voidptr.out | 2 + .../inout/dump_nil_voidptr.vv | 2 +- vlib/v/slow_tests/inout/dump_none.out | 1 + .../{tests => slow_tests}/inout/dump_none.vv | 0 vlib/v/slow_tests/inout/dump_shared_arg.out | 3 + .../inout/dump_shared_arg.vv | 0 .../inout/dump_sumtype_of_fntype.out | 1 + .../inout/dump_sumtype_of_fntype.vv | 0 .../{tests => slow_tests}/inout/embedded.html | 0 .../inout/enum_print.out | 0 .../{tests => slow_tests}/inout/enum_print.vv | 4 +- vlib/v/{tests => slow_tests}/inout/file.html | 0 vlib/v/{tests => slow_tests}/inout/file.md | 0 .../inout/fixed_array_index.out | 0 .../inout/fixed_array_index.vv | 2 +- .../inout/fixed_array_slice.out | 0 .../inout/fixed_array_slice.vv | 2 +- vlib/v/{tests => slow_tests}/inout/footer.md | 0 .../inout/generic_fn_with_array_arg.out | 0 .../inout/generic_fn_with_array_arg.vv | 0 .../{tests => slow_tests}/inout/go_print.out | 0 .../v/{tests => slow_tests}/inout/go_print.vv | 4 +- vlib/v/{tests => slow_tests}/inout/header.md | 0 vlib/v/{tests => slow_tests}/inout/hello.out | 0 vlib/v/{tests => slow_tests}/inout/hello.vv | 0 .../inout/hello_devs.out | 0 vlib/v/slow_tests/inout/hello_devs.vv | 7 +++ .../inout/nested_generic_fn_call.out | 0 .../inout/nested_generic_fn_call.vv | 0 .../inout/nested_structs.out | 0 .../inout/nested_structs.vv | 2 +- .../inout/option_fn_arg.out | 0 .../inout/option_fn_arg.vv | 0 vlib/v/{tests => slow_tests}/inout/os.out | 0 vlib/v/{tests => slow_tests}/inout/os.vv | 0 .../inout/panic_with_cg.out | 2 +- .../inout/panic_with_cg.vv | 5 +- .../inout/printing_alias_has_str_method.out | 0 .../inout/printing_alias_has_str_method.vv | 2 +- .../printing_aliases_of_multi_fixed_array.out | 0 .../printing_aliases_of_multi_fixed_array.vv | 0 .../printing_complex_if_exprs_output.out | 0 .../inout/printing_complex_if_exprs_output.vv | 0 .../inout/printing_comptime_if.out | 0 .../inout/printing_comptime_if.vv | 2 +- .../printing_fixed_array_of_pointers.out | 0 .../inout/printing_fixed_array_of_pointers.vv | 0 .../inout/printing_for_v_in_a.out | 0 .../inout/printing_for_v_in_a.vv | 2 +- .../inout/printing_multi_fixed_array.out | 0 .../inout/printing_multi_fixed_array.vv | 0 .../inout/printing_nested_generic_struct.out | 0 .../inout/printing_nested_generic_struct.vv | 0 .../inout/printing_option_in_if_expr.out | 0 .../inout/printing_option_in_if_expr.vv | 0 .../inout/printing_reference_alias.out | 0 .../inout/printing_reference_alias.vv | 0 .../inout/printing_reference_enum.out | 0 .../inout/printing_reference_enum.vv | 0 .../inout/printing_reference_struct.out | 0 .../inout/printing_reference_struct.vv | 2 +- .../inout/printing_result_in_infix_expr.out | 0 .../inout/printing_result_in_infix_expr.vv | 0 .../inout/printing_result_in_infix_expr2.out | 0 .../inout/printing_result_in_infix_expr2.vv | 0 ...printing_slice_of_multiline_raw_string.out | 0 .../printing_slice_of_multiline_raw_string.vv | 0 .../printing_struct_with_skip_fields.out | 0 .../inout/printing_struct_with_skip_fields.vv | 0 .../inout/printing_sumtype_with_none.out | 0 .../inout/printing_sumtype_with_none.vv | 0 .../inout/push_on_closed_channel.out | 0 .../inout/push_on_closed_channel.vv | 0 .../inout/push_work_on_channel.out | 0 .../inout/push_work_on_channel.vv | 4 +- .../inout/smart_quote.out | 0 .../inout/smart_quote.vv | 0 .../inout/strconv_v_printf.out | 0 .../inout/strconv_v_printf.vv | 2 +- .../inout/string_interp.out | 0 .../inout/string_interp.vv | 2 +- .../slow_tests/inout/struct_field_option.out | 26 ++++++++ .../inout/struct_field_option.vv | 0 .../inout/sumtype_with_fntype.out | 0 .../inout/sumtype_with_fntype.vv | 0 .../inout/tmpl_all_in_one_folder.out | 0 .../inout/tmpl_all_in_one_folder.vv | 0 .../inout/tmpl_expand_v_source_code.out | 0 .../inout/tmpl_expand_v_source_code.vv | 17 ++++++ .../inout/tmpl_parse_html.out | 0 .../inout/tmpl_parse_html.vv | 0 .../inout/vscript_using_generics_in_os.out | 0 .../inout/vscript_using_generics_in_os.vsh | 0 .../keep_args_alive_test.v | 2 +- .../keep_args_alive_test_c.h | 0 .../modules/acommentedmodule/commentedfile.v | 0 vlib/v/{tests => slow_tests}/prod/.gitignore | 0 .../prod/asserts_should_be_skipped.prod.v | 0 ...erts_should_be_skipped.prod.v.expected.txt | 0 .../v/{tests => slow_tests}/prod/assoc.prod.v | 0 .../prod/assoc.prod.v.expected.txt | 0 ...expressions_should_not_round_as_f32.prod.v | 0 ...hould_not_round_as_f32.prod.v.expected.txt | 0 vlib/v/{tests => slow_tests}/prod_test.v | 2 +- .../profile/profile_test.v | 6 +- .../profile/profile_test_1.v | 0 .../profile/profile_test_2.v | 0 .../profile/profile_test_3.v | 0 .../{tests => slow_tests}/repl/.gitattributes | 0 vlib/v/{tests => slow_tests}/repl/.gitignore | 0 vlib/v/{tests => slow_tests}/repl/README.md | 0 .../repl/array_filter.repl | 0 .../repl/array_init.repl | 0 .../repl/array_method.repl | 0 .../repl/bad_in_type.repl.skip | 0 .../repl/chained_fields/bd.repl.skip | 0 .../repl/chained_fields/c.repl.skip | 0 .../repl/chained_fields/c2.repl.skip | 0 .../repl/chained_fields/d.repl.skip | 0 .../repl/chained_fields/ef.repl.skip | 0 .../repl/comptime_tmpl.repl | 0 .../repl/conditional_blocks/for.repl | 0 .../repl/conditional_blocks/if.repl | 0 .../repl/conditional_blocks/if_else.repl | 0 .../repl/default_printing.repl | 0 .../repl/empty_struct.repl.skip | 0 .../repl/entire_commented_module.repl | 7 +++ vlib/v/{tests => slow_tests}/repl/error.repl | 0 .../repl/error_and_continue_print.repl | 0 .../repl/error_exitasdfasdf.repl | 0 .../repl/error_nosave.repl.skip | 0 .../{tests => slow_tests}/repl/fn_calls.repl | 0 .../repl/function.repl.skip | 0 .../immutable_len_fields/fields.1.repl.skip | 0 .../immutable_len_fields/fields.2.repl.skip | 0 .../immutable_len_fields/fields.3.repl.skip | 0 vlib/v/{tests => slow_tests}/repl/import.repl | 0 .../repl/import_alias.repl | 0 .../repl/naked_strings.repl | 0 .../{tests => slow_tests}/repl/newlines.repl | 0 vlib/v/{tests => slow_tests}/repl/nomain.repl | 0 .../v/{tests => slow_tests}/repl/nothing.repl | 0 .../repl/open_close_string_check.repl | 0 .../repl/option.repl.skip | 0 .../repl/option_call.repl | 0 .../repl/postfix_operators.repl | 0 .../repl/print_and_fn_call.repl | 0 .../v/{tests => slow_tests}/repl/println.repl | 0 vlib/v/{tests => slow_tests}/repl/repl_test.v | 8 +-- .../repl/runner/runner.v | 2 +- .../{tests => slow_tests}/repl/tmpl/hello.txt | 0 .../{tests => slow_tests}/repl/var_decl.repl | 0 .../repl/void_vlib_fncall.repl | 0 .../f1.v | 0 .../f2.v | 0 .../main.v | 0 .../a.v | 0 .../b.v | 0 .../any_test.v | 0 .../main.v | 0 .../run_project_folders_test.v | 4 +- .../valgrind/1.strings_and_arrays.v | 0 .../valgrind/2.heap_objects.v | 0 .../array_init_with_string_variable.v | 0 .../v/{tests => slow_tests}/valgrind/base64.v | 0 .../buffer_passed_in_fn_that_uses_tos_on_it.v | 0 .../valgrind/dump_nested_structs.v | 0 .../valgrind/fn_returning_string_param.v | 0 .../fn_with_return_should_free_local_vars.v | 0 .../valgrind/free_heap_foos.v | 0 ...e_variables_in_reverse_order_of_creation.v | 0 .../{tests => slow_tests}/valgrind/if_expr.v | 0 .../valgrind/if_expr_skip.v | 0 .../import_os_and_use_its_constants.v | 0 .../valgrind/import_x_json2.v | 0 .../{tests => slow_tests}/valgrind/logging.v | 0 .../valgrind/option_reassigned.v | 0 .../valgrind/option_simple.v | 0 .../valgrind/rand_module.v | 0 .../valgrind/rune_methods.v | 0 .../valgrind/simple_interpolation.v | 0 .../simple_interpolation_script_mode.v | 0 ...le_interpolation_script_mode_more_scopes.v | 0 .../valgrind/string_plus_string_plus.v | 0 .../valgrind/string_str_method.v | 0 .../valgrind/strings_builder.v | 0 .../valgrind/struct_field.v | 0 .../valgrind/struct_of_array_of_same_struct.v | 0 .../valgrind/valgrind_test.v | 22 +++---- vlib/v/tests/inout/bad_st_as.vv | 13 ---- vlib/v/tests/inout/comptime_if_script_mode.vv | 5 -- vlib/v/tests/inout/dump_expression.out | 32 ---------- .../v/tests/inout/dump_generic_fn_mut_arg.out | 1 - .../inout/dump_generic_interface_ref_arg.out | 6 -- vlib/v/tests/inout/dump_match_expr.out | 1 - vlib/v/tests/inout/dump_multiple_ptr.out | 4 -- .../dump_nested_generic_fn_call_ref_arg.out | 23 ------- vlib/v/tests/inout/dump_nil_voidptr.out | 2 - vlib/v/tests/inout/dump_none.out | 1 - vlib/v/tests/inout/dump_shared_arg.out | 3 - vlib/v/tests/inout/dump_sumtype_of_fntype.out | 1 - vlib/v/tests/inout/hello_devs.vv | 7 --- vlib/v/tests/inout/struct_field_option.out | 26 -------- .../tests/inout/tmpl_expand_v_source_code.vv | 18 ------ vlib/v/tests/known_errors/known_errors_test.v | 2 +- .../v/tests/repl/entire_commented_module.repl | 7 --- 251 files changed, 291 insertions(+), 270 deletions(-) rename vlib/v/{tests => slow_tests}/assembly/asm_test.amd64.v (99%) rename vlib/v/{tests => slow_tests}/assembly/asm_test.i386.v (100%) rename vlib/v/{tests => slow_tests}/assembly/naked_attr_test.amd64.v (100%) rename vlib/v/{tests => slow_tests}/assembly/naked_attr_test.i386.v (100%) rename vlib/v/{tests => slow_tests}/assembly/util/dot_amd64_util.amd64.v (100%) rename vlib/v/{tests => slow_tests}/comptime_if_expr_threads_test.v (100%) rename vlib/v/{tests => slow_tests}/crun_mode/crun_test.v (100%) rename vlib/v/{tests => slow_tests}/inout/.gitignore (100%) rename vlib/v/{tests => slow_tests}/inout/bad_st_as.out (100%) create mode 100644 vlib/v/slow_tests/inout/bad_st_as.vv rename vlib/v/{tests => slow_tests}/inout/cli_command_no_execute.out (100%) rename vlib/v/{tests => slow_tests}/inout/cli_command_no_execute.vv (83%) rename vlib/v/{tests => slow_tests}/inout/cli_root_default_help.out (100%) rename vlib/v/{tests => slow_tests}/inout/cli_root_default_help.vv (60%) rename vlib/v/{tests => slow_tests}/inout/closure_with_fn_variables.out (100%) rename vlib/v/{tests => slow_tests}/inout/closure_with_fn_variables.vv (100%) rename vlib/v/{tests => slow_tests}/inout/closure_with_nested_closure_var.out (100%) rename vlib/v/{tests => slow_tests}/inout/closure_with_nested_closure_var.vv (80%) rename vlib/v/{tests => slow_tests}/inout/compiler_test.v (98%) rename vlib/v/{tests => slow_tests}/inout/comptime_bool_fields.out (100%) rename vlib/v/{tests => slow_tests}/inout/comptime_bool_fields.vv (100%) rename vlib/v/{tests => slow_tests}/inout/comptime_if_script_mode.out (100%) create mode 100644 vlib/v/slow_tests/inout/comptime_if_script_mode.vv rename vlib/v/{tests => slow_tests}/inout/data_obj.v.templ (100%) create mode 100644 vlib/v/slow_tests/inout/dump_expression.out rename vlib/v/{tests => slow_tests}/inout/dump_expression.vv (95%) create mode 100644 vlib/v/slow_tests/inout/dump_generic_fn_mut_arg.out rename vlib/v/{tests => slow_tests}/inout/dump_generic_fn_mut_arg.vv (100%) create mode 100644 vlib/v/slow_tests/inout/dump_generic_interface_ref_arg.out rename vlib/v/{tests => slow_tests}/inout/dump_generic_interface_ref_arg.vv (100%) create mode 100644 vlib/v/slow_tests/inout/dump_match_expr.out rename vlib/v/{tests => slow_tests}/inout/dump_match_expr.vv (100%) create mode 100644 vlib/v/slow_tests/inout/dump_multiple_ptr.out rename vlib/v/{tests => slow_tests}/inout/dump_multiple_ptr.vv (100%) create mode 100644 vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.out rename vlib/v/{tests => slow_tests}/inout/dump_nested_generic_fn_call_ref_arg.vv (82%) create mode 100644 vlib/v/slow_tests/inout/dump_nil_voidptr.out rename vlib/v/{tests => slow_tests}/inout/dump_nil_voidptr.vv (86%) create mode 100644 vlib/v/slow_tests/inout/dump_none.out rename vlib/v/{tests => slow_tests}/inout/dump_none.vv (100%) create mode 100644 vlib/v/slow_tests/inout/dump_shared_arg.out rename vlib/v/{tests => slow_tests}/inout/dump_shared_arg.vv (100%) create mode 100644 vlib/v/slow_tests/inout/dump_sumtype_of_fntype.out rename vlib/v/{tests => slow_tests}/inout/dump_sumtype_of_fntype.vv (100%) rename vlib/v/{tests => slow_tests}/inout/embedded.html (100%) rename vlib/v/{tests => slow_tests}/inout/enum_print.out (100%) rename vlib/v/{tests => slow_tests}/inout/enum_print.vv (92%) rename vlib/v/{tests => slow_tests}/inout/file.html (100%) rename vlib/v/{tests => slow_tests}/inout/file.md (100%) rename vlib/v/{tests => slow_tests}/inout/fixed_array_index.out (100%) rename vlib/v/{tests => slow_tests}/inout/fixed_array_index.vv (69%) rename vlib/v/{tests => slow_tests}/inout/fixed_array_slice.out (100%) rename vlib/v/{tests => slow_tests}/inout/fixed_array_slice.vv (59%) rename vlib/v/{tests => slow_tests}/inout/footer.md (100%) rename vlib/v/{tests => slow_tests}/inout/generic_fn_with_array_arg.out (100%) rename vlib/v/{tests => slow_tests}/inout/generic_fn_with_array_arg.vv (100%) rename vlib/v/{tests => slow_tests}/inout/go_print.out (100%) rename vlib/v/{tests => slow_tests}/inout/go_print.vv (61%) rename vlib/v/{tests => slow_tests}/inout/header.md (100%) rename vlib/v/{tests => slow_tests}/inout/hello.out (100%) rename vlib/v/{tests => slow_tests}/inout/hello.vv (100%) rename vlib/v/{tests => slow_tests}/inout/hello_devs.out (100%) create mode 100644 vlib/v/slow_tests/inout/hello_devs.vv rename vlib/v/{tests => slow_tests}/inout/nested_generic_fn_call.out (100%) rename vlib/v/{tests => slow_tests}/inout/nested_generic_fn_call.vv (100%) rename vlib/v/{tests => slow_tests}/inout/nested_structs.out (100%) rename vlib/v/{tests => slow_tests}/inout/nested_structs.vv (94%) rename vlib/v/{tests => slow_tests}/inout/option_fn_arg.out (100%) rename vlib/v/{tests => slow_tests}/inout/option_fn_arg.vv (100%) rename vlib/v/{tests => slow_tests}/inout/os.out (100%) rename vlib/v/{tests => slow_tests}/inout/os.vv (100%) rename vlib/v/{tests => slow_tests}/inout/panic_with_cg.out (66%) rename vlib/v/{tests => slow_tests}/inout/panic_with_cg.vv (59%) rename vlib/v/{tests => slow_tests}/inout/printing_alias_has_str_method.out (100%) rename vlib/v/{tests => slow_tests}/inout/printing_alias_has_str_method.vv (87%) rename vlib/v/{tests => slow_tests}/inout/printing_aliases_of_multi_fixed_array.out (100%) rename vlib/v/{tests => slow_tests}/inout/printing_aliases_of_multi_fixed_array.vv (100%) rename vlib/v/{tests => slow_tests}/inout/printing_complex_if_exprs_output.out (100%) rename vlib/v/{tests => slow_tests}/inout/printing_complex_if_exprs_output.vv (100%) rename vlib/v/{tests => slow_tests}/inout/printing_comptime_if.out (100%) rename vlib/v/{tests => slow_tests}/inout/printing_comptime_if.vv (74%) rename vlib/v/{tests => slow_tests}/inout/printing_fixed_array_of_pointers.out (100%) rename vlib/v/{tests => slow_tests}/inout/printing_fixed_array_of_pointers.vv (100%) rename vlib/v/{tests => slow_tests}/inout/printing_for_v_in_a.out (100%) rename vlib/v/{tests => slow_tests}/inout/printing_for_v_in_a.vv (90%) rename vlib/v/{tests => slow_tests}/inout/printing_multi_fixed_array.out (100%) rename vlib/v/{tests => slow_tests}/inout/printing_multi_fixed_array.vv (100%) rename vlib/v/{tests => slow_tests}/inout/printing_nested_generic_struct.out (100%) rename vlib/v/{tests => slow_tests}/inout/printing_nested_generic_struct.vv (100%) rename vlib/v/{tests => slow_tests}/inout/printing_option_in_if_expr.out (100%) rename vlib/v/{tests => slow_tests}/inout/printing_option_in_if_expr.vv (100%) rename vlib/v/{tests => slow_tests}/inout/printing_reference_alias.out (100%) rename vlib/v/{tests => slow_tests}/inout/printing_reference_alias.vv (100%) rename vlib/v/{tests => slow_tests}/inout/printing_reference_enum.out (100%) rename vlib/v/{tests => slow_tests}/inout/printing_reference_enum.vv (100%) rename vlib/v/{tests => slow_tests}/inout/printing_reference_struct.out (100%) rename vlib/v/{tests => slow_tests}/inout/printing_reference_struct.vv (81%) rename vlib/v/{tests => slow_tests}/inout/printing_result_in_infix_expr.out (100%) rename vlib/v/{tests => slow_tests}/inout/printing_result_in_infix_expr.vv (100%) rename vlib/v/{tests => slow_tests}/inout/printing_result_in_infix_expr2.out (100%) rename vlib/v/{tests => slow_tests}/inout/printing_result_in_infix_expr2.vv (100%) rename vlib/v/{tests => slow_tests}/inout/printing_slice_of_multiline_raw_string.out (100%) rename vlib/v/{tests => slow_tests}/inout/printing_slice_of_multiline_raw_string.vv (100%) rename vlib/v/{tests => slow_tests}/inout/printing_struct_with_skip_fields.out (100%) rename vlib/v/{tests => slow_tests}/inout/printing_struct_with_skip_fields.vv (100%) rename vlib/v/{tests => slow_tests}/inout/printing_sumtype_with_none.out (100%) rename vlib/v/{tests => slow_tests}/inout/printing_sumtype_with_none.vv (100%) rename vlib/v/{tests => slow_tests}/inout/push_on_closed_channel.out (100%) rename vlib/v/{tests => slow_tests}/inout/push_on_closed_channel.vv (100%) rename vlib/v/{tests => slow_tests}/inout/push_work_on_channel.out (100%) rename vlib/v/{tests => slow_tests}/inout/push_work_on_channel.vv (88%) rename vlib/v/{tests => slow_tests}/inout/smart_quote.out (100%) rename vlib/v/{tests => slow_tests}/inout/smart_quote.vv (100%) rename vlib/v/{tests => slow_tests}/inout/strconv_v_printf.out (100%) rename vlib/v/{tests => slow_tests}/inout/strconv_v_printf.vv (94%) rename vlib/v/{tests => slow_tests}/inout/string_interp.out (100%) rename vlib/v/{tests => slow_tests}/inout/string_interp.vv (60%) create mode 100644 vlib/v/slow_tests/inout/struct_field_option.out rename vlib/v/{tests => slow_tests}/inout/struct_field_option.vv (100%) rename vlib/v/{tests => slow_tests}/inout/sumtype_with_fntype.out (100%) rename vlib/v/{tests => slow_tests}/inout/sumtype_with_fntype.vv (100%) rename vlib/v/{tests => slow_tests}/inout/tmpl_all_in_one_folder.out (100%) rename vlib/v/{tests => slow_tests}/inout/tmpl_all_in_one_folder.vv (100%) rename vlib/v/{tests => slow_tests}/inout/tmpl_expand_v_source_code.out (100%) create mode 100644 vlib/v/slow_tests/inout/tmpl_expand_v_source_code.vv rename vlib/v/{tests => slow_tests}/inout/tmpl_parse_html.out (100%) rename vlib/v/{tests => slow_tests}/inout/tmpl_parse_html.vv (100%) rename vlib/v/{tests => slow_tests}/inout/vscript_using_generics_in_os.out (100%) rename vlib/v/{tests => slow_tests}/inout/vscript_using_generics_in_os.vsh (100%) rename vlib/v/{tests => slow_tests}/keep_args_alive_test.v (97%) rename vlib/v/{tests => slow_tests}/keep_args_alive_test_c.h (100%) rename vlib/v/{tests => slow_tests}/modules/acommentedmodule/commentedfile.v (100%) rename vlib/v/{tests => slow_tests}/prod/.gitignore (100%) rename vlib/v/{tests => slow_tests}/prod/asserts_should_be_skipped.prod.v (100%) rename vlib/v/{tests => slow_tests}/prod/asserts_should_be_skipped.prod.v.expected.txt (100%) rename vlib/v/{tests => slow_tests}/prod/assoc.prod.v (100%) rename vlib/v/{tests => slow_tests}/prod/assoc.prod.v.expected.txt (100%) rename vlib/v/{tests => slow_tests}/prod/f64_literals_and_simple_expressions_should_not_round_as_f32.prod.v (100%) rename vlib/v/{tests => slow_tests}/prod/f64_literals_and_simple_expressions_should_not_round_as_f32.prod.v.expected.txt (100%) rename vlib/v/{tests => slow_tests}/prod_test.v (95%) rename vlib/v/{tests => slow_tests}/profile/profile_test.v (92%) rename vlib/v/{tests => slow_tests}/profile/profile_test_1.v (100%) rename vlib/v/{tests => slow_tests}/profile/profile_test_2.v (100%) rename vlib/v/{tests => slow_tests}/profile/profile_test_3.v (100%) rename vlib/v/{tests => slow_tests}/repl/.gitattributes (100%) rename vlib/v/{tests => slow_tests}/repl/.gitignore (100%) rename vlib/v/{tests => slow_tests}/repl/README.md (100%) rename vlib/v/{tests => slow_tests}/repl/array_filter.repl (100%) rename vlib/v/{tests => slow_tests}/repl/array_init.repl (100%) rename vlib/v/{tests => slow_tests}/repl/array_method.repl (100%) rename vlib/v/{tests => slow_tests}/repl/bad_in_type.repl.skip (100%) rename vlib/v/{tests => slow_tests}/repl/chained_fields/bd.repl.skip (100%) rename vlib/v/{tests => slow_tests}/repl/chained_fields/c.repl.skip (100%) rename vlib/v/{tests => slow_tests}/repl/chained_fields/c2.repl.skip (100%) rename vlib/v/{tests => slow_tests}/repl/chained_fields/d.repl.skip (100%) rename vlib/v/{tests => slow_tests}/repl/chained_fields/ef.repl.skip (100%) rename vlib/v/{tests => slow_tests}/repl/comptime_tmpl.repl (100%) rename vlib/v/{tests => slow_tests}/repl/conditional_blocks/for.repl (100%) rename vlib/v/{tests => slow_tests}/repl/conditional_blocks/if.repl (100%) rename vlib/v/{tests => slow_tests}/repl/conditional_blocks/if_else.repl (100%) rename vlib/v/{tests => slow_tests}/repl/default_printing.repl (100%) rename vlib/v/{tests => slow_tests}/repl/empty_struct.repl.skip (100%) create mode 100644 vlib/v/slow_tests/repl/entire_commented_module.repl rename vlib/v/{tests => slow_tests}/repl/error.repl (100%) rename vlib/v/{tests => slow_tests}/repl/error_and_continue_print.repl (100%) rename vlib/v/{tests => slow_tests}/repl/error_exitasdfasdf.repl (100%) rename vlib/v/{tests => slow_tests}/repl/error_nosave.repl.skip (100%) rename vlib/v/{tests => slow_tests}/repl/fn_calls.repl (100%) rename vlib/v/{tests => slow_tests}/repl/function.repl.skip (100%) rename vlib/v/{tests => slow_tests}/repl/immutable_len_fields/fields.1.repl.skip (100%) rename vlib/v/{tests => slow_tests}/repl/immutable_len_fields/fields.2.repl.skip (100%) rename vlib/v/{tests => slow_tests}/repl/immutable_len_fields/fields.3.repl.skip (100%) rename vlib/v/{tests => slow_tests}/repl/import.repl (100%) rename vlib/v/{tests => slow_tests}/repl/import_alias.repl (100%) rename vlib/v/{tests => slow_tests}/repl/naked_strings.repl (100%) rename vlib/v/{tests => slow_tests}/repl/newlines.repl (100%) rename vlib/v/{tests => slow_tests}/repl/nomain.repl (100%) rename vlib/v/{tests => slow_tests}/repl/nothing.repl (100%) rename vlib/v/{tests => slow_tests}/repl/open_close_string_check.repl (100%) rename vlib/v/{tests => slow_tests}/repl/option.repl.skip (100%) rename vlib/v/{tests => slow_tests}/repl/option_call.repl (100%) rename vlib/v/{tests => slow_tests}/repl/postfix_operators.repl (100%) rename vlib/v/{tests => slow_tests}/repl/print_and_fn_call.repl (100%) rename vlib/v/{tests => slow_tests}/repl/println.repl (100%) rename vlib/v/{tests => slow_tests}/repl/repl_test.v (93%) rename vlib/v/{tests => slow_tests}/repl/runner/runner.v (97%) rename vlib/v/{tests => slow_tests}/repl/tmpl/hello.txt (100%) rename vlib/v/{tests => slow_tests}/repl/var_decl.repl (100%) rename vlib/v/{tests => slow_tests}/repl/void_vlib_fncall.repl (100%) rename vlib/v/{tests => slow_tests}/run_project_folders/go_fns_in_different_files_over_the_same_struct/f1.v (100%) rename vlib/v/{tests => slow_tests}/run_project_folders/go_fns_in_different_files_over_the_same_struct/f2.v (100%) rename vlib/v/{tests => slow_tests}/run_project_folders/go_fns_in_different_files_over_the_same_struct/main.v (100%) rename vlib/v/{tests => slow_tests}/run_project_folders/issue_10023_multiple_anon_fns_with_same_position/a.v (100%) rename vlib/v/{tests => slow_tests}/run_project_folders/issue_10023_multiple_anon_fns_with_same_position/b.v (100%) rename vlib/v/{tests => slow_tests}/run_project_folders/issue_13443_test_prefixed_fns_in_normal_v_files/any_test.v (100%) rename vlib/v/{tests => slow_tests}/run_project_folders/issue_13443_test_prefixed_fns_in_normal_v_files/main.v (100%) rename vlib/v/{tests => slow_tests}/run_project_folders_test.v (88%) rename vlib/v/{tests => slow_tests}/valgrind/1.strings_and_arrays.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/2.heap_objects.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/array_init_with_string_variable.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/base64.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/buffer_passed_in_fn_that_uses_tos_on_it.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/dump_nested_structs.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/fn_returning_string_param.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/fn_with_return_should_free_local_vars.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/free_heap_foos.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/free_variables_in_reverse_order_of_creation.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/if_expr.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/if_expr_skip.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/import_os_and_use_its_constants.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/import_x_json2.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/logging.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/option_reassigned.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/option_simple.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/rand_module.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/rune_methods.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/simple_interpolation.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/simple_interpolation_script_mode.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/simple_interpolation_script_mode_more_scopes.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/string_plus_string_plus.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/string_str_method.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/strings_builder.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/struct_field.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/struct_of_array_of_same_struct.v (100%) rename vlib/v/{tests => slow_tests}/valgrind/valgrind_test.v (82%) delete mode 100644 vlib/v/tests/inout/bad_st_as.vv delete mode 100644 vlib/v/tests/inout/comptime_if_script_mode.vv delete mode 100644 vlib/v/tests/inout/dump_expression.out delete mode 100644 vlib/v/tests/inout/dump_generic_fn_mut_arg.out delete mode 100644 vlib/v/tests/inout/dump_generic_interface_ref_arg.out delete mode 100644 vlib/v/tests/inout/dump_match_expr.out delete mode 100644 vlib/v/tests/inout/dump_multiple_ptr.out delete mode 100644 vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.out delete mode 100644 vlib/v/tests/inout/dump_nil_voidptr.out delete mode 100644 vlib/v/tests/inout/dump_none.out delete mode 100644 vlib/v/tests/inout/dump_shared_arg.out delete mode 100644 vlib/v/tests/inout/dump_sumtype_of_fntype.out delete mode 100644 vlib/v/tests/inout/hello_devs.vv delete mode 100644 vlib/v/tests/inout/struct_field_option.out delete mode 100644 vlib/v/tests/inout/tmpl_expand_v_source_code.vv delete mode 100644 vlib/v/tests/repl/entire_commented_module.repl diff --git a/TESTS.md b/TESTS.md index eb5d3e01d..b0d27f5ff 100644 --- a/TESTS.md +++ b/TESTS.md @@ -51,7 +51,7 @@ This folder contains _test.v files, testing the different features of the V compiler. Each of them will be compiled, and all the features in them have to work (verified by assertions). -## `v vlib/v/tests/inout/compiler_test.v` +## `v vlib/v/slow_tests/inout/compiler_test.v` This is a *test runner*, that checks whether the output of running a V program, matches an expected .out file. You can also check for code that does panic @@ -59,7 +59,7 @@ using this test runner - just paste the start of the `panic()` output in the corresponding .out file. NB: these tests, expect to find a pair of `.vv` and `.out` files, in the folder: -vlib/v/tests/inout +vlib/v/slow_tests/inout The test runner will run each `.vv` file, and will check that its output, matches the contents of the `.out` file with the same base name. This is particularly useful @@ -77,7 +77,7 @@ Each `.c.must_have` file, consists of multiple lines. Each of these lines, *should* be present *at least once* in the output, when the .vv file is compiled with `-o -` . -## `v vlib/v/tests/run_project_folders_test.v` +## `v vlib/v/slow_tests/run_project_folders_test.v` This *test runner*, checks whether whole project folders, can be compiled, and run. NB: Each project in these folders, should finish with an exit code of 0, diff --git a/cmd/tools/vtest-cleancode.v b/cmd/tools/vtest-cleancode.v index 9862750dd..475481cf3 100644 --- a/cmd/tools/vtest-cleancode.v +++ b/cmd/tools/vtest-cleancode.v @@ -15,10 +15,10 @@ const vet_known_failing_windows = [ 'vlib/v/gen/js/tests/testdata/compare_ints.v', 'vlib/v/gen/js/tests/testdata/hw.v', 'vlib/v/gen/js/tests/testdata/string_methods.v', - 'vlib/v/tests/inout/vscript_using_generics_in_os.vsh', + 'vlib/v/slow_tests/inout/vscript_using_generics_in_os.vsh', 'vlib/v/tests/project_with_modules_having_submodules/bin/main.vsh', - 'vlib/v/tests/valgrind/simple_interpolation_script_mode.v', - 'vlib/v/tests/valgrind/simple_interpolation_script_mode_more_scopes.v', + 'vlib/v/slow_tests/valgrind/simple_interpolation_script_mode.v', + 'vlib/v/slow_tests/valgrind/simple_interpolation_script_mode_more_scopes.v', ] const vet_folders = [ diff --git a/cmd/tools/vtest-self.v b/cmd/tools/vtest-self.v index c9a8f1d42..3a8728a08 100644 --- a/cmd/tools/vtest-self.v +++ b/cmd/tools/vtest-self.v @@ -80,7 +80,7 @@ const ( 'vlib/v/gen/native/macho_test.v', 'vlib/v/gen/native/tests/native_test.v', 'vlib/v/pkgconfig/pkgconfig_test.v', - 'vlib/v/tests/inout/compiler_test.v', + 'vlib/v/slow_tests/inout/compiler_test.v', 'vlib/x/json2/json2_test.v', ] skip_test_files = [ @@ -102,11 +102,11 @@ const ( 'vlib/v/live/live_test.v', 'vlib/v/parser/v_parser_test.v', 'vlib/v/scanner/scanner_test.v', - 'vlib/v/tests/inout/compiler_test.v', - 'vlib/v/tests/prod_test.v', - 'vlib/v/tests/profile/profile_test.v', - 'vlib/v/tests/repl/repl_test.v', - 'vlib/v/tests/valgrind/valgrind_test.v', + 'vlib/v/slow_tests/inout/compiler_test.v', + 'vlib/v/slow_tests/prod_test.v', + 'vlib/v/slow_tests/profile/profile_test.v', + 'vlib/v/slow_tests/repl/repl_test.v', + 'vlib/v/slow_tests/valgrind/valgrind_test.v', ] skip_with_fsanitize_memory = [ 'vlib/net/tcp_simple_client_server_test.v', @@ -159,7 +159,7 @@ const ( 'do_not_remove', ] skip_on_musl = [ - 'vlib/v/tests/profile/profile_test.v', + 'vlib/v/slow_tests/profile/profile_test.v', 'vlib/gg/draw_fns_api_test.v', 'vlib/v/tests/skip_unused/gg_code.vv', ] diff --git a/cmd/tools/vvet/vvet.v b/cmd/tools/vvet/vvet.v index 55d8e2ade..e11d2a672 100644 --- a/cmd/tools/vvet/vvet.v +++ b/cmd/tools/vvet/vvet.v @@ -87,7 +87,7 @@ fn main() { // vet_file vets the file read from `path`. fn (mut vt Vet) vet_file(path string) { - if path.contains('/tests/') && !vt.opt.is_force { + if !vt.opt.is_force && (path.contains('/tests/') || path.contains('/slow_tests/')) { // skip all /tests/ files, since usually their content is not // important enough to be documented/vetted, and they may even // contain intentionally invalid code. diff --git a/vlib/.vdocignore b/vlib/.vdocignore index a90554338..90062c230 100644 --- a/vlib/.vdocignore +++ b/vlib/.vdocignore @@ -3,6 +3,7 @@ builtin/linux_bare builtin/wasm_bare os/bare v/tests/ +v/slow_tests/ v/checker/tests/ v/gen/js/tests/ v/gen/native/tests/ diff --git a/vlib/net/address.v b/vlib/net/address.v index fc7ce5a2e..99c52377e 100644 --- a/vlib/net/address.v +++ b/vlib/net/address.v @@ -14,7 +14,8 @@ const ( addr_ip_any = [4]u8{init: u8(0)} ) -fn new_ip6(port u16, addr [16]u8) Addr { +// new_ip6 creates a new Addr from the IP6 address family, based on the given port and addr +pub fn new_ip6(port u16, addr [16]u8) Addr { a := Addr{ f: u8(AddrFamily.ip6) addr: AddrData{ @@ -29,7 +30,8 @@ fn new_ip6(port u16, addr [16]u8) Addr { return a } -fn new_ip(port u16, addr [4]u8) Addr { +// new_ip creates a new Addr from the IPv4 address family, based on the given port and addr +pub fn new_ip(port u16, addr [4]u8) Addr { a := Addr{ f: u8(AddrFamily.ip) addr: AddrData{ @@ -56,6 +58,7 @@ fn temp_unix() !Addr { return addrs[0] } +// family returns the family/kind of the given address `a` pub fn (a Addr) family() AddrFamily { return unsafe { AddrFamily(a.f) } } @@ -65,7 +68,8 @@ const ( max_ip6_len = 46 ) -fn (a Ip) str() string { +// str returns a string representation of `a` +pub fn (a Ip) str() string { buf := [net.max_ip_len]char{} res := &char(C.inet_ntop(.ip, &a.addr, &buf[0], buf.len)) @@ -80,7 +84,8 @@ fn (a Ip) str() string { return '${saddr}:${port}' } -fn (a Ip6) str() string { +// str returns a string representation of `a` +pub fn (a Ip6) str() string { buf := [net.max_ip6_len]char{} res := &char(C.inet_ntop(.ip6, &a.addr, &buf[0], buf.len)) @@ -97,7 +102,8 @@ fn (a Ip6) str() string { const aoffset = __offsetof(Addr, addr) -fn (a Addr) len() u32 { +// len returns the length in bytes of the address `a`, depending on its family +pub fn (a Addr) len() u32 { match a.family() { .ip { return sizeof(Ip) + net.aoffset @@ -114,6 +120,7 @@ fn (a Addr) len() u32 { } } +// resolve_addrs converts the given `addr`, `family` and `@type` to a list of addresses pub fn resolve_addrs(addr string, family AddrFamily, @type SocketType) ![]Addr { match family { .ip, .ip6, .unspec { @@ -143,6 +150,7 @@ pub fn resolve_addrs(addr string, family AddrFamily, @type SocketType) ![]Addr { } } +// resolve_addrs converts the given `addr` and `@type` to a list of addresses pub fn resolve_addrs_fuzzy(addr string, @type SocketType) ![]Addr { if addr.len == 0 { return error('none') @@ -160,6 +168,7 @@ pub fn resolve_addrs_fuzzy(addr string, @type SocketType) ![]Addr { return resolve_addrs(addr, .unix, @type) } +// resolve_ipaddrs converts the given `addr`, `family` and `typ` to a list of addresses pub fn resolve_ipaddrs(addr string, family AddrFamily, typ SocketType) ![]Addr { address, port := split_address(addr)! @@ -238,7 +247,8 @@ pub fn resolve_ipaddrs(addr string, family AddrFamily, typ SocketType) ![]Addr { return addresses } -fn (a Addr) str() string { +// str returns a string representation of the address `a` +pub fn (a Addr) str() string { match unsafe { AddrFamily(a.f) } { .ip { unsafe { @@ -261,6 +271,7 @@ fn (a Addr) str() string { } } +// addr_from_socket_handle returns an address, based on the given integer socket `handle` pub fn addr_from_socket_handle(handle int) Addr { addr := Addr{ addr: AddrData{ diff --git a/vlib/net/http/header_test.v b/vlib/net/http/header_test.v index 0013d36fa..f50a94ef8 100644 --- a/vlib/net/http/header_test.v +++ b/vlib/net/http/header_test.v @@ -29,7 +29,7 @@ fn test_header_adds_multiple() { fn test_header_get() { mut h := new_header(key: .dnt, value: 'one') - h.add_custom('dnt', 'two')? + h.add_custom('dnt', 'two')! dnt := h.get_custom('dnt') or { '' } exact := h.get_custom('dnt', exact: true) or { '' } assert dnt == 'one' @@ -42,7 +42,7 @@ fn test_header_set() { value: 'two' ) assert h.values(.dnt) == ['one', 'two'] - h.set_custom('DNT', 'three')? + h.set_custom('DNT', 'three')! assert h.values(.dnt) == ['three'] } @@ -67,8 +67,8 @@ fn test_header_delete_not_existing() { fn test_custom_header() { mut h := new_header() - h.add_custom('AbC', 'dEf')? - h.add_custom('aBc', 'GhI')? + h.add_custom('AbC', 'dEf')! + h.add_custom('aBc', 'GhI')! assert h.custom_values('AbC', exact: true) == ['dEf'] assert h.custom_values('aBc', exact: true) == ['GhI'] assert h.custom_values('ABC') == ['dEf', 'GhI'] @@ -77,13 +77,13 @@ fn test_custom_header() { h.delete_custom('AbC') h.delete_custom('aBc') - h.add_custom('abc', 'def')? + h.add_custom('abc', 'def')! assert h.custom_values('abc') == ['def'] assert h.custom_values('ABC') == ['def'] assert h.keys() == ['abc'] h.delete_custom('abc') - h.add_custom('accEPT', '*/*')? + h.add_custom('accEPT', '*/*')! assert h.custom_values('ACCept') == ['*/*'] assert h.values(.accept) == ['*/*'] assert h.keys() == ['accEPT'] @@ -91,7 +91,7 @@ fn test_custom_header() { fn test_contains_custom() { mut h := new_header() - h.add_custom('Hello', 'world')? + h.add_custom('Hello', 'world')! assert h.contains_custom('hello') assert h.contains_custom('HELLO') assert h.contains_custom('Hello', exact: true) @@ -101,7 +101,7 @@ fn test_contains_custom() { fn test_get_custom() { mut h := new_header() - h.add_custom('Hello', 'world')? + h.add_custom('Hello', 'world')! assert h.get_custom('hello')? == 'world' assert h.get_custom('HELLO')? == 'world' assert h.get_custom('Hello', exact: true)? == 'world' @@ -117,15 +117,15 @@ fn test_get_custom() { fn test_starting_with() { mut h := new_header() - h.add_custom('Hello-1', 'world')? - h.add_custom('Hello-21', 'world')? + h.add_custom('Hello-1', 'world')! + h.add_custom('Hello-21', 'world')! assert h.starting_with('Hello-')? == 'Hello-1' assert h.starting_with('Hello-2')? == 'Hello-21' } fn test_custom_values() { mut h := new_header() - h.add_custom('Hello', 'world')? + h.add_custom('Hello', 'world')! assert h.custom_values('hello') == ['world'] assert h.custom_values('HELLO') == ['world'] assert h.custom_values('Hello', exact: true) == ['world'] @@ -135,7 +135,7 @@ fn test_custom_values() { fn test_coerce() { mut h := new_header() - h.add_custom('accept', 'foo')? + h.add_custom('accept', 'foo')! h.add(.accept, 'bar') assert h.values(.accept) == ['foo', 'bar'] assert h.keys().len == 2 @@ -147,7 +147,7 @@ fn test_coerce() { fn test_coerce_canonicalize() { mut h := new_header() - h.add_custom('accept', 'foo')? + h.add_custom('accept', 'foo')! h.add(.accept, 'bar') assert h.values(.accept) == ['foo', 'bar'] assert h.keys().len == 2 @@ -159,9 +159,9 @@ fn test_coerce_canonicalize() { fn test_coerce_custom() { mut h := new_header() - h.add_custom('Hello', 'foo')? - h.add_custom('hello', 'bar')? - h.add_custom('HELLO', 'baz')? + h.add_custom('Hello', 'foo')! + h.add_custom('hello', 'bar')! + h.add_custom('HELLO', 'baz')! assert h.custom_values('hello') == ['foo', 'bar', 'baz'] assert h.keys().len == 3 @@ -172,8 +172,8 @@ fn test_coerce_custom() { fn test_coerce_canonicalize_custom() { mut h := new_header() - h.add_custom('foo-BAR', 'foo')? - h.add_custom('FOO-bar', 'bar')? + h.add_custom('foo-BAR', 'foo')! + h.add_custom('FOO-bar', 'bar')! assert h.custom_values('foo-bar') == ['foo', 'bar'] assert h.keys().len == 2 @@ -184,8 +184,8 @@ fn test_coerce_canonicalize_custom() { fn test_render_version() { mut h := new_header() - h.add_custom('accept', 'foo')? - h.add_custom('Accept', 'bar')? + h.add_custom('accept', 'foo')! + h.add_custom('Accept', 'bar')! h.add(.accept, 'baz') s1_0 := h.render(version: .v1_0) @@ -206,8 +206,8 @@ fn test_render_version() { fn test_render_coerce() { mut h := new_header() - h.add_custom('accept', 'foo')? - h.add_custom('Accept', 'bar')? + h.add_custom('accept', 'foo')! + h.add_custom('Accept', 'bar')! h.add(.accept, 'baz') h.add(.host, 'host') @@ -232,8 +232,8 @@ fn test_render_coerce() { fn test_render_canonicalize() { mut h := new_header() - h.add_custom('accept', 'foo')? - h.add_custom('Accept', 'bar')? + h.add_custom('accept', 'foo')! + h.add_custom('Accept', 'bar')! h.add(.accept, 'baz') h.add(.host, 'host') @@ -258,8 +258,8 @@ fn test_render_canonicalize() { fn test_render_coerce_canonicalize() { mut h := new_header() - h.add_custom('accept', 'foo')? - h.add_custom('Accept', 'bar')? + h.add_custom('accept', 'foo')! + h.add_custom('Accept', 'bar')! h.add(.accept, 'baz') h.add(.host, 'host') @@ -285,8 +285,8 @@ fn test_render_coerce_canonicalize() { fn test_str() { mut h := new_header() h.add(.accept, 'text/html') - h.add_custom('Accept', 'image/jpeg')? - h.add_custom('X-custom', 'Hello')? + h.add_custom('Accept', 'image/jpeg')! + h.add_custom('X-custom', 'Hello')! // key order is not guaranteed assert h.str() == 'Accept: text/html\r\nAccept: image/jpeg\r\nX-custom: Hello\r\n' @@ -308,7 +308,7 @@ fn test_custom_header_from_map() { h := new_custom_header_from_map({ 'Server': 'VWeb' 'foo': 'bar' - })? + })! assert h.contains_custom('server') assert h.contains_custom('foo') assert h.get_custom('server') or { '' } == 'VWeb' @@ -323,7 +323,7 @@ fn test_header_join() { h2 := new_custom_header_from_map({ 'Server': 'VWeb' 'foo': 'bar' - })? + })! h3 := h1.join(h2) // h1 is unchanged assert h1.contains(.accept) diff --git a/vlib/net/tcp_test.v b/vlib/net/tcp_test.v index 044fb0011..fc4b2d2a4 100644 --- a/vlib/net/tcp_test.v +++ b/vlib/net/tcp_test.v @@ -30,17 +30,17 @@ fn one_shot_echo_server(mut l net.TcpListener, ch_started chan int) ? { new_conn.close() or {} } -fn echo(address string) ? { - mut c := net.dial_tcp(address)? +fn echo(address string) ! { + mut c := net.dial_tcp(address)! defer { c.close() or {} } - println('local: ' + c.addr()?.str()) - println(' peer: ' + c.peer_addr()?.str()) + println('local: ' + c.addr()!.str()) + println(' peer: ' + c.peer_addr()!.str()) data := 'Hello from vlib/net!' - c.write_string(data)? + c.write_string(data)! mut buf := []u8{len: 4096} read := c.read(mut buf) or { panic(err) } assert read == data.len @@ -105,6 +105,6 @@ fn test_bind() { $if !network ? { return } - mut conn := net.dial_tcp_with_bind('vlang.io:80', '127.0.0.1:0')? - conn.close()? + mut conn := net.dial_tcp_with_bind('vlang.io:80', '127.0.0.1:0')! + conn.close()! } diff --git a/vlib/net/urllib/urllib_test.v b/vlib/net/urllib/urllib_test.v index ec9883d81..8556c79f8 100644 --- a/vlib/net/urllib/urllib_test.v +++ b/vlib/net/urllib/urllib_test.v @@ -36,8 +36,8 @@ fn test_escape_unescape() { } fn test_parse_query() { - q1 := urllib.parse_query('format=%22%25l%3A+%25c+%25t%22')? - q2 := urllib.parse_query('format="%l:+%c+%t"')? + q1 := urllib.parse_query('format=%22%25l%3A+%25c+%25t%22')! + q2 := urllib.parse_query('format="%l:+%c+%t"')! // dump(q1) // dump(q2) assert q1.get('format') == '"%l: %c %t"' @@ -45,21 +45,21 @@ fn test_parse_query() { } fn test_parse_query_orders() { - query_one := urllib.parse_query('https://someapi.com/endpoint?gamma=zalibaba&tau=1&alpha=alibaba&signature=alibaba123')? + query_one := urllib.parse_query('https://someapi.com/endpoint?gamma=zalibaba&tau=1&alpha=alibaba&signature=alibaba123')! qvalues := query_one.values() assert qvalues == ['zalibaba', '1', 'alibaba', 'alibaba123'] } fn test_parse_missing_host() { // issue #10311 - url := urllib.parse('http:///')? + url := urllib.parse('http:///')! assert url.str() == 'http://///' } // testing the case where the key as a null value // e.g ?key= fn test_parse_none_value() { - query_one := urllib.parse_query('gamma=zalibaba&tau=1&alpha=alibaba&signature=')? + query_one := urllib.parse_query('gamma=zalibaba&tau=1&alpha=alibaba&signature=')! qvalues := query_one.values() qvalues_map := query_one.to_map() assert qvalues == ['zalibaba', '1', 'alibaba'] @@ -75,7 +75,7 @@ fn test_parse_none_value() { // e.g https://www.vlang.dev?alibaba fn test_parse_empty_query_one() { query_str := 'alibaba' - query_one := urllib.parse_query(query_str)? + query_one := urllib.parse_query(query_str)! qvalues := query_one.values() qvalues_map := query_one.to_map() query_encode := query_one.encode() @@ -90,7 +90,7 @@ fn test_parse_empty_query_one() { // e.g https://www.vlang.dev? fn test_parse_empty_query_two() { query_str := '' - query_one := urllib.parse_query(query_str)? + query_one := urllib.parse_query(query_str)! qvalues := query_one.values() qvalues_map := query_one.to_map() query_encode := query_one.encode() diff --git a/vlib/v/tests/assembly/asm_test.amd64.v b/vlib/v/slow_tests/assembly/asm_test.amd64.v similarity index 99% rename from vlib/v/tests/assembly/asm_test.amd64.v rename to vlib/v/slow_tests/assembly/asm_test.amd64.v index e8e7d9eee..fd720d2c9 100644 --- a/vlib/v/tests/assembly/asm_test.amd64.v +++ b/vlib/v/slow_tests/assembly/asm_test.amd64.v @@ -1,4 +1,4 @@ -import v.tests.assembly.util +import v.slow_tests.assembly.util fn test_inline_asm() { a, mut b := i64(10), i64(0) diff --git a/vlib/v/tests/assembly/asm_test.i386.v b/vlib/v/slow_tests/assembly/asm_test.i386.v similarity index 100% rename from vlib/v/tests/assembly/asm_test.i386.v rename to vlib/v/slow_tests/assembly/asm_test.i386.v diff --git a/vlib/v/tests/assembly/naked_attr_test.amd64.v b/vlib/v/slow_tests/assembly/naked_attr_test.amd64.v similarity index 100% rename from vlib/v/tests/assembly/naked_attr_test.amd64.v rename to vlib/v/slow_tests/assembly/naked_attr_test.amd64.v diff --git a/vlib/v/tests/assembly/naked_attr_test.i386.v b/vlib/v/slow_tests/assembly/naked_attr_test.i386.v similarity index 100% rename from vlib/v/tests/assembly/naked_attr_test.i386.v rename to vlib/v/slow_tests/assembly/naked_attr_test.i386.v diff --git a/vlib/v/tests/assembly/util/dot_amd64_util.amd64.v b/vlib/v/slow_tests/assembly/util/dot_amd64_util.amd64.v similarity index 100% rename from vlib/v/tests/assembly/util/dot_amd64_util.amd64.v rename to vlib/v/slow_tests/assembly/util/dot_amd64_util.amd64.v diff --git a/vlib/v/tests/comptime_if_expr_threads_test.v b/vlib/v/slow_tests/comptime_if_expr_threads_test.v similarity index 100% rename from vlib/v/tests/comptime_if_expr_threads_test.v rename to vlib/v/slow_tests/comptime_if_expr_threads_test.v diff --git a/vlib/v/tests/crun_mode/crun_test.v b/vlib/v/slow_tests/crun_mode/crun_test.v similarity index 100% rename from vlib/v/tests/crun_mode/crun_test.v rename to vlib/v/slow_tests/crun_mode/crun_test.v diff --git a/vlib/v/tests/inout/.gitignore b/vlib/v/slow_tests/inout/.gitignore similarity index 100% rename from vlib/v/tests/inout/.gitignore rename to vlib/v/slow_tests/inout/.gitignore diff --git a/vlib/v/tests/inout/bad_st_as.out b/vlib/v/slow_tests/inout/bad_st_as.out similarity index 100% rename from vlib/v/tests/inout/bad_st_as.out rename to vlib/v/slow_tests/inout/bad_st_as.out diff --git a/vlib/v/slow_tests/inout/bad_st_as.vv b/vlib/v/slow_tests/inout/bad_st_as.vv new file mode 100644 index 000000000..b0b3f3882 --- /dev/null +++ b/vlib/v/slow_tests/inout/bad_st_as.vv @@ -0,0 +1,20 @@ +struct Struct { + struct_name string +} + +struct Interface { + interface_name string +} + +type Info = Interface | Struct + +fn main() { + mut info := Info{} + info = Struct{ + struct_name: 'Foo' + } + s := info as Struct + println(s.struct_name) + i := info as Interface // wrong + println(i.interface_name) +} diff --git a/vlib/v/tests/inout/cli_command_no_execute.out b/vlib/v/slow_tests/inout/cli_command_no_execute.out similarity index 100% rename from vlib/v/tests/inout/cli_command_no_execute.out rename to vlib/v/slow_tests/inout/cli_command_no_execute.out diff --git a/vlib/v/tests/inout/cli_command_no_execute.vv b/vlib/v/slow_tests/inout/cli_command_no_execute.vv similarity index 83% rename from vlib/v/tests/inout/cli_command_no_execute.vv rename to vlib/v/slow_tests/inout/cli_command_no_execute.vv index fd145e13e..b0c52e46d 100644 --- a/vlib/v/tests/inout/cli_command_no_execute.vv +++ b/vlib/v/slow_tests/inout/cli_command_no_execute.vv @@ -1,4 +1,4 @@ -import cli {Command} +import cli { Command } fn main() { mut cmd := Command{ diff --git a/vlib/v/tests/inout/cli_root_default_help.out b/vlib/v/slow_tests/inout/cli_root_default_help.out similarity index 100% rename from vlib/v/tests/inout/cli_root_default_help.out rename to vlib/v/slow_tests/inout/cli_root_default_help.out diff --git a/vlib/v/tests/inout/cli_root_default_help.vv b/vlib/v/slow_tests/inout/cli_root_default_help.vv similarity index 60% rename from vlib/v/tests/inout/cli_root_default_help.vv rename to vlib/v/slow_tests/inout/cli_root_default_help.vv index 01da855d7..bdabbcb98 100644 --- a/vlib/v/tests/inout/cli_root_default_help.vv +++ b/vlib/v/slow_tests/inout/cli_root_default_help.vv @@ -1,8 +1,8 @@ -import cli {Command} +import cli { Command } import os fn main() { - mut cmd := Command {} + mut cmd := Command{} cmd.disable_man = true cmd.parse(os.args) } diff --git a/vlib/v/tests/inout/closure_with_fn_variables.out b/vlib/v/slow_tests/inout/closure_with_fn_variables.out similarity index 100% rename from vlib/v/tests/inout/closure_with_fn_variables.out rename to vlib/v/slow_tests/inout/closure_with_fn_variables.out diff --git a/vlib/v/tests/inout/closure_with_fn_variables.vv b/vlib/v/slow_tests/inout/closure_with_fn_variables.vv similarity index 100% rename from vlib/v/tests/inout/closure_with_fn_variables.vv rename to vlib/v/slow_tests/inout/closure_with_fn_variables.vv diff --git a/vlib/v/tests/inout/closure_with_nested_closure_var.out b/vlib/v/slow_tests/inout/closure_with_nested_closure_var.out similarity index 100% rename from vlib/v/tests/inout/closure_with_nested_closure_var.out rename to vlib/v/slow_tests/inout/closure_with_nested_closure_var.out diff --git a/vlib/v/tests/inout/closure_with_nested_closure_var.vv b/vlib/v/slow_tests/inout/closure_with_nested_closure_var.vv similarity index 80% rename from vlib/v/tests/inout/closure_with_nested_closure_var.vv rename to vlib/v/slow_tests/inout/closure_with_nested_closure_var.vv index 7ac1abe2d..62bbd8b61 100644 --- a/vlib/v/tests/inout/closure_with_nested_closure_var.vv +++ b/vlib/v/slow_tests/inout/closure_with_nested_closure_var.vv @@ -15,9 +15,9 @@ fn main() { t := Test1{} t.test(fn [t] (t1 Test) { - println('$t, $t1') + println('${t}, ${t1}') t.test(fn [t] (t2 Test) { - println('$t, $t2') + println('${t}, ${t2}') }) }) } diff --git a/vlib/v/tests/inout/compiler_test.v b/vlib/v/slow_tests/inout/compiler_test.v similarity index 98% rename from vlib/v/tests/inout/compiler_test.v rename to vlib/v/slow_tests/inout/compiler_test.v index 2ca2b7d3a..acff830b8 100644 --- a/vlib/v/tests/inout/compiler_test.v +++ b/vlib/v/slow_tests/inout/compiler_test.v @@ -20,7 +20,7 @@ fn test_all() { vroot := os.dir(vexe) os.chdir(vroot) or {} diff_cmd := diff.find_working_diff_command() or { '' } - dir := 'vlib/v/tests/inout' + dir := 'vlib/v/slow_tests/inout' files := os.ls(dir) or { panic(err) } tests := files.filter(it.ends_with('.vv') || it.ends_with('.vsh')) if tests.len == 0 { diff --git a/vlib/v/tests/inout/comptime_bool_fields.out b/vlib/v/slow_tests/inout/comptime_bool_fields.out similarity index 100% rename from vlib/v/tests/inout/comptime_bool_fields.out rename to vlib/v/slow_tests/inout/comptime_bool_fields.out diff --git a/vlib/v/tests/inout/comptime_bool_fields.vv b/vlib/v/slow_tests/inout/comptime_bool_fields.vv similarity index 100% rename from vlib/v/tests/inout/comptime_bool_fields.vv rename to vlib/v/slow_tests/inout/comptime_bool_fields.vv diff --git a/vlib/v/tests/inout/comptime_if_script_mode.out b/vlib/v/slow_tests/inout/comptime_if_script_mode.out similarity index 100% rename from vlib/v/tests/inout/comptime_if_script_mode.out rename to vlib/v/slow_tests/inout/comptime_if_script_mode.out diff --git a/vlib/v/slow_tests/inout/comptime_if_script_mode.vv b/vlib/v/slow_tests/inout/comptime_if_script_mode.vv new file mode 100644 index 000000000..8a1645750 --- /dev/null +++ b/vlib/v/slow_tests/inout/comptime_if_script_mode.vv @@ -0,0 +1,5 @@ +$if vinix { + println('vinix') +} $else { + println('others') +} diff --git a/vlib/v/tests/inout/data_obj.v.templ b/vlib/v/slow_tests/inout/data_obj.v.templ similarity index 100% rename from vlib/v/tests/inout/data_obj.v.templ rename to vlib/v/slow_tests/inout/data_obj.v.templ diff --git a/vlib/v/slow_tests/inout/dump_expression.out b/vlib/v/slow_tests/inout/dump_expression.out new file mode 100644 index 000000000..5da89f494 --- /dev/null +++ b/vlib/v/slow_tests/inout/dump_expression.out @@ -0,0 +1,32 @@ +[vlib/v/slow_tests/inout/dump_expression.vv:5] 1: 1 +[vlib/v/slow_tests/inout/dump_expression.vv:10] 'a': a +[vlib/v/slow_tests/inout/dump_expression.vv:34] a: Aa{ + log: &log.Logger(log.Log{ + level: disabled + output_label: '' + ofile: os.File{ + cfile: 0 + fd: 0 + is_opened: false + } + output_target: console + output_file_name: '' + }) +} +[vlib/v/slow_tests/inout/dump_expression.vv:35] p: Point{ + x: 1 + y: 2 + z: 3 +} +[vlib/v/slow_tests/inout/dump_expression.vv:36] p_mut: Point{ + x: 1 + y: 2 + z: 3 +} +[vlib/v/slow_tests/inout/dump_expression.vv:37] p_ptr: &Point{ + x: 1 + y: 2 + z: 3 +} +[vlib/v/slow_tests/inout/dump_expression.vv:48] os.file_name(vfile): dump_expression.vv +[vlib/v/slow_tests/inout/dump_expression.vv:51] f.read(mut buf): 10 diff --git a/vlib/v/tests/inout/dump_expression.vv b/vlib/v/slow_tests/inout/dump_expression.vv similarity index 95% rename from vlib/v/tests/inout/dump_expression.vv rename to vlib/v/slow_tests/inout/dump_expression.vv index bc5442e9d..4f52d5664 100644 --- a/vlib/v/tests/inout/dump_expression.vv +++ b/vlib/v/slow_tests/inout/dump_expression.vv @@ -18,7 +18,7 @@ mut: z int } -struct Aa{ +struct Aa { log &log.Logger } @@ -27,7 +27,9 @@ fn dump_of_struct() { mut p_mut := Point{1, 2, 3} p_ptr := &Point{1, 2, 3} l := &log.Log{} - a := Aa{log:l} + a := Aa{ + log: l + } dump(a) mut x1 := dump(p) diff --git a/vlib/v/slow_tests/inout/dump_generic_fn_mut_arg.out b/vlib/v/slow_tests/inout/dump_generic_fn_mut_arg.out new file mode 100644 index 000000000..ca11eb1da --- /dev/null +++ b/vlib/v/slow_tests/inout/dump_generic_fn_mut_arg.out @@ -0,0 +1 @@ +[vlib/v/slow_tests/inout/dump_generic_fn_mut_arg.vv:11] t: &Reptile{} diff --git a/vlib/v/tests/inout/dump_generic_fn_mut_arg.vv b/vlib/v/slow_tests/inout/dump_generic_fn_mut_arg.vv similarity index 100% rename from vlib/v/tests/inout/dump_generic_fn_mut_arg.vv rename to vlib/v/slow_tests/inout/dump_generic_fn_mut_arg.vv diff --git a/vlib/v/slow_tests/inout/dump_generic_interface_ref_arg.out b/vlib/v/slow_tests/inout/dump_generic_interface_ref_arg.out new file mode 100644 index 000000000..7632a76fe --- /dev/null +++ b/vlib/v/slow_tests/inout/dump_generic_interface_ref_arg.out @@ -0,0 +1,6 @@ +[vlib/v/slow_tests/inout/dump_generic_interface_ref_arg.vv:30] mi.in_(): 1.0 +[vlib/v/slow_tests/inout/dump_generic_interface_ref_arg.vv:31] mi.out(): 2.0 +[vlib/v/slow_tests/inout/dump_generic_interface_ref_arg.vv:36] in_put.in_(): 1.0 +[vlib/v/slow_tests/inout/dump_generic_interface_ref_arg.vv:37] in_put.out(): 2.0 +[vlib/v/slow_tests/inout/dump_generic_interface_ref_arg.vv:39] in_put.in_(): 1.0 +[vlib/v/slow_tests/inout/dump_generic_interface_ref_arg.vv:40] in_put.out(): 2.0 diff --git a/vlib/v/tests/inout/dump_generic_interface_ref_arg.vv b/vlib/v/slow_tests/inout/dump_generic_interface_ref_arg.vv similarity index 100% rename from vlib/v/tests/inout/dump_generic_interface_ref_arg.vv rename to vlib/v/slow_tests/inout/dump_generic_interface_ref_arg.vv diff --git a/vlib/v/slow_tests/inout/dump_match_expr.out b/vlib/v/slow_tests/inout/dump_match_expr.out new file mode 100644 index 000000000..fe2b4c9d1 --- /dev/null +++ b/vlib/v/slow_tests/inout/dump_match_expr.out @@ -0,0 +1 @@ +[vlib/v/slow_tests/inout/dump_match_expr.vv:3] ast.MatchExpr: 1 diff --git a/vlib/v/tests/inout/dump_match_expr.vv b/vlib/v/slow_tests/inout/dump_match_expr.vv similarity index 100% rename from vlib/v/tests/inout/dump_match_expr.vv rename to vlib/v/slow_tests/inout/dump_match_expr.vv diff --git a/vlib/v/slow_tests/inout/dump_multiple_ptr.out b/vlib/v/slow_tests/inout/dump_multiple_ptr.out new file mode 100644 index 000000000..bac91801e --- /dev/null +++ b/vlib/v/slow_tests/inout/dump_multiple_ptr.out @@ -0,0 +1,4 @@ +[vlib/v/slow_tests/inout/dump_multiple_ptr.vv:3] i: 42 +[vlib/v/slow_tests/inout/dump_multiple_ptr.vv:5] ir: &42 +[vlib/v/slow_tests/inout/dump_multiple_ptr.vv:7] irr: &&42 +[vlib/v/slow_tests/inout/dump_multiple_ptr.vv:9] irrr: &&&42 diff --git a/vlib/v/tests/inout/dump_multiple_ptr.vv b/vlib/v/slow_tests/inout/dump_multiple_ptr.vv similarity index 100% rename from vlib/v/tests/inout/dump_multiple_ptr.vv rename to vlib/v/slow_tests/inout/dump_multiple_ptr.vv diff --git a/vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.out b/vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.out new file mode 100644 index 000000000..1dcb5ddca --- /dev/null +++ b/vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.out @@ -0,0 +1,23 @@ +[vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.vv:19] '${T.name} $input': int 1 +[vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.vv:26] '${T.name} $input': int 1 +[vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.vv:36] next(1): 0.0 +[vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.vv:19] '${T.name} $input': f64 1.0 +[vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.vv:26] '${T.name} $input': f64 1.0 +[vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.vv:37] next(1.0): 64.0 +[vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.vv:19] '${T.name} $input': f64 11.1 +[vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.vv:26] '${T.name} $input': f64 11.1 +[vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.vv:38] next(11.1): 64.0 +[vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.vv:15] '${T.name} $input': Score Score{ + ave: 23.4 +} +[vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.vv:26] '${T.name} $input': Score Score{ + ave: 23.4 +} +[vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.vv:42] next(ave): 23.4 +[vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.vv:15] '${T.name} $input': &Score &Score{ + ave: 23.4 +} +[vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.vv:26] '${T.name} $input': &Score &Score{ + ave: 23.4 +} +[vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.vv:43] next(&ave): 23.4 diff --git a/vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.vv b/vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.vv similarity index 82% rename from vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.vv rename to vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.vv index 0c6a0fcf9..eef4d49b4 100644 --- a/vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.vv +++ b/vlib/v/slow_tests/inout/dump_nested_generic_fn_call_ref_arg.vv @@ -12,18 +12,18 @@ pub fn (s &Score) ave() f64 { fn next[T](input T) f64 { $if T is Average { - dump('${T.name} $input') + dump('${T.name} ${input}') ret := next2[T](input) return ret } $else { - dump('${T.name} $input') + dump('${T.name} ${input}') ret := next2[T](input) return ret } } fn next2[T](input T) f64 { - dump('${T.name} $input') + dump('${T.name} ${input}') $if T is Average { return input.ave() } $else $if T is f64 { @@ -36,7 +36,7 @@ fn main() { dump(next(1)) dump(next(1.0)) dump(next(11.1)) - ave := Score { + ave := Score{ ave: 23.4 } dump(next(ave)) diff --git a/vlib/v/slow_tests/inout/dump_nil_voidptr.out b/vlib/v/slow_tests/inout/dump_nil_voidptr.out new file mode 100644 index 000000000..ea9e45231 --- /dev/null +++ b/vlib/v/slow_tests/inout/dump_nil_voidptr.out @@ -0,0 +1,2 @@ +[vlib/v/slow_tests/inout/dump_nil_voidptr.vv:11] a: &nil +[vlib/v/slow_tests/inout/dump_nil_voidptr.vv:13] a: &nil diff --git a/vlib/v/tests/inout/dump_nil_voidptr.vv b/vlib/v/slow_tests/inout/dump_nil_voidptr.vv similarity index 86% rename from vlib/v/tests/inout/dump_nil_voidptr.vv rename to vlib/v/slow_tests/inout/dump_nil_voidptr.vv index 3f3dac554..e67a82053 100644 --- a/vlib/v/tests/inout/dump_nil_voidptr.vv +++ b/vlib/v/slow_tests/inout/dump_nil_voidptr.vv @@ -3,7 +3,7 @@ fn get_nil() ?&int { } fn get_voidptr() ?&int { - return voidptr(0) + return unsafe { nil } } fn main() { diff --git a/vlib/v/slow_tests/inout/dump_none.out b/vlib/v/slow_tests/inout/dump_none.out new file mode 100644 index 000000000..799e2b1dc --- /dev/null +++ b/vlib/v/slow_tests/inout/dump_none.out @@ -0,0 +1 @@ +[vlib/v/slow_tests/inout/dump_none.vv:2] none: none diff --git a/vlib/v/tests/inout/dump_none.vv b/vlib/v/slow_tests/inout/dump_none.vv similarity index 100% rename from vlib/v/tests/inout/dump_none.vv rename to vlib/v/slow_tests/inout/dump_none.vv diff --git a/vlib/v/slow_tests/inout/dump_shared_arg.out b/vlib/v/slow_tests/inout/dump_shared_arg.out new file mode 100644 index 000000000..d20809439 --- /dev/null +++ b/vlib/v/slow_tests/inout/dump_shared_arg.out @@ -0,0 +1,3 @@ +[vlib/v/slow_tests/inout/dump_shared_arg.vv:12] inst: &AtomicStruct{ + a: 1 +} diff --git a/vlib/v/tests/inout/dump_shared_arg.vv b/vlib/v/slow_tests/inout/dump_shared_arg.vv similarity index 100% rename from vlib/v/tests/inout/dump_shared_arg.vv rename to vlib/v/slow_tests/inout/dump_shared_arg.vv diff --git a/vlib/v/slow_tests/inout/dump_sumtype_of_fntype.out b/vlib/v/slow_tests/inout/dump_sumtype_of_fntype.out new file mode 100644 index 000000000..e0f528089 --- /dev/null +++ b/vlib/v/slow_tests/inout/dump_sumtype_of_fntype.out @@ -0,0 +1 @@ +[vlib/v/slow_tests/inout/dump_sumtype_of_fntype.vv:10] main.MyFnSumtype(main.f): MyFnSumtype(fn (int) v.ast.Expr) diff --git a/vlib/v/tests/inout/dump_sumtype_of_fntype.vv b/vlib/v/slow_tests/inout/dump_sumtype_of_fntype.vv similarity index 100% rename from vlib/v/tests/inout/dump_sumtype_of_fntype.vv rename to vlib/v/slow_tests/inout/dump_sumtype_of_fntype.vv diff --git a/vlib/v/tests/inout/embedded.html b/vlib/v/slow_tests/inout/embedded.html similarity index 100% rename from vlib/v/tests/inout/embedded.html rename to vlib/v/slow_tests/inout/embedded.html diff --git a/vlib/v/tests/inout/enum_print.out b/vlib/v/slow_tests/inout/enum_print.out similarity index 100% rename from vlib/v/tests/inout/enum_print.out rename to vlib/v/slow_tests/inout/enum_print.out diff --git a/vlib/v/tests/inout/enum_print.vv b/vlib/v/slow_tests/inout/enum_print.vv similarity index 92% rename from vlib/v/tests/inout/enum_print.vv rename to vlib/v/slow_tests/inout/enum_print.vv index 3602ca09d..21cd25324 100644 --- a/vlib/v/tests/inout/enum_print.vv +++ b/vlib/v/slow_tests/inout/enum_print.vv @@ -13,7 +13,9 @@ struct Aaa { fn main() { col := Color.green - a := Aaa{color: col} + a := Aaa{ + color: col + } orange := Color.orange println(orange) println(Color.yellow) diff --git a/vlib/v/tests/inout/file.html b/vlib/v/slow_tests/inout/file.html similarity index 100% rename from vlib/v/tests/inout/file.html rename to vlib/v/slow_tests/inout/file.html diff --git a/vlib/v/tests/inout/file.md b/vlib/v/slow_tests/inout/file.md similarity index 100% rename from vlib/v/tests/inout/file.md rename to vlib/v/slow_tests/inout/file.md diff --git a/vlib/v/tests/inout/fixed_array_index.out b/vlib/v/slow_tests/inout/fixed_array_index.out similarity index 100% rename from vlib/v/tests/inout/fixed_array_index.out rename to vlib/v/slow_tests/inout/fixed_array_index.out diff --git a/vlib/v/tests/inout/fixed_array_index.vv b/vlib/v/slow_tests/inout/fixed_array_index.vv similarity index 69% rename from vlib/v/tests/inout/fixed_array_index.vv rename to vlib/v/slow_tests/inout/fixed_array_index.vv index 15fef607b..05edcde64 100644 --- a/vlib/v/tests/inout/fixed_array_index.vv +++ b/vlib/v/slow_tests/inout/fixed_array_index.vv @@ -1,4 +1,4 @@ -a := [1,2]! +a := [1, 2]! println(a[0]) i := 2 _ = a[i] diff --git a/vlib/v/tests/inout/fixed_array_slice.out b/vlib/v/slow_tests/inout/fixed_array_slice.out similarity index 100% rename from vlib/v/tests/inout/fixed_array_slice.out rename to vlib/v/slow_tests/inout/fixed_array_slice.out diff --git a/vlib/v/tests/inout/fixed_array_slice.vv b/vlib/v/slow_tests/inout/fixed_array_slice.vv similarity index 59% rename from vlib/v/tests/inout/fixed_array_slice.vv rename to vlib/v/slow_tests/inout/fixed_array_slice.vv index 56dc0e9f8..4d7aaf6d5 100644 --- a/vlib/v/tests/inout/fixed_array_slice.vv +++ b/vlib/v/slow_tests/inout/fixed_array_slice.vv @@ -1,3 +1,3 @@ -a := [1,2]! +a := [1, 2]! i := 3 _ = a[i..i] diff --git a/vlib/v/tests/inout/footer.md b/vlib/v/slow_tests/inout/footer.md similarity index 100% rename from vlib/v/tests/inout/footer.md rename to vlib/v/slow_tests/inout/footer.md diff --git a/vlib/v/tests/inout/generic_fn_with_array_arg.out b/vlib/v/slow_tests/inout/generic_fn_with_array_arg.out similarity index 100% rename from vlib/v/tests/inout/generic_fn_with_array_arg.out rename to vlib/v/slow_tests/inout/generic_fn_with_array_arg.out diff --git a/vlib/v/tests/inout/generic_fn_with_array_arg.vv b/vlib/v/slow_tests/inout/generic_fn_with_array_arg.vv similarity index 100% rename from vlib/v/tests/inout/generic_fn_with_array_arg.vv rename to vlib/v/slow_tests/inout/generic_fn_with_array_arg.vv diff --git a/vlib/v/tests/inout/go_print.out b/vlib/v/slow_tests/inout/go_print.out similarity index 100% rename from vlib/v/tests/inout/go_print.out rename to vlib/v/slow_tests/inout/go_print.out diff --git a/vlib/v/tests/inout/go_print.vv b/vlib/v/slow_tests/inout/go_print.vv similarity index 61% rename from vlib/v/tests/inout/go_print.vv rename to vlib/v/slow_tests/inout/go_print.vv index e7ddd5c6a..2658bab9e 100644 --- a/vlib/v/tests/inout/go_print.vv +++ b/vlib/v/slow_tests/inout/go_print.vv @@ -1,5 +1,5 @@ -fn main(){ - g := go print([1, 2, 3]) +fn main() { + g := spawn print([1, 2, 3]) g.wait() println('') g2 := spawn print([4, 5, 6]) diff --git a/vlib/v/tests/inout/header.md b/vlib/v/slow_tests/inout/header.md similarity index 100% rename from vlib/v/tests/inout/header.md rename to vlib/v/slow_tests/inout/header.md diff --git a/vlib/v/tests/inout/hello.out b/vlib/v/slow_tests/inout/hello.out similarity index 100% rename from vlib/v/tests/inout/hello.out rename to vlib/v/slow_tests/inout/hello.out diff --git a/vlib/v/tests/inout/hello.vv b/vlib/v/slow_tests/inout/hello.vv similarity index 100% rename from vlib/v/tests/inout/hello.vv rename to vlib/v/slow_tests/inout/hello.vv diff --git a/vlib/v/tests/inout/hello_devs.out b/vlib/v/slow_tests/inout/hello_devs.out similarity index 100% rename from vlib/v/tests/inout/hello_devs.out rename to vlib/v/slow_tests/inout/hello_devs.out diff --git a/vlib/v/slow_tests/inout/hello_devs.vv b/vlib/v/slow_tests/inout/hello_devs.vv new file mode 100644 index 000000000..fd56e40cb --- /dev/null +++ b/vlib/v/slow_tests/inout/hello_devs.vv @@ -0,0 +1,7 @@ +fn main() { + areas := ['game', 'web', 'tools', 'science', 'systems', 'embedded'] + for i := 0; i < areas.len; i++ { + area := areas[i] + println('Hello, ${area} developers!') + } +} diff --git a/vlib/v/tests/inout/nested_generic_fn_call.out b/vlib/v/slow_tests/inout/nested_generic_fn_call.out similarity index 100% rename from vlib/v/tests/inout/nested_generic_fn_call.out rename to vlib/v/slow_tests/inout/nested_generic_fn_call.out diff --git a/vlib/v/tests/inout/nested_generic_fn_call.vv b/vlib/v/slow_tests/inout/nested_generic_fn_call.vv similarity index 100% rename from vlib/v/tests/inout/nested_generic_fn_call.vv rename to vlib/v/slow_tests/inout/nested_generic_fn_call.vv diff --git a/vlib/v/tests/inout/nested_structs.out b/vlib/v/slow_tests/inout/nested_structs.out similarity index 100% rename from vlib/v/tests/inout/nested_structs.out rename to vlib/v/slow_tests/inout/nested_structs.out diff --git a/vlib/v/tests/inout/nested_structs.vv b/vlib/v/slow_tests/inout/nested_structs.vv similarity index 94% rename from vlib/v/tests/inout/nested_structs.vv rename to vlib/v/slow_tests/inout/nested_structs.vv index b73aa177e..4cb29bd7e 100644 --- a/vlib/v/tests/inout/nested_structs.vv +++ b/vlib/v/slow_tests/inout/nested_structs.vv @@ -11,7 +11,7 @@ fn (b &Bbb) print() { struct Aaa { test bool - b Bbb + b Bbb } fn main() { diff --git a/vlib/v/tests/inout/option_fn_arg.out b/vlib/v/slow_tests/inout/option_fn_arg.out similarity index 100% rename from vlib/v/tests/inout/option_fn_arg.out rename to vlib/v/slow_tests/inout/option_fn_arg.out diff --git a/vlib/v/tests/inout/option_fn_arg.vv b/vlib/v/slow_tests/inout/option_fn_arg.vv similarity index 100% rename from vlib/v/tests/inout/option_fn_arg.vv rename to vlib/v/slow_tests/inout/option_fn_arg.vv diff --git a/vlib/v/tests/inout/os.out b/vlib/v/slow_tests/inout/os.out similarity index 100% rename from vlib/v/tests/inout/os.out rename to vlib/v/slow_tests/inout/os.out diff --git a/vlib/v/tests/inout/os.vv b/vlib/v/slow_tests/inout/os.vv similarity index 100% rename from vlib/v/tests/inout/os.vv rename to vlib/v/slow_tests/inout/os.vv diff --git a/vlib/v/tests/inout/panic_with_cg.out b/vlib/v/slow_tests/inout/panic_with_cg.out similarity index 66% rename from vlib/v/tests/inout/panic_with_cg.out rename to vlib/v/slow_tests/inout/panic_with_cg.out index 3c27f3cd1..b87ddef1d 100644 --- a/vlib/v/tests/inout/panic_with_cg.out +++ b/vlib/v/slow_tests/inout/panic_with_cg.out @@ -2,4 +2,4 @@ module: main function: buggy_function() message: panicing... - file: vlib/v/tests/inout/panic_with_cg.vv:3 + file: vlib/v/slow_tests/inout/panic_with_cg.vv:2 diff --git a/vlib/v/tests/inout/panic_with_cg.vv b/vlib/v/slow_tests/inout/panic_with_cg.vv similarity index 59% rename from vlib/v/tests/inout/panic_with_cg.vv rename to vlib/v/slow_tests/inout/panic_with_cg.vv index 7e2fb4f91..05c6fb1c6 100644 --- a/vlib/v/tests/inout/panic_with_cg.vv +++ b/vlib/v/slow_tests/inout/panic_with_cg.vv @@ -1,8 +1,7 @@ - fn buggy_function() { panic('panicing...') } -fn main(){ - buggy_function() +fn main() { + buggy_function() } diff --git a/vlib/v/tests/inout/printing_alias_has_str_method.out b/vlib/v/slow_tests/inout/printing_alias_has_str_method.out similarity index 100% rename from vlib/v/tests/inout/printing_alias_has_str_method.out rename to vlib/v/slow_tests/inout/printing_alias_has_str_method.out diff --git a/vlib/v/tests/inout/printing_alias_has_str_method.vv b/vlib/v/slow_tests/inout/printing_alias_has_str_method.vv similarity index 87% rename from vlib/v/tests/inout/printing_alias_has_str_method.vv rename to vlib/v/slow_tests/inout/printing_alias_has_str_method.vv index 0d610df2f..c80dd90b3 100644 --- a/vlib/v/tests/inout/printing_alias_has_str_method.vv +++ b/vlib/v/slow_tests/inout/printing_alias_has_str_method.vv @@ -8,5 +8,5 @@ fn main() { b := Byte(`a`) println(b) println(b.str()) - println('$b') + println('${b}') } diff --git a/vlib/v/tests/inout/printing_aliases_of_multi_fixed_array.out b/vlib/v/slow_tests/inout/printing_aliases_of_multi_fixed_array.out similarity index 100% rename from vlib/v/tests/inout/printing_aliases_of_multi_fixed_array.out rename to vlib/v/slow_tests/inout/printing_aliases_of_multi_fixed_array.out diff --git a/vlib/v/tests/inout/printing_aliases_of_multi_fixed_array.vv b/vlib/v/slow_tests/inout/printing_aliases_of_multi_fixed_array.vv similarity index 100% rename from vlib/v/tests/inout/printing_aliases_of_multi_fixed_array.vv rename to vlib/v/slow_tests/inout/printing_aliases_of_multi_fixed_array.vv diff --git a/vlib/v/tests/inout/printing_complex_if_exprs_output.out b/vlib/v/slow_tests/inout/printing_complex_if_exprs_output.out similarity index 100% rename from vlib/v/tests/inout/printing_complex_if_exprs_output.out rename to vlib/v/slow_tests/inout/printing_complex_if_exprs_output.out diff --git a/vlib/v/tests/inout/printing_complex_if_exprs_output.vv b/vlib/v/slow_tests/inout/printing_complex_if_exprs_output.vv similarity index 100% rename from vlib/v/tests/inout/printing_complex_if_exprs_output.vv rename to vlib/v/slow_tests/inout/printing_complex_if_exprs_output.vv diff --git a/vlib/v/tests/inout/printing_comptime_if.out b/vlib/v/slow_tests/inout/printing_comptime_if.out similarity index 100% rename from vlib/v/tests/inout/printing_comptime_if.out rename to vlib/v/slow_tests/inout/printing_comptime_if.out diff --git a/vlib/v/tests/inout/printing_comptime_if.vv b/vlib/v/slow_tests/inout/printing_comptime_if.vv similarity index 74% rename from vlib/v/tests/inout/printing_comptime_if.vv rename to vlib/v/slow_tests/inout/printing_comptime_if.vv index 7195cadb7..e401ee576 100644 --- a/vlib/v/tests/inout/printing_comptime_if.vv +++ b/vlib/v/slow_tests/inout/printing_comptime_if.vv @@ -5,6 +5,6 @@ fn main() { fn proc[T](input T) { $if T is &u8 { - println('T is $T.name') + println('T is ${T.name}') } } diff --git a/vlib/v/tests/inout/printing_fixed_array_of_pointers.out b/vlib/v/slow_tests/inout/printing_fixed_array_of_pointers.out similarity index 100% rename from vlib/v/tests/inout/printing_fixed_array_of_pointers.out rename to vlib/v/slow_tests/inout/printing_fixed_array_of_pointers.out diff --git a/vlib/v/tests/inout/printing_fixed_array_of_pointers.vv b/vlib/v/slow_tests/inout/printing_fixed_array_of_pointers.vv similarity index 100% rename from vlib/v/tests/inout/printing_fixed_array_of_pointers.vv rename to vlib/v/slow_tests/inout/printing_fixed_array_of_pointers.vv diff --git a/vlib/v/tests/inout/printing_for_v_in_a.out b/vlib/v/slow_tests/inout/printing_for_v_in_a.out similarity index 100% rename from vlib/v/tests/inout/printing_for_v_in_a.out rename to vlib/v/slow_tests/inout/printing_for_v_in_a.out diff --git a/vlib/v/tests/inout/printing_for_v_in_a.vv b/vlib/v/slow_tests/inout/printing_for_v_in_a.vv similarity index 90% rename from vlib/v/tests/inout/printing_for_v_in_a.vv rename to vlib/v/slow_tests/inout/printing_for_v_in_a.vv index 5b1486f99..96b26127f 100644 --- a/vlib/v/tests/inout/printing_for_v_in_a.vv +++ b/vlib/v/slow_tests/inout/printing_for_v_in_a.vv @@ -13,7 +13,7 @@ fn abc(a Any) { } if a is map[string]string { for k, v in a { - println('> k: $k | v: $v') + println('> k: ${k} | v: ${v}') } } println(@FN) diff --git a/vlib/v/tests/inout/printing_multi_fixed_array.out b/vlib/v/slow_tests/inout/printing_multi_fixed_array.out similarity index 100% rename from vlib/v/tests/inout/printing_multi_fixed_array.out rename to vlib/v/slow_tests/inout/printing_multi_fixed_array.out diff --git a/vlib/v/tests/inout/printing_multi_fixed_array.vv b/vlib/v/slow_tests/inout/printing_multi_fixed_array.vv similarity index 100% rename from vlib/v/tests/inout/printing_multi_fixed_array.vv rename to vlib/v/slow_tests/inout/printing_multi_fixed_array.vv diff --git a/vlib/v/tests/inout/printing_nested_generic_struct.out b/vlib/v/slow_tests/inout/printing_nested_generic_struct.out similarity index 100% rename from vlib/v/tests/inout/printing_nested_generic_struct.out rename to vlib/v/slow_tests/inout/printing_nested_generic_struct.out diff --git a/vlib/v/tests/inout/printing_nested_generic_struct.vv b/vlib/v/slow_tests/inout/printing_nested_generic_struct.vv similarity index 100% rename from vlib/v/tests/inout/printing_nested_generic_struct.vv rename to vlib/v/slow_tests/inout/printing_nested_generic_struct.vv diff --git a/vlib/v/tests/inout/printing_option_in_if_expr.out b/vlib/v/slow_tests/inout/printing_option_in_if_expr.out similarity index 100% rename from vlib/v/tests/inout/printing_option_in_if_expr.out rename to vlib/v/slow_tests/inout/printing_option_in_if_expr.out diff --git a/vlib/v/tests/inout/printing_option_in_if_expr.vv b/vlib/v/slow_tests/inout/printing_option_in_if_expr.vv similarity index 100% rename from vlib/v/tests/inout/printing_option_in_if_expr.vv rename to vlib/v/slow_tests/inout/printing_option_in_if_expr.vv diff --git a/vlib/v/tests/inout/printing_reference_alias.out b/vlib/v/slow_tests/inout/printing_reference_alias.out similarity index 100% rename from vlib/v/tests/inout/printing_reference_alias.out rename to vlib/v/slow_tests/inout/printing_reference_alias.out diff --git a/vlib/v/tests/inout/printing_reference_alias.vv b/vlib/v/slow_tests/inout/printing_reference_alias.vv similarity index 100% rename from vlib/v/tests/inout/printing_reference_alias.vv rename to vlib/v/slow_tests/inout/printing_reference_alias.vv diff --git a/vlib/v/tests/inout/printing_reference_enum.out b/vlib/v/slow_tests/inout/printing_reference_enum.out similarity index 100% rename from vlib/v/tests/inout/printing_reference_enum.out rename to vlib/v/slow_tests/inout/printing_reference_enum.out diff --git a/vlib/v/tests/inout/printing_reference_enum.vv b/vlib/v/slow_tests/inout/printing_reference_enum.vv similarity index 100% rename from vlib/v/tests/inout/printing_reference_enum.vv rename to vlib/v/slow_tests/inout/printing_reference_enum.vv diff --git a/vlib/v/tests/inout/printing_reference_struct.out b/vlib/v/slow_tests/inout/printing_reference_struct.out similarity index 100% rename from vlib/v/tests/inout/printing_reference_struct.out rename to vlib/v/slow_tests/inout/printing_reference_struct.out diff --git a/vlib/v/tests/inout/printing_reference_struct.vv b/vlib/v/slow_tests/inout/printing_reference_struct.vv similarity index 81% rename from vlib/v/tests/inout/printing_reference_struct.vv rename to vlib/v/slow_tests/inout/printing_reference_struct.vv index 7b142ea32..c886ce30b 100644 --- a/vlib/v/tests/inout/printing_reference_struct.vv +++ b/vlib/v/slow_tests/inout/printing_reference_struct.vv @@ -1,4 +1,4 @@ -struct AStruct{} +struct AStruct {} fn main() { ast := &AStruct{} diff --git a/vlib/v/tests/inout/printing_result_in_infix_expr.out b/vlib/v/slow_tests/inout/printing_result_in_infix_expr.out similarity index 100% rename from vlib/v/tests/inout/printing_result_in_infix_expr.out rename to vlib/v/slow_tests/inout/printing_result_in_infix_expr.out diff --git a/vlib/v/tests/inout/printing_result_in_infix_expr.vv b/vlib/v/slow_tests/inout/printing_result_in_infix_expr.vv similarity index 100% rename from vlib/v/tests/inout/printing_result_in_infix_expr.vv rename to vlib/v/slow_tests/inout/printing_result_in_infix_expr.vv diff --git a/vlib/v/tests/inout/printing_result_in_infix_expr2.out b/vlib/v/slow_tests/inout/printing_result_in_infix_expr2.out similarity index 100% rename from vlib/v/tests/inout/printing_result_in_infix_expr2.out rename to vlib/v/slow_tests/inout/printing_result_in_infix_expr2.out diff --git a/vlib/v/tests/inout/printing_result_in_infix_expr2.vv b/vlib/v/slow_tests/inout/printing_result_in_infix_expr2.vv similarity index 100% rename from vlib/v/tests/inout/printing_result_in_infix_expr2.vv rename to vlib/v/slow_tests/inout/printing_result_in_infix_expr2.vv diff --git a/vlib/v/tests/inout/printing_slice_of_multiline_raw_string.out b/vlib/v/slow_tests/inout/printing_slice_of_multiline_raw_string.out similarity index 100% rename from vlib/v/tests/inout/printing_slice_of_multiline_raw_string.out rename to vlib/v/slow_tests/inout/printing_slice_of_multiline_raw_string.out diff --git a/vlib/v/tests/inout/printing_slice_of_multiline_raw_string.vv b/vlib/v/slow_tests/inout/printing_slice_of_multiline_raw_string.vv similarity index 100% rename from vlib/v/tests/inout/printing_slice_of_multiline_raw_string.vv rename to vlib/v/slow_tests/inout/printing_slice_of_multiline_raw_string.vv diff --git a/vlib/v/tests/inout/printing_struct_with_skip_fields.out b/vlib/v/slow_tests/inout/printing_struct_with_skip_fields.out similarity index 100% rename from vlib/v/tests/inout/printing_struct_with_skip_fields.out rename to vlib/v/slow_tests/inout/printing_struct_with_skip_fields.out diff --git a/vlib/v/tests/inout/printing_struct_with_skip_fields.vv b/vlib/v/slow_tests/inout/printing_struct_with_skip_fields.vv similarity index 100% rename from vlib/v/tests/inout/printing_struct_with_skip_fields.vv rename to vlib/v/slow_tests/inout/printing_struct_with_skip_fields.vv diff --git a/vlib/v/tests/inout/printing_sumtype_with_none.out b/vlib/v/slow_tests/inout/printing_sumtype_with_none.out similarity index 100% rename from vlib/v/tests/inout/printing_sumtype_with_none.out rename to vlib/v/slow_tests/inout/printing_sumtype_with_none.out diff --git a/vlib/v/tests/inout/printing_sumtype_with_none.vv b/vlib/v/slow_tests/inout/printing_sumtype_with_none.vv similarity index 100% rename from vlib/v/tests/inout/printing_sumtype_with_none.vv rename to vlib/v/slow_tests/inout/printing_sumtype_with_none.vv diff --git a/vlib/v/tests/inout/push_on_closed_channel.out b/vlib/v/slow_tests/inout/push_on_closed_channel.out similarity index 100% rename from vlib/v/tests/inout/push_on_closed_channel.out rename to vlib/v/slow_tests/inout/push_on_closed_channel.out diff --git a/vlib/v/tests/inout/push_on_closed_channel.vv b/vlib/v/slow_tests/inout/push_on_closed_channel.vv similarity index 100% rename from vlib/v/tests/inout/push_on_closed_channel.vv rename to vlib/v/slow_tests/inout/push_on_closed_channel.vv diff --git a/vlib/v/tests/inout/push_work_on_channel.out b/vlib/v/slow_tests/inout/push_work_on_channel.out similarity index 100% rename from vlib/v/tests/inout/push_work_on_channel.out rename to vlib/v/slow_tests/inout/push_work_on_channel.out diff --git a/vlib/v/tests/inout/push_work_on_channel.vv b/vlib/v/slow_tests/inout/push_work_on_channel.vv similarity index 88% rename from vlib/v/tests/inout/push_work_on_channel.vv rename to vlib/v/slow_tests/inout/push_work_on_channel.vv index 90dedbf0a..9aa75758f 100644 --- a/vlib/v/tests/inout/push_work_on_channel.vv +++ b/vlib/v/slow_tests/inout/push_work_on_channel.vv @@ -5,7 +5,7 @@ fn work(input chan u32, started chan bool) { started <- true for { x := <-input or { break } - println('> work x: $x') + println('> work x: ${x}') time.sleep(50 * time.millisecond) } println('> work ended') @@ -18,7 +18,7 @@ fn main() { for x in 0 .. 10 { ch <- x } - task := go work(ch, work_started) + task := spawn work(ch, work_started) _ := <-work_started ch.close() diff --git a/vlib/v/tests/inout/smart_quote.out b/vlib/v/slow_tests/inout/smart_quote.out similarity index 100% rename from vlib/v/tests/inout/smart_quote.out rename to vlib/v/slow_tests/inout/smart_quote.out diff --git a/vlib/v/tests/inout/smart_quote.vv b/vlib/v/slow_tests/inout/smart_quote.vv similarity index 100% rename from vlib/v/tests/inout/smart_quote.vv rename to vlib/v/slow_tests/inout/smart_quote.vv diff --git a/vlib/v/tests/inout/strconv_v_printf.out b/vlib/v/slow_tests/inout/strconv_v_printf.out similarity index 100% rename from vlib/v/tests/inout/strconv_v_printf.out rename to vlib/v/slow_tests/inout/strconv_v_printf.out diff --git a/vlib/v/tests/inout/strconv_v_printf.vv b/vlib/v/slow_tests/inout/strconv_v_printf.vv similarity index 94% rename from vlib/v/tests/inout/strconv_v_printf.vv rename to vlib/v/slow_tests/inout/strconv_v_printf.vv index d7e5cc1bb..3d183e42b 100644 --- a/vlib/v/tests/inout/strconv_v_printf.vv +++ b/vlib/v/slow_tests/inout/strconv_v_printf.vv @@ -34,7 +34,7 @@ fn main() { strconv.v_printf('%3d', n) } if n % 20 == 0 { - println('iter: $n') + println('iter: ${n}') } } } diff --git a/vlib/v/tests/inout/string_interp.out b/vlib/v/slow_tests/inout/string_interp.out similarity index 100% rename from vlib/v/tests/inout/string_interp.out rename to vlib/v/slow_tests/inout/string_interp.out diff --git a/vlib/v/tests/inout/string_interp.vv b/vlib/v/slow_tests/inout/string_interp.vv similarity index 60% rename from vlib/v/tests/inout/string_interp.vv rename to vlib/v/slow_tests/inout/string_interp.vv index 8f81233b2..613fe34ff 100644 --- a/vlib/v/tests/inout/string_interp.vv +++ b/vlib/v/slow_tests/inout/string_interp.vv @@ -1,5 +1,5 @@ fn main() { test := 'hello' hello := 'world' - println('%.*s$hello$test') + println('%.*s${hello}${test}') } diff --git a/vlib/v/slow_tests/inout/struct_field_option.out b/vlib/v/slow_tests/inout/struct_field_option.out new file mode 100644 index 000000000..eb650f4af --- /dev/null +++ b/vlib/v/slow_tests/inout/struct_field_option.out @@ -0,0 +1,26 @@ +1 +[vlib/v/slow_tests/inout/struct_field_option.vv:15] f.bar?: 1 +2 +[vlib/v/slow_tests/inout/struct_field_option.vv:22] f.bar?: 2 +3 +[vlib/v/slow_tests/inout/struct_field_option.vv:26] f.bar?: 3 +3 +[vlib/v/slow_tests/inout/struct_field_option.vv:30] a: 3 +9999 +[vlib/v/slow_tests/inout/struct_field_option.vv:33] b: 9999 +4 +[vlib/v/slow_tests/inout/struct_field_option.vv:37] sum: 4 +4 +[vlib/v/slow_tests/inout/struct_field_option.vv:40] sum: 4 +3 +none +3 +Foo{ + bar: 3 + baz: 0 +} +[vlib/v/slow_tests/inout/struct_field_option.vv:61] f: Foo{ + bar: 3 + baz: 0 +} +1 \ No newline at end of file diff --git a/vlib/v/tests/inout/struct_field_option.vv b/vlib/v/slow_tests/inout/struct_field_option.vv similarity index 100% rename from vlib/v/tests/inout/struct_field_option.vv rename to vlib/v/slow_tests/inout/struct_field_option.vv diff --git a/vlib/v/tests/inout/sumtype_with_fntype.out b/vlib/v/slow_tests/inout/sumtype_with_fntype.out similarity index 100% rename from vlib/v/tests/inout/sumtype_with_fntype.out rename to vlib/v/slow_tests/inout/sumtype_with_fntype.out diff --git a/vlib/v/tests/inout/sumtype_with_fntype.vv b/vlib/v/slow_tests/inout/sumtype_with_fntype.vv similarity index 100% rename from vlib/v/tests/inout/sumtype_with_fntype.vv rename to vlib/v/slow_tests/inout/sumtype_with_fntype.vv diff --git a/vlib/v/tests/inout/tmpl_all_in_one_folder.out b/vlib/v/slow_tests/inout/tmpl_all_in_one_folder.out similarity index 100% rename from vlib/v/tests/inout/tmpl_all_in_one_folder.out rename to vlib/v/slow_tests/inout/tmpl_all_in_one_folder.out diff --git a/vlib/v/tests/inout/tmpl_all_in_one_folder.vv b/vlib/v/slow_tests/inout/tmpl_all_in_one_folder.vv similarity index 100% rename from vlib/v/tests/inout/tmpl_all_in_one_folder.vv rename to vlib/v/slow_tests/inout/tmpl_all_in_one_folder.vv diff --git a/vlib/v/tests/inout/tmpl_expand_v_source_code.out b/vlib/v/slow_tests/inout/tmpl_expand_v_source_code.out similarity index 100% rename from vlib/v/tests/inout/tmpl_expand_v_source_code.out rename to vlib/v/slow_tests/inout/tmpl_expand_v_source_code.out diff --git a/vlib/v/slow_tests/inout/tmpl_expand_v_source_code.vv b/vlib/v/slow_tests/inout/tmpl_expand_v_source_code.vv new file mode 100644 index 000000000..8d21590d5 --- /dev/null +++ b/vlib/v/slow_tests/inout/tmpl_expand_v_source_code.vv @@ -0,0 +1,17 @@ +module main + +const codepath_file = @FILE + +fn main() { + togenerate := ['user', 'circle'] + for name in togenerate { + object := name + object_u := name.capitalize() + objects := name + 's' + objects_u := name.capitalize() + 's' + mut txt := $tmpl('data_obj.v.templ') + txt = txt.replace('/////////// THIS IS THE TEMPLATE, THIS CAN BE MODIFIED', '') + println(txt) + } + println('OK') +} diff --git a/vlib/v/tests/inout/tmpl_parse_html.out b/vlib/v/slow_tests/inout/tmpl_parse_html.out similarity index 100% rename from vlib/v/tests/inout/tmpl_parse_html.out rename to vlib/v/slow_tests/inout/tmpl_parse_html.out diff --git a/vlib/v/tests/inout/tmpl_parse_html.vv b/vlib/v/slow_tests/inout/tmpl_parse_html.vv similarity index 100% rename from vlib/v/tests/inout/tmpl_parse_html.vv rename to vlib/v/slow_tests/inout/tmpl_parse_html.vv diff --git a/vlib/v/tests/inout/vscript_using_generics_in_os.out b/vlib/v/slow_tests/inout/vscript_using_generics_in_os.out similarity index 100% rename from vlib/v/tests/inout/vscript_using_generics_in_os.out rename to vlib/v/slow_tests/inout/vscript_using_generics_in_os.out diff --git a/vlib/v/tests/inout/vscript_using_generics_in_os.vsh b/vlib/v/slow_tests/inout/vscript_using_generics_in_os.vsh similarity index 100% rename from vlib/v/tests/inout/vscript_using_generics_in_os.vsh rename to vlib/v/slow_tests/inout/vscript_using_generics_in_os.vsh diff --git a/vlib/v/tests/keep_args_alive_test.v b/vlib/v/slow_tests/keep_args_alive_test.v similarity index 97% rename from vlib/v/tests/keep_args_alive_test.v rename to vlib/v/slow_tests/keep_args_alive_test.v index b8a53e8bb..4eda9e8d0 100644 --- a/vlib/v/tests/keep_args_alive_test.v +++ b/vlib/v/slow_tests/keep_args_alive_test.v @@ -11,7 +11,7 @@ import rand import sync -#flag -I@VEXEROOT/vlib/v/tests +#flag -I@VEXEROOT/vlib/v/slow_tests #include "keep_args_alive_test_c.h" fn C.atomic_load_ptr(voidptr) voidptr diff --git a/vlib/v/tests/keep_args_alive_test_c.h b/vlib/v/slow_tests/keep_args_alive_test_c.h similarity index 100% rename from vlib/v/tests/keep_args_alive_test_c.h rename to vlib/v/slow_tests/keep_args_alive_test_c.h diff --git a/vlib/v/tests/modules/acommentedmodule/commentedfile.v b/vlib/v/slow_tests/modules/acommentedmodule/commentedfile.v similarity index 100% rename from vlib/v/tests/modules/acommentedmodule/commentedfile.v rename to vlib/v/slow_tests/modules/acommentedmodule/commentedfile.v diff --git a/vlib/v/tests/prod/.gitignore b/vlib/v/slow_tests/prod/.gitignore similarity index 100% rename from vlib/v/tests/prod/.gitignore rename to vlib/v/slow_tests/prod/.gitignore diff --git a/vlib/v/tests/prod/asserts_should_be_skipped.prod.v b/vlib/v/slow_tests/prod/asserts_should_be_skipped.prod.v similarity index 100% rename from vlib/v/tests/prod/asserts_should_be_skipped.prod.v rename to vlib/v/slow_tests/prod/asserts_should_be_skipped.prod.v diff --git a/vlib/v/tests/prod/asserts_should_be_skipped.prod.v.expected.txt b/vlib/v/slow_tests/prod/asserts_should_be_skipped.prod.v.expected.txt similarity index 100% rename from vlib/v/tests/prod/asserts_should_be_skipped.prod.v.expected.txt rename to vlib/v/slow_tests/prod/asserts_should_be_skipped.prod.v.expected.txt diff --git a/vlib/v/tests/prod/assoc.prod.v b/vlib/v/slow_tests/prod/assoc.prod.v similarity index 100% rename from vlib/v/tests/prod/assoc.prod.v rename to vlib/v/slow_tests/prod/assoc.prod.v diff --git a/vlib/v/tests/prod/assoc.prod.v.expected.txt b/vlib/v/slow_tests/prod/assoc.prod.v.expected.txt similarity index 100% rename from vlib/v/tests/prod/assoc.prod.v.expected.txt rename to vlib/v/slow_tests/prod/assoc.prod.v.expected.txt diff --git a/vlib/v/tests/prod/f64_literals_and_simple_expressions_should_not_round_as_f32.prod.v b/vlib/v/slow_tests/prod/f64_literals_and_simple_expressions_should_not_round_as_f32.prod.v similarity index 100% rename from vlib/v/tests/prod/f64_literals_and_simple_expressions_should_not_round_as_f32.prod.v rename to vlib/v/slow_tests/prod/f64_literals_and_simple_expressions_should_not_round_as_f32.prod.v diff --git a/vlib/v/tests/prod/f64_literals_and_simple_expressions_should_not_round_as_f32.prod.v.expected.txt b/vlib/v/slow_tests/prod/f64_literals_and_simple_expressions_should_not_round_as_f32.prod.v.expected.txt similarity index 100% rename from vlib/v/tests/prod/f64_literals_and_simple_expressions_should_not_round_as_f32.prod.v.expected.txt rename to vlib/v/slow_tests/prod/f64_literals_and_simple_expressions_should_not_round_as_f32.prod.v.expected.txt diff --git a/vlib/v/tests/prod_test.v b/vlib/v/slow_tests/prod_test.v similarity index 95% rename from vlib/v/tests/prod_test.v rename to vlib/v/slow_tests/prod_test.v index 0b67fa451..3037d4c7f 100644 --- a/vlib/v/tests/prod_test.v +++ b/vlib/v/slow_tests/prod_test.v @@ -1,6 +1,6 @@ // Build and run files in ./prod/ folder, comparing their output to *.expected.txt files. // (Similar to REPL tests, but in -prod mode.) -import v.tests.repl.runner +import v.slow_tests.repl.runner import benchmark fn test_all_v_prod_files() { diff --git a/vlib/v/tests/profile/profile_test.v b/vlib/v/slow_tests/profile/profile_test.v similarity index 92% rename from vlib/v/tests/profile/profile_test.v rename to vlib/v/slow_tests/profile/profile_test.v index c67d350fe..5ed2df9ac 100644 --- a/vlib/v/tests/profile/profile_test.v +++ b/vlib/v/slow_tests/profile/profile_test.v @@ -10,7 +10,7 @@ fn test_vexe_exists() { } fn test_v_profile_works() { - sfile := 'vlib/v/tests/profile/profile_test_1.v' + sfile := 'vlib/v/slow_tests/profile/profile_test_1.v' validate_output(@FN, '', sfile, { 'os__init_os_args': 1 'main__main': 1 @@ -20,7 +20,7 @@ fn test_v_profile_works() { } fn test_v_profile_on_off_api_works() { - sfile := 'vlib/v/tests/profile/profile_test_2.v' + sfile := 'vlib/v/slow_tests/profile/profile_test_2.v' res_lines := validate_output(@FN, '', sfile, { 'builtin_init': 1 'main__main': 1 @@ -37,7 +37,7 @@ fn test_v_profile_on_off_api_works() { } fn test_v_profile_fns_option_works() { - sfile := 'vlib/v/tests/profile/profile_test_3.v' + sfile := 'vlib/v/slow_tests/profile/profile_test_3.v' validate_output(@FN, '-profile-fns println', sfile, { 'main__main': -1 'main__abc': -1 diff --git a/vlib/v/tests/profile/profile_test_1.v b/vlib/v/slow_tests/profile/profile_test_1.v similarity index 100% rename from vlib/v/tests/profile/profile_test_1.v rename to vlib/v/slow_tests/profile/profile_test_1.v diff --git a/vlib/v/tests/profile/profile_test_2.v b/vlib/v/slow_tests/profile/profile_test_2.v similarity index 100% rename from vlib/v/tests/profile/profile_test_2.v rename to vlib/v/slow_tests/profile/profile_test_2.v diff --git a/vlib/v/tests/profile/profile_test_3.v b/vlib/v/slow_tests/profile/profile_test_3.v similarity index 100% rename from vlib/v/tests/profile/profile_test_3.v rename to vlib/v/slow_tests/profile/profile_test_3.v diff --git a/vlib/v/tests/repl/.gitattributes b/vlib/v/slow_tests/repl/.gitattributes similarity index 100% rename from vlib/v/tests/repl/.gitattributes rename to vlib/v/slow_tests/repl/.gitattributes diff --git a/vlib/v/tests/repl/.gitignore b/vlib/v/slow_tests/repl/.gitignore similarity index 100% rename from vlib/v/tests/repl/.gitignore rename to vlib/v/slow_tests/repl/.gitignore diff --git a/vlib/v/tests/repl/README.md b/vlib/v/slow_tests/repl/README.md similarity index 100% rename from vlib/v/tests/repl/README.md rename to vlib/v/slow_tests/repl/README.md diff --git a/vlib/v/tests/repl/array_filter.repl b/vlib/v/slow_tests/repl/array_filter.repl similarity index 100% rename from vlib/v/tests/repl/array_filter.repl rename to vlib/v/slow_tests/repl/array_filter.repl diff --git a/vlib/v/tests/repl/array_init.repl b/vlib/v/slow_tests/repl/array_init.repl similarity index 100% rename from vlib/v/tests/repl/array_init.repl rename to vlib/v/slow_tests/repl/array_init.repl diff --git a/vlib/v/tests/repl/array_method.repl b/vlib/v/slow_tests/repl/array_method.repl similarity index 100% rename from vlib/v/tests/repl/array_method.repl rename to vlib/v/slow_tests/repl/array_method.repl diff --git a/vlib/v/tests/repl/bad_in_type.repl.skip b/vlib/v/slow_tests/repl/bad_in_type.repl.skip similarity index 100% rename from vlib/v/tests/repl/bad_in_type.repl.skip rename to vlib/v/slow_tests/repl/bad_in_type.repl.skip diff --git a/vlib/v/tests/repl/chained_fields/bd.repl.skip b/vlib/v/slow_tests/repl/chained_fields/bd.repl.skip similarity index 100% rename from vlib/v/tests/repl/chained_fields/bd.repl.skip rename to vlib/v/slow_tests/repl/chained_fields/bd.repl.skip diff --git a/vlib/v/tests/repl/chained_fields/c.repl.skip b/vlib/v/slow_tests/repl/chained_fields/c.repl.skip similarity index 100% rename from vlib/v/tests/repl/chained_fields/c.repl.skip rename to vlib/v/slow_tests/repl/chained_fields/c.repl.skip diff --git a/vlib/v/tests/repl/chained_fields/c2.repl.skip b/vlib/v/slow_tests/repl/chained_fields/c2.repl.skip similarity index 100% rename from vlib/v/tests/repl/chained_fields/c2.repl.skip rename to vlib/v/slow_tests/repl/chained_fields/c2.repl.skip diff --git a/vlib/v/tests/repl/chained_fields/d.repl.skip b/vlib/v/slow_tests/repl/chained_fields/d.repl.skip similarity index 100% rename from vlib/v/tests/repl/chained_fields/d.repl.skip rename to vlib/v/slow_tests/repl/chained_fields/d.repl.skip diff --git a/vlib/v/tests/repl/chained_fields/ef.repl.skip b/vlib/v/slow_tests/repl/chained_fields/ef.repl.skip similarity index 100% rename from vlib/v/tests/repl/chained_fields/ef.repl.skip rename to vlib/v/slow_tests/repl/chained_fields/ef.repl.skip diff --git a/vlib/v/tests/repl/comptime_tmpl.repl b/vlib/v/slow_tests/repl/comptime_tmpl.repl similarity index 100% rename from vlib/v/tests/repl/comptime_tmpl.repl rename to vlib/v/slow_tests/repl/comptime_tmpl.repl diff --git a/vlib/v/tests/repl/conditional_blocks/for.repl b/vlib/v/slow_tests/repl/conditional_blocks/for.repl similarity index 100% rename from vlib/v/tests/repl/conditional_blocks/for.repl rename to vlib/v/slow_tests/repl/conditional_blocks/for.repl diff --git a/vlib/v/tests/repl/conditional_blocks/if.repl b/vlib/v/slow_tests/repl/conditional_blocks/if.repl similarity index 100% rename from vlib/v/tests/repl/conditional_blocks/if.repl rename to vlib/v/slow_tests/repl/conditional_blocks/if.repl diff --git a/vlib/v/tests/repl/conditional_blocks/if_else.repl b/vlib/v/slow_tests/repl/conditional_blocks/if_else.repl similarity index 100% rename from vlib/v/tests/repl/conditional_blocks/if_else.repl rename to vlib/v/slow_tests/repl/conditional_blocks/if_else.repl diff --git a/vlib/v/tests/repl/default_printing.repl b/vlib/v/slow_tests/repl/default_printing.repl similarity index 100% rename from vlib/v/tests/repl/default_printing.repl rename to vlib/v/slow_tests/repl/default_printing.repl diff --git a/vlib/v/tests/repl/empty_struct.repl.skip b/vlib/v/slow_tests/repl/empty_struct.repl.skip similarity index 100% rename from vlib/v/tests/repl/empty_struct.repl.skip rename to vlib/v/slow_tests/repl/empty_struct.repl.skip diff --git a/vlib/v/slow_tests/repl/entire_commented_module.repl b/vlib/v/slow_tests/repl/entire_commented_module.repl new file mode 100644 index 000000000..96dae9441 --- /dev/null +++ b/vlib/v/slow_tests/repl/entire_commented_module.repl @@ -0,0 +1,7 @@ +import v.slow_tests.modules.acommentedmodule +===output=== +builder error: bad module definition: .entire_commented_module.repl.vrepl_temp.v imports module "v.slow_tests.modules.acommentedmodule" but vlib/v/slow_tests/modules/acommentedmodule/commentedfile.v is defined as module `main` + 1 | import v.slow_tests.modules.acommentedmodule + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2 | import os + 3 | diff --git a/vlib/v/tests/repl/error.repl b/vlib/v/slow_tests/repl/error.repl similarity index 100% rename from vlib/v/tests/repl/error.repl rename to vlib/v/slow_tests/repl/error.repl diff --git a/vlib/v/tests/repl/error_and_continue_print.repl b/vlib/v/slow_tests/repl/error_and_continue_print.repl similarity index 100% rename from vlib/v/tests/repl/error_and_continue_print.repl rename to vlib/v/slow_tests/repl/error_and_continue_print.repl diff --git a/vlib/v/tests/repl/error_exitasdfasdf.repl b/vlib/v/slow_tests/repl/error_exitasdfasdf.repl similarity index 100% rename from vlib/v/tests/repl/error_exitasdfasdf.repl rename to vlib/v/slow_tests/repl/error_exitasdfasdf.repl diff --git a/vlib/v/tests/repl/error_nosave.repl.skip b/vlib/v/slow_tests/repl/error_nosave.repl.skip similarity index 100% rename from vlib/v/tests/repl/error_nosave.repl.skip rename to vlib/v/slow_tests/repl/error_nosave.repl.skip diff --git a/vlib/v/tests/repl/fn_calls.repl b/vlib/v/slow_tests/repl/fn_calls.repl similarity index 100% rename from vlib/v/tests/repl/fn_calls.repl rename to vlib/v/slow_tests/repl/fn_calls.repl diff --git a/vlib/v/tests/repl/function.repl.skip b/vlib/v/slow_tests/repl/function.repl.skip similarity index 100% rename from vlib/v/tests/repl/function.repl.skip rename to vlib/v/slow_tests/repl/function.repl.skip diff --git a/vlib/v/tests/repl/immutable_len_fields/fields.1.repl.skip b/vlib/v/slow_tests/repl/immutable_len_fields/fields.1.repl.skip similarity index 100% rename from vlib/v/tests/repl/immutable_len_fields/fields.1.repl.skip rename to vlib/v/slow_tests/repl/immutable_len_fields/fields.1.repl.skip diff --git a/vlib/v/tests/repl/immutable_len_fields/fields.2.repl.skip b/vlib/v/slow_tests/repl/immutable_len_fields/fields.2.repl.skip similarity index 100% rename from vlib/v/tests/repl/immutable_len_fields/fields.2.repl.skip rename to vlib/v/slow_tests/repl/immutable_len_fields/fields.2.repl.skip diff --git a/vlib/v/tests/repl/immutable_len_fields/fields.3.repl.skip b/vlib/v/slow_tests/repl/immutable_len_fields/fields.3.repl.skip similarity index 100% rename from vlib/v/tests/repl/immutable_len_fields/fields.3.repl.skip rename to vlib/v/slow_tests/repl/immutable_len_fields/fields.3.repl.skip diff --git a/vlib/v/tests/repl/import.repl b/vlib/v/slow_tests/repl/import.repl similarity index 100% rename from vlib/v/tests/repl/import.repl rename to vlib/v/slow_tests/repl/import.repl diff --git a/vlib/v/tests/repl/import_alias.repl b/vlib/v/slow_tests/repl/import_alias.repl similarity index 100% rename from vlib/v/tests/repl/import_alias.repl rename to vlib/v/slow_tests/repl/import_alias.repl diff --git a/vlib/v/tests/repl/naked_strings.repl b/vlib/v/slow_tests/repl/naked_strings.repl similarity index 100% rename from vlib/v/tests/repl/naked_strings.repl rename to vlib/v/slow_tests/repl/naked_strings.repl diff --git a/vlib/v/tests/repl/newlines.repl b/vlib/v/slow_tests/repl/newlines.repl similarity index 100% rename from vlib/v/tests/repl/newlines.repl rename to vlib/v/slow_tests/repl/newlines.repl diff --git a/vlib/v/tests/repl/nomain.repl b/vlib/v/slow_tests/repl/nomain.repl similarity index 100% rename from vlib/v/tests/repl/nomain.repl rename to vlib/v/slow_tests/repl/nomain.repl diff --git a/vlib/v/tests/repl/nothing.repl b/vlib/v/slow_tests/repl/nothing.repl similarity index 100% rename from vlib/v/tests/repl/nothing.repl rename to vlib/v/slow_tests/repl/nothing.repl diff --git a/vlib/v/tests/repl/open_close_string_check.repl b/vlib/v/slow_tests/repl/open_close_string_check.repl similarity index 100% rename from vlib/v/tests/repl/open_close_string_check.repl rename to vlib/v/slow_tests/repl/open_close_string_check.repl diff --git a/vlib/v/tests/repl/option.repl.skip b/vlib/v/slow_tests/repl/option.repl.skip similarity index 100% rename from vlib/v/tests/repl/option.repl.skip rename to vlib/v/slow_tests/repl/option.repl.skip diff --git a/vlib/v/tests/repl/option_call.repl b/vlib/v/slow_tests/repl/option_call.repl similarity index 100% rename from vlib/v/tests/repl/option_call.repl rename to vlib/v/slow_tests/repl/option_call.repl diff --git a/vlib/v/tests/repl/postfix_operators.repl b/vlib/v/slow_tests/repl/postfix_operators.repl similarity index 100% rename from vlib/v/tests/repl/postfix_operators.repl rename to vlib/v/slow_tests/repl/postfix_operators.repl diff --git a/vlib/v/tests/repl/print_and_fn_call.repl b/vlib/v/slow_tests/repl/print_and_fn_call.repl similarity index 100% rename from vlib/v/tests/repl/print_and_fn_call.repl rename to vlib/v/slow_tests/repl/print_and_fn_call.repl diff --git a/vlib/v/tests/repl/println.repl b/vlib/v/slow_tests/repl/println.repl similarity index 100% rename from vlib/v/tests/repl/println.repl rename to vlib/v/slow_tests/repl/println.repl diff --git a/vlib/v/tests/repl/repl_test.v b/vlib/v/slow_tests/repl/repl_test.v similarity index 93% rename from vlib/v/tests/repl/repl_test.v rename to vlib/v/slow_tests/repl/repl_test.v index b072d31fc..2b54a61c4 100644 --- a/vlib/v/tests/repl/repl_test.v +++ b/vlib/v/slow_tests/repl/repl_test.v @@ -1,7 +1,7 @@ module main import os -import v.tests.repl.runner +import v.slow_tests.repl.runner import benchmark import sync.pool @@ -46,7 +46,7 @@ fn test_all_v_repl_files() { bmark: benchmark.new_benchmark() } // warmup, and ensure that the vrepl is compiled in single threaded mode if it does not exist - runner.run_repl_file(os.cache_dir(), session.options.vexec, 'vlib/v/tests/repl/nothing.repl') or { + runner.run_repl_file(os.cache_dir(), session.options.vexec, 'vlib/v/slow_tests/repl/nothing.repl') or { panic(err) } session.bmark.set_total_expected_steps(session.options.files.len) @@ -63,8 +63,8 @@ fn test_all_v_repl_files() { fn worker_repl(mut p pool.PoolProcessor, idx int, thread_id int) voidptr { cdir := os.cache_dir() - mut session := &Session(p.get_shared_context()) - mut tls_bench := &benchmark.Benchmark(p.get_thread_context(idx)) + mut session := unsafe { &Session(p.get_shared_context()) } + mut tls_bench := unsafe { &benchmark.Benchmark(p.get_thread_context(idx)) } if isnil(tls_bench) { tls_bench = benchmark.new_benchmark_pointer() tls_bench.set_total_expected_steps(session.bmark.nexpected_steps) diff --git a/vlib/v/tests/repl/runner/runner.v b/vlib/v/slow_tests/repl/runner/runner.v similarity index 97% rename from vlib/v/tests/repl/runner/runner.v rename to vlib/v/slow_tests/repl/runner/runner.v index 18298e1cc..5ee7dff74 100644 --- a/vlib/v/tests/repl/runner/runner.v +++ b/vlib/v/slow_tests/repl/runner/runner.v @@ -49,7 +49,7 @@ pub fn run_repl_file(wd string, vexec string, file string) !string { input_temporary_filename := os.real_path(os.join_path(wd, 'input_temporary_filename.txt')) os.write_file(input_temporary_filename, input) or { panic(err) } os.write_file(os.real_path(os.join_path(wd, 'original.txt')), fcontent) or { panic(err) } - os.cp_all('vlib/v/tests/repl/tmpl', os.real_path(os.join_path(wd, 'tmpl')), true) or { + os.cp_all('vlib/v/slow_tests/repl/tmpl', os.real_path(os.join_path(wd, 'tmpl')), true) or { panic(err) } rcmd := '${os.quoted_path(vexec)} repl -replfolder ${os.quoted_path(wd)} -replprefix "${fname}." < ${os.quoted_path(input_temporary_filename)}' diff --git a/vlib/v/tests/repl/tmpl/hello.txt b/vlib/v/slow_tests/repl/tmpl/hello.txt similarity index 100% rename from vlib/v/tests/repl/tmpl/hello.txt rename to vlib/v/slow_tests/repl/tmpl/hello.txt diff --git a/vlib/v/tests/repl/var_decl.repl b/vlib/v/slow_tests/repl/var_decl.repl similarity index 100% rename from vlib/v/tests/repl/var_decl.repl rename to vlib/v/slow_tests/repl/var_decl.repl diff --git a/vlib/v/tests/repl/void_vlib_fncall.repl b/vlib/v/slow_tests/repl/void_vlib_fncall.repl similarity index 100% rename from vlib/v/tests/repl/void_vlib_fncall.repl rename to vlib/v/slow_tests/repl/void_vlib_fncall.repl diff --git a/vlib/v/tests/run_project_folders/go_fns_in_different_files_over_the_same_struct/f1.v b/vlib/v/slow_tests/run_project_folders/go_fns_in_different_files_over_the_same_struct/f1.v similarity index 100% rename from vlib/v/tests/run_project_folders/go_fns_in_different_files_over_the_same_struct/f1.v rename to vlib/v/slow_tests/run_project_folders/go_fns_in_different_files_over_the_same_struct/f1.v diff --git a/vlib/v/tests/run_project_folders/go_fns_in_different_files_over_the_same_struct/f2.v b/vlib/v/slow_tests/run_project_folders/go_fns_in_different_files_over_the_same_struct/f2.v similarity index 100% rename from vlib/v/tests/run_project_folders/go_fns_in_different_files_over_the_same_struct/f2.v rename to vlib/v/slow_tests/run_project_folders/go_fns_in_different_files_over_the_same_struct/f2.v diff --git a/vlib/v/tests/run_project_folders/go_fns_in_different_files_over_the_same_struct/main.v b/vlib/v/slow_tests/run_project_folders/go_fns_in_different_files_over_the_same_struct/main.v similarity index 100% rename from vlib/v/tests/run_project_folders/go_fns_in_different_files_over_the_same_struct/main.v rename to vlib/v/slow_tests/run_project_folders/go_fns_in_different_files_over_the_same_struct/main.v diff --git a/vlib/v/tests/run_project_folders/issue_10023_multiple_anon_fns_with_same_position/a.v b/vlib/v/slow_tests/run_project_folders/issue_10023_multiple_anon_fns_with_same_position/a.v similarity index 100% rename from vlib/v/tests/run_project_folders/issue_10023_multiple_anon_fns_with_same_position/a.v rename to vlib/v/slow_tests/run_project_folders/issue_10023_multiple_anon_fns_with_same_position/a.v diff --git a/vlib/v/tests/run_project_folders/issue_10023_multiple_anon_fns_with_same_position/b.v b/vlib/v/slow_tests/run_project_folders/issue_10023_multiple_anon_fns_with_same_position/b.v similarity index 100% rename from vlib/v/tests/run_project_folders/issue_10023_multiple_anon_fns_with_same_position/b.v rename to vlib/v/slow_tests/run_project_folders/issue_10023_multiple_anon_fns_with_same_position/b.v diff --git a/vlib/v/tests/run_project_folders/issue_13443_test_prefixed_fns_in_normal_v_files/any_test.v b/vlib/v/slow_tests/run_project_folders/issue_13443_test_prefixed_fns_in_normal_v_files/any_test.v similarity index 100% rename from vlib/v/tests/run_project_folders/issue_13443_test_prefixed_fns_in_normal_v_files/any_test.v rename to vlib/v/slow_tests/run_project_folders/issue_13443_test_prefixed_fns_in_normal_v_files/any_test.v diff --git a/vlib/v/tests/run_project_folders/issue_13443_test_prefixed_fns_in_normal_v_files/main.v b/vlib/v/slow_tests/run_project_folders/issue_13443_test_prefixed_fns_in_normal_v_files/main.v similarity index 100% rename from vlib/v/tests/run_project_folders/issue_13443_test_prefixed_fns_in_normal_v_files/main.v rename to vlib/v/slow_tests/run_project_folders/issue_13443_test_prefixed_fns_in_normal_v_files/main.v diff --git a/vlib/v/tests/run_project_folders_test.v b/vlib/v/slow_tests/run_project_folders_test.v similarity index 88% rename from vlib/v/tests/run_project_folders_test.v rename to vlib/v/slow_tests/run_project_folders_test.v index 7347efaa9..5c69588fe 100644 --- a/vlib/v/tests/run_project_folders_test.v +++ b/vlib/v/slow_tests/run_project_folders_test.v @@ -13,8 +13,8 @@ fn test_vexe_exists() { fn test_v_profile_works() { os.chdir(vroot) or {} - folders_root := os.join_path(vroot, 'vlib/v/tests/run_project_folders') - folder_names := os.ls(folders_root)? + folders_root := os.join_path(vroot, 'vlib/v/slow_tests/run_project_folders') + folder_names := os.ls(folders_root)! mut folder_paths := []string{} for fname in folder_names { folder_path := os.join_path(folders_root, fname) diff --git a/vlib/v/tests/valgrind/1.strings_and_arrays.v b/vlib/v/slow_tests/valgrind/1.strings_and_arrays.v similarity index 100% rename from vlib/v/tests/valgrind/1.strings_and_arrays.v rename to vlib/v/slow_tests/valgrind/1.strings_and_arrays.v diff --git a/vlib/v/tests/valgrind/2.heap_objects.v b/vlib/v/slow_tests/valgrind/2.heap_objects.v similarity index 100% rename from vlib/v/tests/valgrind/2.heap_objects.v rename to vlib/v/slow_tests/valgrind/2.heap_objects.v diff --git a/vlib/v/tests/valgrind/array_init_with_string_variable.v b/vlib/v/slow_tests/valgrind/array_init_with_string_variable.v similarity index 100% rename from vlib/v/tests/valgrind/array_init_with_string_variable.v rename to vlib/v/slow_tests/valgrind/array_init_with_string_variable.v diff --git a/vlib/v/tests/valgrind/base64.v b/vlib/v/slow_tests/valgrind/base64.v similarity index 100% rename from vlib/v/tests/valgrind/base64.v rename to vlib/v/slow_tests/valgrind/base64.v diff --git a/vlib/v/tests/valgrind/buffer_passed_in_fn_that_uses_tos_on_it.v b/vlib/v/slow_tests/valgrind/buffer_passed_in_fn_that_uses_tos_on_it.v similarity index 100% rename from vlib/v/tests/valgrind/buffer_passed_in_fn_that_uses_tos_on_it.v rename to vlib/v/slow_tests/valgrind/buffer_passed_in_fn_that_uses_tos_on_it.v diff --git a/vlib/v/tests/valgrind/dump_nested_structs.v b/vlib/v/slow_tests/valgrind/dump_nested_structs.v similarity index 100% rename from vlib/v/tests/valgrind/dump_nested_structs.v rename to vlib/v/slow_tests/valgrind/dump_nested_structs.v diff --git a/vlib/v/tests/valgrind/fn_returning_string_param.v b/vlib/v/slow_tests/valgrind/fn_returning_string_param.v similarity index 100% rename from vlib/v/tests/valgrind/fn_returning_string_param.v rename to vlib/v/slow_tests/valgrind/fn_returning_string_param.v diff --git a/vlib/v/tests/valgrind/fn_with_return_should_free_local_vars.v b/vlib/v/slow_tests/valgrind/fn_with_return_should_free_local_vars.v similarity index 100% rename from vlib/v/tests/valgrind/fn_with_return_should_free_local_vars.v rename to vlib/v/slow_tests/valgrind/fn_with_return_should_free_local_vars.v diff --git a/vlib/v/tests/valgrind/free_heap_foos.v b/vlib/v/slow_tests/valgrind/free_heap_foos.v similarity index 100% rename from vlib/v/tests/valgrind/free_heap_foos.v rename to vlib/v/slow_tests/valgrind/free_heap_foos.v diff --git a/vlib/v/tests/valgrind/free_variables_in_reverse_order_of_creation.v b/vlib/v/slow_tests/valgrind/free_variables_in_reverse_order_of_creation.v similarity index 100% rename from vlib/v/tests/valgrind/free_variables_in_reverse_order_of_creation.v rename to vlib/v/slow_tests/valgrind/free_variables_in_reverse_order_of_creation.v diff --git a/vlib/v/tests/valgrind/if_expr.v b/vlib/v/slow_tests/valgrind/if_expr.v similarity index 100% rename from vlib/v/tests/valgrind/if_expr.v rename to vlib/v/slow_tests/valgrind/if_expr.v diff --git a/vlib/v/tests/valgrind/if_expr_skip.v b/vlib/v/slow_tests/valgrind/if_expr_skip.v similarity index 100% rename from vlib/v/tests/valgrind/if_expr_skip.v rename to vlib/v/slow_tests/valgrind/if_expr_skip.v diff --git a/vlib/v/tests/valgrind/import_os_and_use_its_constants.v b/vlib/v/slow_tests/valgrind/import_os_and_use_its_constants.v similarity index 100% rename from vlib/v/tests/valgrind/import_os_and_use_its_constants.v rename to vlib/v/slow_tests/valgrind/import_os_and_use_its_constants.v diff --git a/vlib/v/tests/valgrind/import_x_json2.v b/vlib/v/slow_tests/valgrind/import_x_json2.v similarity index 100% rename from vlib/v/tests/valgrind/import_x_json2.v rename to vlib/v/slow_tests/valgrind/import_x_json2.v diff --git a/vlib/v/tests/valgrind/logging.v b/vlib/v/slow_tests/valgrind/logging.v similarity index 100% rename from vlib/v/tests/valgrind/logging.v rename to vlib/v/slow_tests/valgrind/logging.v diff --git a/vlib/v/tests/valgrind/option_reassigned.v b/vlib/v/slow_tests/valgrind/option_reassigned.v similarity index 100% rename from vlib/v/tests/valgrind/option_reassigned.v rename to vlib/v/slow_tests/valgrind/option_reassigned.v diff --git a/vlib/v/tests/valgrind/option_simple.v b/vlib/v/slow_tests/valgrind/option_simple.v similarity index 100% rename from vlib/v/tests/valgrind/option_simple.v rename to vlib/v/slow_tests/valgrind/option_simple.v diff --git a/vlib/v/tests/valgrind/rand_module.v b/vlib/v/slow_tests/valgrind/rand_module.v similarity index 100% rename from vlib/v/tests/valgrind/rand_module.v rename to vlib/v/slow_tests/valgrind/rand_module.v diff --git a/vlib/v/tests/valgrind/rune_methods.v b/vlib/v/slow_tests/valgrind/rune_methods.v similarity index 100% rename from vlib/v/tests/valgrind/rune_methods.v rename to vlib/v/slow_tests/valgrind/rune_methods.v diff --git a/vlib/v/tests/valgrind/simple_interpolation.v b/vlib/v/slow_tests/valgrind/simple_interpolation.v similarity index 100% rename from vlib/v/tests/valgrind/simple_interpolation.v rename to vlib/v/slow_tests/valgrind/simple_interpolation.v diff --git a/vlib/v/tests/valgrind/simple_interpolation_script_mode.v b/vlib/v/slow_tests/valgrind/simple_interpolation_script_mode.v similarity index 100% rename from vlib/v/tests/valgrind/simple_interpolation_script_mode.v rename to vlib/v/slow_tests/valgrind/simple_interpolation_script_mode.v diff --git a/vlib/v/tests/valgrind/simple_interpolation_script_mode_more_scopes.v b/vlib/v/slow_tests/valgrind/simple_interpolation_script_mode_more_scopes.v similarity index 100% rename from vlib/v/tests/valgrind/simple_interpolation_script_mode_more_scopes.v rename to vlib/v/slow_tests/valgrind/simple_interpolation_script_mode_more_scopes.v diff --git a/vlib/v/tests/valgrind/string_plus_string_plus.v b/vlib/v/slow_tests/valgrind/string_plus_string_plus.v similarity index 100% rename from vlib/v/tests/valgrind/string_plus_string_plus.v rename to vlib/v/slow_tests/valgrind/string_plus_string_plus.v diff --git a/vlib/v/tests/valgrind/string_str_method.v b/vlib/v/slow_tests/valgrind/string_str_method.v similarity index 100% rename from vlib/v/tests/valgrind/string_str_method.v rename to vlib/v/slow_tests/valgrind/string_str_method.v diff --git a/vlib/v/tests/valgrind/strings_builder.v b/vlib/v/slow_tests/valgrind/strings_builder.v similarity index 100% rename from vlib/v/tests/valgrind/strings_builder.v rename to vlib/v/slow_tests/valgrind/strings_builder.v diff --git a/vlib/v/tests/valgrind/struct_field.v b/vlib/v/slow_tests/valgrind/struct_field.v similarity index 100% rename from vlib/v/tests/valgrind/struct_field.v rename to vlib/v/slow_tests/valgrind/struct_field.v diff --git a/vlib/v/tests/valgrind/struct_of_array_of_same_struct.v b/vlib/v/slow_tests/valgrind/struct_of_array_of_same_struct.v similarity index 100% rename from vlib/v/tests/valgrind/struct_of_array_of_same_struct.v rename to vlib/v/slow_tests/valgrind/struct_of_array_of_same_struct.v diff --git a/vlib/v/tests/valgrind/valgrind_test.v b/vlib/v/slow_tests/valgrind/valgrind_test.v similarity index 82% rename from vlib/v/tests/valgrind/valgrind_test.v rename to vlib/v/slow_tests/valgrind/valgrind_test.v index 24307240a..ca1205ad2 100644 --- a/vlib/v/tests/valgrind/valgrind_test.v +++ b/vlib/v/slow_tests/valgrind/valgrind_test.v @@ -14,22 +14,22 @@ fn bold(s string) string { // .v files in skip_valgrind_files will be compiled, but will not be run under // valgrind. This ensures that at least the generated code does not have C syntax // errors. -// Use: `./v -d noskipcompile vlib/v/tests/valgrind/valgrind_test.v` to ignore the +// Use: `./v -d noskipcompile vlib/v/slow_tests/valgrind/valgrind_test.v` to ignore the // skip_compile_files list. -// Use: `./v -d noskip vlib/v/tests/valgrind/valgrind_test.v` to ignore skip_valgrind_files -// Use: `./v -d noskipcompile -d noskip vlib/v/tests/valgrind/valgrind_test.v` to ignore both +// Use: `./v -d noskip vlib/v/slow_tests/valgrind/valgrind_test.v` to ignore skip_valgrind_files +// Use: `./v -d noskipcompile -d noskip vlib/v/slow_tests/valgrind/valgrind_test.v` to ignore both // const skip_compile_files = [ - 'vlib/v/tests/valgrind/option_reassigned.v', + 'vlib/v/slow_tests/valgrind/option_reassigned.v', ] const skip_valgrind_files = [ - 'vlib/v/tests/valgrind/struct_field.v', - 'vlib/v/tests/valgrind/fn_returning_string_param.v', - 'vlib/v/tests/valgrind/fn_with_return_should_free_local_vars.v', - 'vlib/v/tests/valgrind/option_simple.v', - 'vlib/v/tests/valgrind/string_plus_string_plus.v', - 'vlib/v/tests/valgrind/import_x_json2.v', + 'vlib/v/slow_tests/valgrind/struct_field.v', + 'vlib/v/slow_tests/valgrind/fn_returning_string_param.v', + 'vlib/v/slow_tests/valgrind/fn_with_return_should_free_local_vars.v', + 'vlib/v/slow_tests/valgrind/option_simple.v', + 'vlib/v/slow_tests/valgrind/string_plus_string_plus.v', + 'vlib/v/slow_tests/valgrind/import_x_json2.v', ] fn vprintln(s string) { @@ -61,7 +61,7 @@ fn test_all() { eprintln(term.header(bench_message, '-')) vexe := os.getenv('VEXE') vroot := os.dir(vexe) - valgrind_test_path := 'vlib/v/tests/valgrind' + valgrind_test_path := 'vlib/v/slow_tests/valgrind' dir := os.join_path(vroot, valgrind_test_path) mut files := os.ls(dir) or { panic(err) } files.sort() diff --git a/vlib/v/tests/inout/bad_st_as.vv b/vlib/v/tests/inout/bad_st_as.vv deleted file mode 100644 index d099b15b5..000000000 --- a/vlib/v/tests/inout/bad_st_as.vv +++ /dev/null @@ -1,13 +0,0 @@ -struct Struct {struct_name string } -struct Interface {interface_name string} - -type Info = Struct | Interface - -fn main() { - mut info := Info{} - info = Struct{struct_name: 'Foo'} - s := info as Struct - println(s.struct_name) - i := info as Interface // wrong - println(i.interface_name) -} diff --git a/vlib/v/tests/inout/comptime_if_script_mode.vv b/vlib/v/tests/inout/comptime_if_script_mode.vv deleted file mode 100644 index a0fb192b7..000000000 --- a/vlib/v/tests/inout/comptime_if_script_mode.vv +++ /dev/null @@ -1,5 +0,0 @@ -$if vinix { - println('vinix') -} $else { - println('others') -} diff --git a/vlib/v/tests/inout/dump_expression.out b/vlib/v/tests/inout/dump_expression.out deleted file mode 100644 index 9ec04322b..000000000 --- a/vlib/v/tests/inout/dump_expression.out +++ /dev/null @@ -1,32 +0,0 @@ -[vlib/v/tests/inout/dump_expression.vv:5] 1: 1 -[vlib/v/tests/inout/dump_expression.vv:10] 'a': a -[vlib/v/tests/inout/dump_expression.vv:32] a: Aa{ - log: &log.Logger(log.Log{ - level: disabled - output_label: '' - ofile: os.File{ - cfile: 0 - fd: 0 - is_opened: false - } - output_target: console - output_file_name: '' - }) -} -[vlib/v/tests/inout/dump_expression.vv:33] p: Point{ - x: 1 - y: 2 - z: 3 -} -[vlib/v/tests/inout/dump_expression.vv:34] p_mut: Point{ - x: 1 - y: 2 - z: 3 -} -[vlib/v/tests/inout/dump_expression.vv:35] p_ptr: &Point{ - x: 1 - y: 2 - z: 3 -} -[vlib/v/tests/inout/dump_expression.vv:46] os.file_name(vfile): dump_expression.vv -[vlib/v/tests/inout/dump_expression.vv:49] f.read(mut buf): 10 diff --git a/vlib/v/tests/inout/dump_generic_fn_mut_arg.out b/vlib/v/tests/inout/dump_generic_fn_mut_arg.out deleted file mode 100644 index e8e6b5b7e..000000000 --- a/vlib/v/tests/inout/dump_generic_fn_mut_arg.out +++ /dev/null @@ -1 +0,0 @@ -[vlib/v/tests/inout/dump_generic_fn_mut_arg.vv:11] t: &Reptile{} diff --git a/vlib/v/tests/inout/dump_generic_interface_ref_arg.out b/vlib/v/tests/inout/dump_generic_interface_ref_arg.out deleted file mode 100644 index c082f14e3..000000000 --- a/vlib/v/tests/inout/dump_generic_interface_ref_arg.out +++ /dev/null @@ -1,6 +0,0 @@ -[vlib/v/tests/inout/dump_generic_interface_ref_arg.vv:30] mi.in_(): 1.0 -[vlib/v/tests/inout/dump_generic_interface_ref_arg.vv:31] mi.out(): 2.0 -[vlib/v/tests/inout/dump_generic_interface_ref_arg.vv:36] in_put.in_(): 1.0 -[vlib/v/tests/inout/dump_generic_interface_ref_arg.vv:37] in_put.out(): 2.0 -[vlib/v/tests/inout/dump_generic_interface_ref_arg.vv:39] in_put.in_(): 1.0 -[vlib/v/tests/inout/dump_generic_interface_ref_arg.vv:40] in_put.out(): 2.0 diff --git a/vlib/v/tests/inout/dump_match_expr.out b/vlib/v/tests/inout/dump_match_expr.out deleted file mode 100644 index 61d614398..000000000 --- a/vlib/v/tests/inout/dump_match_expr.out +++ /dev/null @@ -1 +0,0 @@ -[vlib/v/tests/inout/dump_match_expr.vv:3] ast.MatchExpr: 1 diff --git a/vlib/v/tests/inout/dump_multiple_ptr.out b/vlib/v/tests/inout/dump_multiple_ptr.out deleted file mode 100644 index 68749254a..000000000 --- a/vlib/v/tests/inout/dump_multiple_ptr.out +++ /dev/null @@ -1,4 +0,0 @@ -[vlib/v/tests/inout/dump_multiple_ptr.vv:3] i: 42 -[vlib/v/tests/inout/dump_multiple_ptr.vv:5] ir: &42 -[vlib/v/tests/inout/dump_multiple_ptr.vv:7] irr: &&42 -[vlib/v/tests/inout/dump_multiple_ptr.vv:9] irrr: &&&42 diff --git a/vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.out b/vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.out deleted file mode 100644 index 3138f05e4..000000000 --- a/vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.out +++ /dev/null @@ -1,23 +0,0 @@ -[vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.vv:19] '${T.name} $input': int 1 -[vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.vv:26] '${T.name} $input': int 1 -[vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.vv:36] next(1): 0.0 -[vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.vv:19] '${T.name} $input': f64 1.0 -[vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.vv:26] '${T.name} $input': f64 1.0 -[vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.vv:37] next(1.0): 64.0 -[vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.vv:19] '${T.name} $input': f64 11.1 -[vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.vv:26] '${T.name} $input': f64 11.1 -[vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.vv:38] next(11.1): 64.0 -[vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.vv:15] '${T.name} $input': Score Score{ - ave: 23.4 -} -[vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.vv:26] '${T.name} $input': Score Score{ - ave: 23.4 -} -[vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.vv:42] next(ave): 23.4 -[vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.vv:15] '${T.name} $input': &Score &Score{ - ave: 23.4 -} -[vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.vv:26] '${T.name} $input': &Score &Score{ - ave: 23.4 -} -[vlib/v/tests/inout/dump_nested_generic_fn_call_ref_arg.vv:43] next(&ave): 23.4 diff --git a/vlib/v/tests/inout/dump_nil_voidptr.out b/vlib/v/tests/inout/dump_nil_voidptr.out deleted file mode 100644 index be5cde440..000000000 --- a/vlib/v/tests/inout/dump_nil_voidptr.out +++ /dev/null @@ -1,2 +0,0 @@ -[vlib/v/tests/inout/dump_nil_voidptr.vv:11] a: &nil -[vlib/v/tests/inout/dump_nil_voidptr.vv:13] a: &nil diff --git a/vlib/v/tests/inout/dump_none.out b/vlib/v/tests/inout/dump_none.out deleted file mode 100644 index 828cf154e..000000000 --- a/vlib/v/tests/inout/dump_none.out +++ /dev/null @@ -1 +0,0 @@ -[vlib/v/tests/inout/dump_none.vv:2] none: none diff --git a/vlib/v/tests/inout/dump_shared_arg.out b/vlib/v/tests/inout/dump_shared_arg.out deleted file mode 100644 index fd00585d6..000000000 --- a/vlib/v/tests/inout/dump_shared_arg.out +++ /dev/null @@ -1,3 +0,0 @@ -[vlib/v/tests/inout/dump_shared_arg.vv:12] inst: &AtomicStruct{ - a: 1 -} diff --git a/vlib/v/tests/inout/dump_sumtype_of_fntype.out b/vlib/v/tests/inout/dump_sumtype_of_fntype.out deleted file mode 100644 index 2c2128dcc..000000000 --- a/vlib/v/tests/inout/dump_sumtype_of_fntype.out +++ /dev/null @@ -1 +0,0 @@ -[vlib/v/tests/inout/dump_sumtype_of_fntype.vv:10] main.MyFnSumtype(main.f): MyFnSumtype(fn (int) v.ast.Expr) diff --git a/vlib/v/tests/inout/hello_devs.vv b/vlib/v/tests/inout/hello_devs.vv deleted file mode 100644 index ab2df2369..000000000 --- a/vlib/v/tests/inout/hello_devs.vv +++ /dev/null @@ -1,7 +0,0 @@ -fn main() { - areas := ['game', 'web', 'tools', 'science', 'systems', 'embedded'] - for i :=0; i < areas.len; i++{ - area:=areas[i] - println('Hello, $area developers!') - } -} diff --git a/vlib/v/tests/inout/struct_field_option.out b/vlib/v/tests/inout/struct_field_option.out deleted file mode 100644 index 7292b2a8a..000000000 --- a/vlib/v/tests/inout/struct_field_option.out +++ /dev/null @@ -1,26 +0,0 @@ -1 -[vlib/v/tests/inout/struct_field_option.vv:15] f.bar?: 1 -2 -[vlib/v/tests/inout/struct_field_option.vv:22] f.bar?: 2 -3 -[vlib/v/tests/inout/struct_field_option.vv:26] f.bar?: 3 -3 -[vlib/v/tests/inout/struct_field_option.vv:30] a: 3 -9999 -[vlib/v/tests/inout/struct_field_option.vv:33] b: 9999 -4 -[vlib/v/tests/inout/struct_field_option.vv:37] sum: 4 -4 -[vlib/v/tests/inout/struct_field_option.vv:40] sum: 4 -3 -none -3 -Foo{ - bar: 3 - baz: 0 -} -[vlib/v/tests/inout/struct_field_option.vv:61] f: Foo{ - bar: 3 - baz: 0 -} -1 \ No newline at end of file diff --git a/vlib/v/tests/inout/tmpl_expand_v_source_code.vv b/vlib/v/tests/inout/tmpl_expand_v_source_code.vv deleted file mode 100644 index 21bd4f0c1..000000000 --- a/vlib/v/tests/inout/tmpl_expand_v_source_code.vv +++ /dev/null @@ -1,18 +0,0 @@ -module main - -const codepath_file = @FILE - -fn main() { - togenerate := ["user","circle"] - for name in togenerate{ - object := name - object_u := name.capitalize() - objects := name+"s" - objects_u := name.capitalize()+"s" - mut txt := $tmpl('data_obj.v.templ') - txt = txt.replace("/////////// THIS IS THE TEMPLATE, THIS CAN BE MODIFIED","") - println(txt) - } - println('OK') -} - diff --git a/vlib/v/tests/known_errors/known_errors_test.v b/vlib/v/tests/known_errors/known_errors_test.v index 63059b4d5..9b143613e 100644 --- a/vlib/v/tests/known_errors/known_errors_test.v +++ b/vlib/v/tests/known_errors/known_errors_test.v @@ -7,7 +7,7 @@ const vroot = os.dir(vexe) const testdata_folder = 'vlib/v/tests/known_errors/testdata' fn test_known_errors_testdata_folder_exists() { - os.chdir(vroot)? + os.chdir(vroot)! assert os.is_dir(testdata_folder) } diff --git a/vlib/v/tests/repl/entire_commented_module.repl b/vlib/v/tests/repl/entire_commented_module.repl deleted file mode 100644 index 40693ce83..000000000 --- a/vlib/v/tests/repl/entire_commented_module.repl +++ /dev/null @@ -1,7 +0,0 @@ -import v.tests.modules.acommentedmodule -===output=== -builder error: bad module definition: .entire_commented_module.repl.vrepl_temp.v imports module "v.tests.modules.acommentedmodule" but vlib/v/tests/modules/acommentedmodule/commentedfile.v is defined as module `main` - 1 | import v.tests.modules.acommentedmodule - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2 | import os - 3 | -- 2.30.2