aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing.odin
diff options
context:
space:
mode:
authorBradley Lewis <22850972+BradLewis@users.noreply.github.com>2025-12-17 07:09:03 +1100
committerGitHub <noreply@github.com>2025-12-17 07:09:03 +1100
commitcccd35ac38e675faa75c841526cb2a4dfd0b0149 (patch)
tree27eb1456c036fbfca3068115ed3cf28f3fad1dde /src/testing/testing.odin
parent8090d72884fda0aaee3e28beca6a898bd6955060 (diff)
parent78f76c1090f91cf2a09e95b1885b23ecd17cad9a (diff)
Merge pull request #1226 from BradLewis/fix/implicit-selector-completion-assignment-proc-arg
Fix implicit selector completions for proc call args within assignments
Diffstat (limited to 'src/testing/testing.odin')
-rw-r--r--src/testing/testing.odin16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/testing/testing.odin b/src/testing/testing.odin
index 6a6b80d..373ef62 100644
--- a/src/testing/testing.odin
+++ b/src/testing/testing.odin
@@ -165,7 +165,13 @@ expect_signature_parameter_position :: proc(t: ^testing.T, src: ^Source, positio
}
}
-expect_completion_labels :: proc(t: ^testing.T, src: ^Source, trigger_character: string, expect_labels: []string) {
+expect_completion_labels :: proc(
+ t: ^testing.T,
+ src: ^Source,
+ trigger_character: string,
+ expect_labels: []string,
+ expect_excluded: []string = nil,
+) {
setup(src)
defer teardown(src)
@@ -198,6 +204,14 @@ expect_completion_labels :: proc(t: ^testing.T, src: ^Source, trigger_character:
log.errorf("Expected completion detail %v, but received %v", expect_labels[i], completion_list.items)
}
}
+
+ for expect_exclude in expect_excluded {
+ for completion in completion_list.items {
+ if expect_exclude == completion.label {
+ log.errorf("Expected completion label %v to not be included", expect_exclude)
+ }
+ }
+ }
}
expect_completion_docs :: proc(