v/vlib/v/fmt/tests
Lukas Neubert b406de20df
parser, vfmt: multi line comments are not treated as follow-up comments anymore (#9892)
2021-04-29 09:48:08 +03:00
..
anon_fn_as_param_keep.vv fmt: fix formatting in anon_fn_as_param_keep.vv 2020-12-11 21:13:18 +11:00
anon_fn_call_keep.vv fmt: fix anon fn call (#6120) 2020-08-13 20:05:59 +02:00
anon_fn_expected.vv fmt: fix tests 2020-10-15 12:45:34 +02:00
anon_fn_input.vv fmt: fix tests 2020-10-15 12:45:34 +02:00
array_decomposition_keep.vv parser: change array decompose syntax (#7965) 2021-01-09 22:48:23 +01:00
array_init_expected.vv parser: fix handling of `-` inside array literals (#9771) 2021-04-17 02:37:17 +03:00
array_init_inline_comments_keep.vv vfmt: fix `match x { 10 /* ... */ {} }` and `a := [1/* x */, /* y */2, 3]` 2020-11-11 22:59:43 +02:00
array_init_input.vv parser: fix handling of `-` inside array literals (#9771) 2021-04-17 02:37:17 +03:00
array_init_keep.vv fmt: keep some line comments in multi line arrays (#8969) 2021-02-26 09:01:03 +02:00
array_newlines_keep.vv fmt: fix tests 2020-10-15 12:45:34 +02:00
array_slices_expected.vv fmt: lots of fixes 2020-04-25 17:49:16 +02:00
array_slices_input.vv fmt: lots of fixes 2020-04-25 17:49:16 +02:00
array_static_keep.vv fmt: align each contiguous field of struct. not the whole. (#7981) 2021-01-12 04:38:43 +01:00
asserts_expected.vv fmt: assert (a == b) -> assert a == b (#8351) 2021-01-26 10:36:21 +01:00
asserts_input.vv fmt: assert (a == b) -> assert a == b (#8351) 2021-01-26 10:36:21 +01:00
asserts_keep.vv vmft2: support for multiline comments, CompIf, AssertStmt, octal literals 2020-03-24 22:18:58 +01:00
attrs_expected.vv fmt: fix removal of attrs with comments afterwards (#9255) 2021-03-11 21:44:33 +01:00
attrs_input.vv fmt: fix removal of attrs with comments afterwards (#9255) 2021-03-11 21:44:33 +01:00
attrs_keep.vv fmt: fix backslash doubling in attribute string args (#9175) 2021-03-07 09:44:58 +02:00
bin2v_keep.vv fmt: test bin2v output formatting (#7926) 2021-01-07 21:36:59 +01:00
blocks_expected.vv fmt: don't add newlines for UnsafeExpr (#6048) 2020-08-04 00:29:10 +02:00
blocks_input.vv fmt: don't add newlines for UnsafeExpr (#6048) 2020-08-04 00:29:10 +02:00
c_struct_init_keep.vv vfmt: add _keep.vv tests for the recent fixes, to prevent regressions 2020-07-02 17:50:21 +03:00
cast_expected.vv fmt: don't prepend mod when cast with selective imported types (#9109) 2021-03-04 12:33:52 +02:00
cast_input.vv fmt: don't prepend mod when cast with selective imported types (#9109) 2021-03-04 12:33:52 +02:00
chan_init_keep.vv fmt: do not remove chan type of struct fields (#8948) 2021-02-24 20:26:12 +02:00
chan_ops_keep.vv all: update repo to use the new error handling syntax (#8950) 2021-02-28 23:20:21 +03:00
chan_or_keep.vv vfmt: shorten `main.const_name` to just `const_name` 2021-01-25 20:57:33 +02:00
char_literal_backtick_keep.vv parser: `expression evaluated but not used` error 2020-06-16 11:06:53 +02:00
comments_array_keep.vv fmt: prevent rare code corruption with array pre comments (#9908) 2021-04-29 08:28:44 +03:00
comments_expected.vv parser, vfmt: multi line comments are not treated as follow-up comments anymore (#9892) 2021-04-29 09:48:08 +03:00
comments_input.vv parser, vfmt: multi line comments are not treated as follow-up comments anymore (#9892) 2021-04-29 09:48:08 +03:00
comments_keep.vv fmt: allow ascii art block comments (#9332) 2021-03-16 20:49:55 +02:00
comptime_field_selector_keep.vv parser: add warning for s.$field.name without brackets (#8411) 2021-01-30 12:56:10 +01:00
comptime_field_selector_parentheses_keep.vv all: implement basic comptime field selector (#7888) 2021-01-05 16:11:43 +02:00
comptime_keep.vv ast, cgen, checker, parser: support method arguments in comptime $for (#9208) 2021-03-11 15:04:34 +02:00
concat_expr_expected.vv fmt: better ternary concat wrapping (#8379) 2021-01-28 11:23:48 +01:00
concat_expr_input.vv fmt: better ternary concat wrapping (#8379) 2021-01-28 11:23:48 +01:00
conditional_compilation_keep.vv vfmt: fix eating ? in `$if x ? {}`, missing newline in `__global ...` 2020-05-01 12:29:23 +03:00
conditions_expected.vv fmt: lots of fixes 2020-04-25 17:49:16 +02:00
conditions_input.vv fmt: lots of fixes 2020-04-25 17:49:16 +02:00
consts_expected.vv all: use `macos` consistently in os.user_os and the compiler 2020-09-29 22:32:20 +03:00
consts_input.vv all: use `macos` consistently in os.user_os and the compiler 2020-09-29 22:32:20 +03:00
consts_keep.vv fmt: reset const field align after multi line exprs (#9916) 2021-04-29 02:17:37 +03:00
consts_with_comments_keep.vv vfmt: handle comments after last const field 2020-08-27 15:07:49 +03:00
embed_file_keep.vv all: add support for the `x := $embed_file('v.png')` compile time call (#8048) 2021-01-14 16:20:11 +02:00
empty_curlies_and_parens_keep.vv fmt: keep empty curlies and parenthesis as they are (#7329) 2020-12-22 23:43:48 +01:00
empty_lines_expected.vv fmt: respect user choice of empty lines between type declarations (#9135) 2021-03-06 21:05:55 +02:00
empty_lines_input.vv fmt: respect user choice of empty lines between type declarations (#9135) 2021-03-06 21:05:55 +02:00
empty_lines_keep.vv all: fixes related to Node.pos (#9613) 2021-04-06 15:16:19 +02:00
enum_comments_keep.vv vfmt: add _keep.vv tests for the recent fixes, to prevent regressions 2020-07-02 17:50:21 +03:00
enums_expected.vv fmt: split tests 2020-03-08 15:57:16 +01:00
enums_input.vv fmt: split tests 2020-03-08 15:57:16 +01:00
expressions_expected.vv fmt: proper single line check for ConcatExpr (#9121) 2021-03-05 15:36:49 +03:00
expressions_input.vv fmt: proper single line check for ConcatExpr (#9121) 2021-03-05 15:36:49 +03:00
file_with_just_imports_keep.vv vfmt: turn off module is imported but never used for vfmt 2020-07-11 15:03:37 +03:00
fixed_size_array_type_keep.vv fmt: keep constant sizes in struct field fixed array types (#9910) 2021-04-28 22:11:15 +03:00
fn_headers_with_no_bodies_keep.vv all: remove byteptr and charptr; replace them with &byte and &char 2021-04-04 17:43:32 +03:00
fn_multi_return_keep.vv fmt: refactor `type_to_str` (#6607) 2020-10-12 18:41:42 +03:00
fn_return_generic_struct_keep.vv vfmt: fix fn/method that return generic struct (#9638) 2021-04-08 08:24:34 +03:00
fn_trailing_arg_syntax_expected.vv fmt: remove tail space when using multiline short arg (#9110) 2021-03-04 12:44:50 +02:00
fn_trailing_arg_syntax_input.vv fmt: remove tail space when using multiline short arg (#9110) 2021-03-04 12:44:50 +02:00
fn_trailing_arg_syntax_keep.vv ci: fix failing fn_trailing_arg_syntax_keep.vv 2021-03-04 13:05:14 +02:00
fn_with_anon_params_keep.vv all: remove byteptr and charptr; replace them with &byte and &char 2021-04-04 17:43:32 +03:00
fntype_alias_array_keep.vv vfmt: fix `type MyFn = fn (int) int mut arr := []MyFn{}` 2020-12-09 15:18:45 +02:00
fntype_alias_keep.vv all: rename `[ref_only]` -> `[heap]` (#8718) 2021-02-13 16:52:01 +02:00
fntype_mut_args_with_optional_keep.vv vfmt: add a regression test for `type SocketMessageFn = fn (mut c Client, msg &Message) ? 2020-08-04 16:13:04 +03:00
fntype_return_optional_keep.vv vfmt: add a regression test for `type SocketMessageFn = fn (mut c Client, msg &Message) ? 2020-08-04 16:13:04 +03:00
functions_expected.vv fmt: fix tests 2020-10-15 12:45:34 +02:00
functions_input.vv fmt: fix tests 2020-10-15 12:45:34 +02:00
generic_recursive_structs_keep.vv parser: simplify parse_generic_struct_inst_type() (#9801) 2021-04-19 14:47:39 +03:00
generic_structs_keep.vv fmt: do not insert a space before struct declaration generics (#9239) 2021-03-11 14:54:40 +02:00
generics_keep.vv fmt: keep generic type in method call (#7874) 2021-01-05 01:29:58 +01:00
global_keep.vv all: make __global behave consistent with const (#9711) 2021-04-19 17:07:47 +03:00
go_stmt_expected.vv fmt: keep single empty lines (#8189) 2021-01-19 14:49:40 +01:00
go_stmt_input.vv fmt: lots of fixes 2020-04-25 17:49:16 +02:00
go_stmt_keep.vv fmt: fix inserted empty line before go stmt with anonymus function (#8951) 2021-02-25 01:30:04 +01:00
goto_expected.vv fmt: split tests 2020-03-08 15:57:16 +01:00
goto_input.vv fmt: split tests 2020-03-08 15:57:16 +01:00
hashstmt_expected.vv fmt: insert newline after last HashStmt (#8482) 2021-02-01 14:50:41 +01:00
hashstmt_input.vv fmt: insert newline after last HashStmt (#8482) 2021-02-01 14:50:41 +01:00
hashstmt_keep.vv fmt: insert newline after last HashStmt (#8482) 2021-02-01 14:50:41 +01:00
if_brace_on_newline_expected.vv fmt: put the opening brace on a new line again for infix (#8336) 2021-01-26 11:19:32 +01:00
if_brace_on_newline_input.vv fmt: put the opening brace on a new line again for infix (#8336) 2021-01-26 11:19:32 +01:00
if_expected.vv fmt: single line ternary return (#8605) 2021-02-08 00:28:46 +01:00
if_input.vv fmt: single line ternary return (#8605) 2021-02-08 00:28:46 +01:00
if_keep.vv parser,fmt: fix regression with non-void arrays in if conditions (#9161) 2021-03-06 20:39:38 +02:00
if_ternary_expected.vv fmt: better function call wrapping inside ternary if branches (#8604) 2021-02-06 21:46:52 +01:00
if_ternary_input.vv fmt: better function call wrapping inside ternary if branches (#8604) 2021-02-06 21:46:52 +01:00
if_ternary_keep.vv fmt: keep single line if in struct init (#8734) 2021-02-14 19:22:24 +01:00
import_auto_added_expected.vv fmt: fix pos of added imports (#8931) 2021-02-24 19:33:17 +01:00
import_auto_added_input.vv fmt: fix pos of added imports (#8931) 2021-02-24 19:33:17 +01:00
import_keep.vv fmt: keep comments between and after imports (#8637) 2021-02-08 19:48:48 +02:00
import_multiple_expected.vv fmt: use `import module` syntax 2020-04-14 19:32:23 +02:00
import_multiple_input.vv fmt: remove duplicated imports (#8433) 2021-01-30 11:04:36 +02:00
import_multiple_with_alias_expected.vv fmt: use `import module` syntax 2020-04-14 19:32:23 +02:00
import_multiple_with_alias_input.vv fmt: handle indents 2020-04-13 16:36:32 +02:00
import_selective_expected.vv fmt: mark types import as used in interface (#9718) 2021-04-15 01:29:17 +02:00
import_selective_input.vv fmt: mark types import as used in interface (#9718) 2021-04-15 01:29:17 +02:00
import_single_keep.vv fmt: keep comments after imports (#8483) 2021-02-01 14:45:08 +01:00
import_with_alias_keep.vv fmt: fix import aliases in type declarations (#9483) 2021-03-27 11:33:41 +01:00
infix_expr_expected.vv fmt: split infix wrapping into smaller functions and fix a trailing space bug (#9806) 2021-04-19 21:56:39 +03:00
infix_expr_input.vv fmt: split infix wrapping into smaller functions and fix a trailing space bug (#9806) 2021-04-19 21:56:39 +03:00
infix_expr_keep.vv fmt: proper infix operator detection in wrapping logic (#9824) 2021-04-20 15:20:11 +03:00
integer_literal_keep.vv fmt: keep _ separator in number literals (#7495) 2020-12-23 14:48:43 +02:00
interface_declaration_comments_keep.vv fmt: keep interface comments between methods (#7650) 2020-12-28 18:14:55 +02:00
interface_variadic_keep.vv parser: fix parsing interface methods with varargs (#8229) 2021-01-20 23:15:02 +02:00
interface_with_mut_fields_keep.vv vfmt: keep `mut:` in interface declarations (#9053) 2021-03-04 15:30:30 +02:00
labelled_break_continue_keep.vv fmt: fix labelled break & continue (#6889) 2020-11-20 14:12:40 +01:00
language_prefixes_keep.vv vfmt: do not replace module aliases in fn param and return types (#7472) 2020-12-22 22:38:13 +02:00
loops_expected.vv fmt: fix formatting backtick char literal 2020-04-30 09:33:43 +02:00
loops_input.vv fmt: fix formatting backtick char literal 2020-04-30 09:33:43 +02:00
manualfree_keep.v parser,fmt: implement `[manualfree] module abc` for opting out *all* fns in a given .v from autofree 2021-01-08 17:24:42 +02:00
maps_expected.vv doc, fmt: use `map{key: value}` syntax for map literals (#8623) 2021-02-08 16:57:42 +02:00
maps_in_fn_args__keep.vv vfmt: add maps_in_fn_args__keep.vv test for 3a369f5 2020-06-10 17:15:53 +03:00
maps_input.vv fmt: improve map value alignment (#7105) (#7151) 2020-12-06 02:04:45 +01:00
maps_keep.vv doc, fmt: use `map{key: value}` syntax for map literals (#8623) 2021-02-08 16:57:42 +02:00
maps_of_fns_with_string_keys_keep.vv docs: fix functions in array/map example (#8695) 2021-02-12 21:10:54 +02:00
match_expected.vv fmt: improve match branch wrapping (#9619) 2021-04-07 15:26:10 +02:00
match_input.vv fmt: move else branch of match expr to the end (#9766) 2021-04-17 08:28:33 +03:00
match_keep.vv all: update repo to use the new error handling syntax (#8950) 2021-02-28 23:20:21 +03:00
match_range_expression_branches_keep.vv dont allow method on non-local types & no mod for arrays. closes #6971 2020-11-30 11:43:22 +11:00
match_with_commented_branches_keep.vv ast: merge `IfExpr` and `CompIf` (#6011) 2020-09-18 00:58:54 +02:00
missing_import_expected.vv fmt: use `import module` syntax 2020-04-14 19:32:23 +02:00
missing_import_input.vv fmt: test automatic import insertion 2020-04-12 17:57:05 +02:00
module_alias_keep.vv vfmt: do not replace module aliases in fn param and return types (#7472) 2020-12-22 22:38:13 +02:00
module_interface_keep.vv fmt: interface decl fixes (#5829) 2020-07-14 18:52:28 +02:00
module_struct_keep.vv vfmt: skip skipped modules; add module test 2020-04-10 22:32:52 +02:00
multi_generic_test_keep.vv all: implement multiple generics (#8231) 2021-01-22 13:49:56 +01:00
multiline_comment_keep.vv fmt: lots of fixes 2020-04-25 17:49:16 +02:00
nested_map_type_keep.vv fmt: fix multiple problems with types (#6603) 2020-10-12 09:27:55 +03:00
newlines_keep.vv fmt: respect user choice of newlines between functions without body (#8838) 2021-02-20 16:00:30 +02:00
no_main_expected.vv fmt: allow parsing files without `fn main()` (#5681) 2020-07-05 20:53:01 +02:00
no_main_input.vv fmt: allow parsing files without `fn main()` (#5681) 2020-07-05 20:53:01 +02:00
offset_keep.vv all: add offsetof (#8380) 2021-01-30 12:57:09 +01:00
operator_overload_keep.vv ci: fix the failing build-module-docs job 2020-12-22 17:25:57 +02:00
optional_keep.vv fmt: fix optional formatting 2020-04-22 20:12:58 +02:00
optional_propagate_keep.vv fmt: insert space in front of `?` for propagation (#6250) 2020-08-29 01:56:43 +02:00
or_keep.vv fmt: fix possible removal of PrefixExpr or blocks (#9351) 2021-03-17 20:43:28 +02:00
orm_keep.vv fmt: keep order by in orm blocks (#7576) 2020-12-26 14:18:09 +02:00
par_expr_expected.vv fmt: remove parenthesis around single ident (#9696) 2021-04-12 16:01:03 +03:00
par_expr_input.vv fmt: remove parenthesis around single ident (#9696) 2021-04-12 16:01:03 +03:00
proto_module_importing_vproto_keep.vv vfmt: fix deep nested map types, using f.table.type_to_str 2020-10-13 16:08:25 +03:00
ref_type_cast_keep.vv vfmt: add _keep.vv tests for the recent fixes, to prevent regressions 2020-07-02 17:50:21 +03:00
select_keep.vv fmt: smarter if condition wrapping (#8201) 2021-01-23 10:33:22 +02:00
shared_expected.vv all: fix references to time.wait -> time.sleep 2021-02-28 18:01:31 +02:00
shared_input.vv all: fix references to time.wait -> time.sleep 2021-02-28 18:01:31 +02:00
star__amp_int__cast_keep.vv vfmt: fix `x := *&int(ptr)` 2020-07-21 15:58:17 +03:00
static_mut_keep.vv fmt: fix support for `mut static x := 42` 2021-02-28 19:40:21 +02:00
stmt_keep.vv fmt: do not write single line or blocks with multi line stmts (#8952) 2021-02-26 08:41:24 +02:00
string_interpolation_complex_keep.vv vfmt: fix string interpolation formatting with multiple ',",\' and \" . 2021-04-20 20:26:06 +03:00
string_interpolation_expected.vv fmt: fix multiple things and format most of the compiler (#6631) 2020-10-15 22:12:59 +02:00
string_interpolation_input.vv fmt: fix tests 2020-10-15 12:45:34 +02:00
string_interpolation_keep.vv fmt: fix string interpolation with CastExpr (#9137) 2021-03-06 20:47:19 +02:00
string_quotes_expected.vv fmt: improve string quotes (#8075) 2021-01-13 06:05:27 +01:00
string_quotes_input.vv fmt: improve string quotes (#8075) 2021-01-13 06:05:27 +01:00
string_raw_and_cstr_keep.vv vfmt: fix eating `c` in `c'foo'` (#7009) 2020-11-29 10:39:50 +02:00
struct_decl_keep.vv fmt: keep __global in struct declarations (#8584) 2021-02-05 16:46:43 +01:00
struct_default_field_expressions_keep.vv fmt: align struct field comments (#7632) 2021-01-03 21:10:25 +01:00
struct_embed_keep.vv fmt: fix bug that vfmt removes emmbeded struct in struct decl (#8775) 2021-02-16 12:45:56 +01:00
struct_fn_fields_expected.vv fmt: fix broken formatting in fn struct fields (#7794) 2021-01-02 16:36:31 +01:00
struct_fn_fields_input.vv fmt: fix broken formatting in fn struct fields (#7794) 2021-01-02 16:36:31 +01:00
struct_init_keep.vv parser: deprecate `{var |` struct update (#8618) 2021-02-08 17:03:05 +02:00
struct_init_with_comments_keep.vv vfmt: support inline comments before fields in struct initializations 2020-11-05 18:49:52 +02:00
struct_init_with_custom_len_keep.vv fmt: align struct field comments (#7632) 2021-01-03 21:10:25 +01:00
struct_init_with_ref_cast_keep.vv fmt: add struct init keep test, fix another &&Foo bug 2020-05-30 22:34:57 +03:00
struct_keep.vv fmt: correct indent for StructDecl multi line default exprs (#8148) 2021-01-17 05:01:55 +01:00
struct_no_extra_attr_keep.vv all: rename `[ref_only]` -> `[heap]` (#8718) 2021-02-13 16:52:01 +02:00
struct_update_comment_keep.vv vfmt: fix comments before ...f in Abc{...f} (#7870) 2021-01-04 21:01:35 +02:00
struct_update_keep.vv parser: struct updating syntax with `Abc{...oldabc newfield: val}` (#7865) 2021-01-04 20:19:03 +02:00
struct_with_fn_fields_keep.vv vfmt: fix `struct Abc { field fn() ? }` 2020-12-18 11:32:04 +02:00
structs_expected.vv parser: fix last_line of no body C struct (#9809) 2021-04-20 21:37:00 +03:00
structs_input.vv parser: fix last_line of no body C struct (#9809) 2021-04-20 21:37:00 +03:00
sum_smartcast_keep.vv all: refactor UnionSumType to SumType (#6944) 2020-11-25 13:09:40 +02:00
to_string_2_forms_keep.vv builtin: x.vstring() instead of string(x) (#6102) 2020-08-10 18:05:26 +02:00
trailing_space_expected.vv fmt: remove trailing space in comments (#9620) 2021-04-07 15:25:11 +02:00
trailing_space_input.vv fmt: remove trailing space in comments (#9620) 2021-04-07 15:25:11 +02:00
type_ptr_keep.vv parser: support casting to a pointer to array (#7861) 2021-01-04 18:22:04 +02:00
typeof_keep.vv fmt: change `[1,2,3]!!` to `[1,2,3]!` (#8081) 2021-01-13 08:32:17 +01:00
types_expected.vv ast, parser: add type_pos to TypeDecl nodes (#9571) 2021-04-09 14:51:25 +03:00
types_input.vv all: refactor UnionSumType to SumType (#6944) 2020-11-25 13:09:40 +02:00
union_keep.vv vfmt: fix `union {}` declarations 2020-11-03 00:35:12 +02:00
unsafe_keep.vv vfmt: keep UnsafeExpr linebreacks as set by developer (#7558) 2020-12-25 16:52:16 +02:00
void_optional_keep.vv fmt: make single-stmt `or` blocks single-line (#7126) 2020-12-04 13:25:23 +02:00
vscript_keep.vv fmt: keep same line comments after arr.sort() in vsh files (#8026) 2021-01-13 20:10:17 +02:00