diff options
| author | Daniel Gavin <danielgavin5@hotmail.com> | 2022-01-11 23:21:57 +0100 |
|---|---|---|
| committer | Daniel Gavin <danielgavin5@hotmail.com> | 2022-01-11 23:21:57 +0100 |
| commit | 3f3eb27677088d86cd7e0331f98385d497d0966a (patch) | |
| tree | 1f3fc486ea5f8b2da3603fd9b0cca9dcf9572fa2 /tests | |
| parent | 04e2312b458d0448bf39bd94a1770c0710c8f255 (diff) | |
simplified how variables are decided
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/completions_test.odin | 8 | ||||
| -rw-r--r-- | tests/hover_test.odin | 2 | ||||
| -rw-r--r-- | tests/signatures_test.odin | 21 |
3 files changed, 4 insertions, 27 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin index e0961d6..238cfd3 100644 --- a/tests/completions_test.odin +++ b/tests/completions_test.odin @@ -1211,7 +1211,6 @@ ast_distinct_u32_completion :: proc(t: ^testing.T) { @(test) ast_new_completion :: proc(t: ^testing.T) { - source := test.Source { main = `package main new :: proc($T: typeid) -> (^T, Allocator_Error) #optional_second { @@ -1225,25 +1224,24 @@ ast_new_completion :: proc(t: ^testing.T) { `, }; - test.expect_completion_details(t, &source, "", {"test.d: Distinct_Type"}); + test.expect_completion_details(t, &source, "", {"test.adzz: int"}); } @(test) ast_rawtr_cast_completion :: proc(t: ^testing.T) { - source := test.Source { main = `package main main :: proc() { raw: rawptr - my_int := cast(^int)raw; + my_int := cast(int)raw; my_i* } `, }; - test.expect_completion_details(t, &source, "", {"test.d: Distinct_Type"}); + test.expect_completion_details(t, &source, "", {"test.my_int: int"}); } ast_overload_with_procedure_return :: proc(t: ^testing.T) { diff --git a/tests/hover_test.odin b/tests/hover_test.odin index ba4ffb5..6800820 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -79,5 +79,5 @@ ast_hover_external_package_parameter :: proc(t: ^testing.T) { packages = packages[:], }; - test.expect_hover(t, &source, "cool: my_package.My_Struct"); + test.expect_hover(t, &source, "test.cool: My_Struct"); }
\ No newline at end of file diff --git a/tests/signatures_test.odin b/tests/signatures_test.odin index 9363962..6e29db6 100644 --- a/tests/signatures_test.odin +++ b/tests/signatures_test.odin @@ -8,7 +8,6 @@ import test "shared:testing" @(test) ast_declare_proc_signature :: proc(t: ^testing.T) { - source := test.Source { main = `package test main :: proc(*) @@ -21,7 +20,6 @@ ast_declare_proc_signature :: proc(t: ^testing.T) { @(test) ast_naked_parens :: proc(t: ^testing.T) { - source := test.Source { main = `package test main :: proc() { @@ -44,7 +42,6 @@ ast_naked_parens :: proc(t: ^testing.T) { @(test) ast_simple_proc_signature :: proc(t: ^testing.T) { - source := test.Source { main = `package test cool_function :: proc(a: int) { @@ -62,7 +59,6 @@ ast_simple_proc_signature :: proc(t: ^testing.T) { @(test) ast_default_assignment_proc_signature :: proc(t: ^testing.T) { - source := test.Source { main = `package test cool_function :: proc(a: int, b := context.allocator) { @@ -80,7 +76,6 @@ ast_default_assignment_proc_signature :: proc(t: ^testing.T) { @(test) ast_proc_signature_argument_last_position :: proc(t: ^testing.T) { - source := test.Source { main = `package test cool_function :: proc(a: int, b: int) { @@ -98,7 +93,6 @@ ast_proc_signature_argument_last_position :: proc(t: ^testing.T) { @(test) ast_proc_signature_argument_first_position :: proc(t: ^testing.T) { - source := test.Source { main = `package test cool_function :: proc(a: int, b: int) { @@ -117,7 +111,6 @@ ast_proc_signature_argument_first_position :: proc(t: ^testing.T) { @(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) { @@ -135,7 +128,6 @@ ast_proc_signature_argument_move_position :: proc(t: ^testing.T) { @(test) ast_proc_signature_argument_complex :: proc(t: ^testing.T) { - source := test.Source { main = `package test cool_function :: proc(a: int, b: int, c: int) { @@ -153,7 +145,6 @@ ast_proc_signature_argument_complex :: proc(t: ^testing.T) { @(test) ast_proc_signature_argument_open_brace_position :: proc(t: ^testing.T) { - source := test.Source { main = `package test cool_function :: proc(a: int, b: int, c: int) { @@ -171,7 +162,6 @@ ast_proc_signature_argument_open_brace_position :: proc(t: ^testing.T) { @(test) ast_proc_signature_argument_any_ellipsis_position :: proc(t: ^testing.T) { - source := test.Source { main = `package test cool_function :: proc(args: ..any, b := 2) { @@ -189,7 +179,6 @@ ast_proc_signature_argument_any_ellipsis_position :: proc(t: ^testing.T) { @(test) ast_proc_group_signature_empty_call :: proc(t: ^testing.T) { - source := test.Source { main = `package test int_function :: proc(a: int) { @@ -215,7 +204,6 @@ ast_proc_group_signature_empty_call :: proc(t: ^testing.T) { @(test) ast_proc_signature_generic :: proc(t: ^testing.T) { - source := test.Source { main = `package test @@ -236,7 +224,6 @@ ast_proc_signature_generic :: proc(t: ^testing.T) { @(test) ast_proc_group_signature_basic_types :: proc(t: ^testing.T) { - source := test.Source { main = `package test int_function :: proc(a: int, b: bool, c: int) { @@ -263,7 +250,6 @@ ast_proc_group_signature_basic_types :: proc(t: ^testing.T) { @(test) ast_proc_group_signature_distinct_basic_types :: proc(t: ^testing.T) { - source := test.Source { main = `package test @@ -295,7 +281,6 @@ ast_proc_group_signature_distinct_basic_types :: proc(t: ^testing.T) { @(test) ast_proc_group_signature_struct :: proc(t: ^testing.T) { - source := test.Source { main = `package test @@ -336,7 +321,6 @@ ast_proc_group_signature_struct :: proc(t: ^testing.T) { @(test) index_simple_signature :: proc(t: ^testing.T) { - packages := make([dynamic]test.Package); append(&packages, test.Package { @@ -365,7 +349,6 @@ index_simple_signature :: proc(t: ^testing.T) { @(test) ast_index_builtin_len_proc :: proc(t: ^testing.T) { - source := test.Source { main = `package test main :: proc() { @@ -380,7 +363,6 @@ ast_index_builtin_len_proc :: proc(t: ^testing.T) { @(test) ast_signature_on_invalid_package :: proc(t: ^testing.T) { - source := test.Source { main = `package test import "core:totallyReal" @@ -396,7 +378,6 @@ ast_signature_on_invalid_package :: proc(t: ^testing.T) { @(test) ast_signature_variable_pointer :: proc(t: ^testing.T) { - source := test.Source { main = `package test import "core:totallyReal" @@ -418,7 +399,6 @@ ast_signature_variable_pointer :: proc(t: ^testing.T) { @(test) ast_signature_global_variable_pointer :: proc(t: ^testing.T) { - source := test.Source { main = `package test import "core:totallyReal" @@ -440,7 +420,6 @@ ast_signature_global_variable_pointer :: proc(t: ^testing.T) { @(test) index_variable_pointer_signature :: proc(t: ^testing.T) { - packages := make([dynamic]test.Package); append(&packages, test.Package { |