diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-07-05 19:44:41 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-07-05 20:31:43 -0400 |
| commit | a1692bc64885ae46f50d00c6426eaf1a96f6e4fa (patch) | |
| tree | 749db06ff709e9809be31f1c2a6d14b2c6284de7 /src/testing/testing.odin | |
| parent | 58748c93f2eea884034a128105a54c526edc3048 (diff) | |
Improve resolving enumerated arrays
Diffstat (limited to 'src/testing/testing.odin')
| -rw-r--r-- | src/testing/testing.odin | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/testing/testing.odin b/src/testing/testing.odin index 78df00e..7242b39 100644 --- a/src/testing/testing.odin +++ b/src/testing/testing.odin @@ -201,7 +201,12 @@ expect_completion_labels :: proc(t: ^testing.T, src: ^Source, trigger_character: } } -expect_completion_details :: proc(t: ^testing.T, src: ^Source, trigger_character: string, expect_details: []string) { +expect_completion_details :: proc( + t: ^testing.T, src: ^Source, + trigger_character: string, + expect_details: []string, + expect_excluded: []string = nil, +) { setup(src) defer teardown(src) @@ -234,6 +239,14 @@ expect_completion_details :: proc(t: ^testing.T, src: ^Source, trigger_character log.errorf("Expected completion label %v, but received %v", expect_details[i], completion_list.items) } } + + for expect_exclude in expect_excluded { + for completion in completion_list.items { + if expect_exclude == completion.detail { + log.errorf("Expected completion label %v to not be included", expect_exclude) + } + } + } } expect_hover :: proc(t: ^testing.T, src: ^Source, expect_hover_string: string) { |