diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-07 22:06:22 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-11 16:34:21 -0400 |
| commit | 151fb26f5957338f670d2d6dbef01d75ff28cc8e (patch) | |
| tree | 2864c82b068f56c5bc7b69874cf97f8f8ca8ceae /tests/hover_test.odin | |
| parent | 790cf8a16315d65bd80478aecfb34d7ff5dae31b (diff) | |
Attempt consolidate structure for writing docs
Diffstat (limited to 'tests/hover_test.odin')
| -rw-r--r-- | tests/hover_test.odin | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin index f3c0af7..766b501 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -106,7 +106,7 @@ ast_hover_external_package_parameter :: proc(t: ^testing.T) { test.expect_hover( t, &source, - "test.cool: my_package.My_Struct :: struct {\n\tone: int,\n\ttwo: int,\n\tthree: int,\n}", + "test.cool: my_package.My_Struct", ) } @@ -140,7 +140,7 @@ ast_hover_external_package_parameter_pointer :: proc(t: ^testing.T) { test.expect_hover( t, &source, - "test.cool: ^my_package.My_Struct :: struct {\n\tone: int,\n\ttwo: int,\n\tthree: int,\n}", + "test.cool: ^my_package.My_Struct", ) } @@ -577,7 +577,7 @@ ast_hover_struct_variable :: proc(t: ^testing.T) { `, } - test.expect_hover(t, &source, "test.foo: test.Foo :: struct {\n\tbar: int,\n\tf: proc(a: int) -> int,\n}") + test.expect_hover(t, &source, "test.foo: test.Foo") } @(test) @@ -609,7 +609,7 @@ ast_hover_enum_variable :: proc(t: ^testing.T) { `, } - test.expect_hover(t, &source, "test.foo: test.Foo :: enum {\n\tFoo1,\n\tFoo2,\n}") + test.expect_hover(t, &source, "test.foo: test.Foo") } @(test) @@ -641,7 +641,7 @@ ast_hover_union_variable :: proc(t: ^testing.T) { `, } - test.expect_hover(t, &source, "test.foo: test.Foo :: union {\n\tstring,\n\tint,\n}") + test.expect_hover(t, &source, "test.foo: test.Foo") } @(test) @@ -1327,7 +1327,7 @@ ast_hover_proc_overloading_parametric_type :: proc(t: ^testing.T) { packages = packages[:], } - test.expect_hover(t, &source, "test.foo: ^my_package.Foo :: struct {}") + test.expect_hover(t, &source, "test.foo: ^my_package.Foo") } @(test) @@ -1365,7 +1365,7 @@ ast_hover_proc_overloading_parametric_type_external_package :: proc(t: ^testing. packages = packages[:], } - test.expect_hover(t, &source, "test.foo: ^my_package.Foo :: struct {}") + test.expect_hover(t, &source, "test.foo: ^my_package.Foo") } @(test) @@ -1622,7 +1622,7 @@ ast_hover_poly_type :: proc(t: ^testing.T) { `, } - test.expect_hover(t, &source, "test.foo: test.Foo :: struct {\n\tfoo: int,\n}") + test.expect_hover(t, &source, "test.foo: test.Foo") } @(test) @@ -1668,7 +1668,7 @@ ast_hover_poly_type_external_package :: proc(t: ^testing.T) { packages = packages[:], } - test.expect_hover(t, &source, "test.foo: test.Foo :: struct {\n\tfoo: int,\n}") + test.expect_hover(t, &source, "test.foo: test.Foo") } @(test) @@ -1716,7 +1716,7 @@ ast_hover_poly_type_external_package_with_external_type :: proc(t: ^testing.T) { packages = packages[:], } - test.expect_hover(t, &source, "test.foo: small_array.Foo :: struct {}") + test.expect_hover(t, &source, "test.foo: small_array.Foo") } @(test) @@ -1768,7 +1768,7 @@ ast_hover_poly_proc_mixed_packages :: proc(t: ^testing.T) { packages = packages[:], } - test.expect_hover(t, &source, "test.f: bar_package.Bar :: struct {\n\tbar: int,\n}") + test.expect_hover(t, &source, "test.f: bar_package.Bar") } @(test) @@ -1890,7 +1890,7 @@ ast_hover_bitset_enum_for_loop :: proc(t: ^testing.T) { } `, } - test.expect_hover(t, &source, "test.f: test.Foo :: enum {\n\tA,\n\tB,\n}") + test.expect_hover(t, &source, "test.f: test.Foo") } @(test) @@ -2634,7 +2634,7 @@ ast_hover_named_parameter_with_default_value_struct :: proc(t: ^testing.T) { } `, } - test.expect_hover(t, &source, "foo.a: test.Bar :: struct {\n\tbar: int,\n}") + test.expect_hover(t, &source, "foo.a: test.Bar") } @(test) @@ -3238,7 +3238,7 @@ ast_hover_switch_initialiser :: proc(t: ^testing.T) { test.expect_hover( t, &source, - "test.c: test.A :: enum {\n\tB,\n\tC,\n}", + "test.c: test.A", ) } @@ -3277,7 +3277,7 @@ ast_hover_type_switch_with_using :: proc(t: ^testing.T) { test.expect_hover( t, &source, - "test.v: ^my_package.Foo :: struct {}", + "test.v: ^my_package.Foo", ) } @@ -3298,7 +3298,7 @@ ast_hover_union_with_poly :: proc(t: ^testing.T) { test.expect_hover( t, &source, - "test.foo: test.Foo :: union(int) {\n\tint,\n}", + "test.foo: test.Foo", ) } @@ -3331,7 +3331,7 @@ ast_hover_union_with_poly_from_package :: proc(t: ^testing.T) { test.expect_hover( t, &source, - "test.foo: my_package.Foo :: union(int) {\n\tint,\n}", + "test.foo: my_package.Foo", ) } @@ -3444,7 +3444,7 @@ ast_hover_chained_call_expr_with_named_proc_return :: proc(t: ^testing.T) { } `, } - test.expect_hover(t, &source, "test.b: test.Foo :: struct {\n\tsomeData: int,\n}") + test.expect_hover(t, &source, "test.b: test.Foo") } @(test) |