diff options
| author | Daniel Gavin <danielgavin5@hotmail.com> | 2021-05-05 23:43:12 +0200 |
|---|---|---|
| committer | Daniel Gavin <danielgavin5@hotmail.com> | 2021-05-05 23:43:12 +0200 |
| commit | 28ce0ddfebfd671094e8da231923ff96fb72dd47 (patch) | |
| tree | 62505e3c9959b3c41ef9f1580702679d92f668a7 /tests | |
| parent | d25e7a8dfd64e492e4fe23876f2ccc646ed18c57 (diff) | |
begun argument underlining
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/completions_test.odin | 8 | ||||
| -rw-r--r-- | tests/signatures_test.odin | 38 |
2 files changed, 45 insertions, 1 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin index 59e58ab..d346547 100644 --- a/tests/completions_test.odin +++ b/tests/completions_test.odin @@ -321,4 +321,12 @@ ast_package_completion :: proc(t: ^testing.T) { resolveProvider?: boolean; } +*/ + +/* + position_context.last_token = tokenizer.Token { + kind = .Comma, + }; + + It shows the type instead of the label Token_Kind */
\ No newline at end of file diff --git a/tests/signatures_test.odin b/tests/signatures_test.odin index d5c9da2..ed4392a 100644 --- a/tests/signatures_test.odin +++ b/tests/signatures_test.odin @@ -38,6 +38,42 @@ ast_simple_proc_signature :: proc(t: ^testing.T) { } @(test) +ast_proc_signature_argument_position :: proc(t: ^testing.T) { + + source := test.Source { + main = `package test + cool_function :: proc(a: int, b: int) { + } + + main :: proc() { + cool_function(2,* + } + `, + packages = {}, + }; + + test.expect_signature_parameter_position(t, &source, 1); +} + +@(test) +ast_proc_signature_argument_move_position :: proc(t: ^testing.T) { + + source := test.Source { + main = `package test + cool_function :: proc(a: int, b: int, c: int) { + } + + main :: proc() { + cool_function(2,*, 3); + } + `, + packages = {}, + }; + + test.expect_signature_parameter_position(t, &source, 1); +} + +@(test) ast_proc_group_signature_empty_call :: proc(t: ^testing.T) { source := test.Source { @@ -182,4 +218,4 @@ ast_proc_group_signature_struct :: proc(t: ^testing.T) { }; test.expect_signature_labels(t, &source, {"test.struct_function: proc(a: int, b: My_Struct, c: int)"}); -} +}
\ No newline at end of file |