From 7f294c82784e099bc274d71c88f525595140ed86 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 19 Oct 2022 12:07:33 +0300 Subject: [PATCH] tests: use `_test.v` for the postfix of some test files, that were missing it --- ...rray_index_optional.v => array_index_optional_test.v} | 0 ...all_args.v => fn_call_using_anon_fn_call_args_test.v} | 0 ...eturn_comptime_call.v => return_comptime_call_test.v} | 9 +++++---- 3 files changed, 5 insertions(+), 4 deletions(-) rename vlib/v/tests/{array_index_optional.v => array_index_optional_test.v} (100%) rename vlib/v/tests/{fn_call_using_anon_fn_call_args.v => fn_call_using_anon_fn_call_args_test.v} (100%) rename vlib/v/tests/{return_comptime_call.v => return_comptime_call_test.v} (64%) diff --git a/vlib/v/tests/array_index_optional.v b/vlib/v/tests/array_index_optional_test.v similarity index 100% rename from vlib/v/tests/array_index_optional.v rename to vlib/v/tests/array_index_optional_test.v diff --git a/vlib/v/tests/fn_call_using_anon_fn_call_args.v b/vlib/v/tests/fn_call_using_anon_fn_call_args_test.v similarity index 100% rename from vlib/v/tests/fn_call_using_anon_fn_call_args.v rename to vlib/v/tests/fn_call_using_anon_fn_call_args_test.v diff --git a/vlib/v/tests/return_comptime_call.v b/vlib/v/tests/return_comptime_call_test.v similarity index 64% rename from vlib/v/tests/return_comptime_call.v rename to vlib/v/tests/return_comptime_call_test.v index d47292e2c8..441b5e897f 100644 --- a/vlib/v/tests/return_comptime_call.v +++ b/vlib/v/tests/return_comptime_call_test.v @@ -18,8 +18,9 @@ fn reflect_call(method_name string) string { panic('Method not supported: $method_name') } -fn main() { - result := reflect_call('method_one') - println(result) - assert result == '1' +fn test_reflect_call_returning_a_comptime_method() { + res1 := dump(reflect_call('method_one')) + assert res1 == '1' + res2 := dump(reflect_call('method_two')) + assert res2 == '2' }