diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-07-02 21:03:35 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-07-02 21:04:23 -0400 |
| commit | 5348ee2fc5b7609e58baaa835b4fb55d5c13fc3e (patch) | |
| tree | 79b2170876a8492f7a427c637b3407eedfd9c48a /tests | |
| parent | 26bb60d1441bbc133dbe5d4df8e4b78d79b0b479 (diff) | |
Exclude already added enum fields when adding multiple to a bitset
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/completions_test.odin | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin index e0edb78..a9c3f7b 100644 --- a/tests/completions_test.odin +++ b/tests/completions_test.odin @@ -3497,3 +3497,21 @@ ast_completion_enum_slice :: proc(t: ^testing.T) { test.expect_completion_details(t, &source, "", {"A", "B"}) } + +@(test) +ast_completion_bitset :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + E :: enum { A, B, C } + + Ebitset :: bit_set[E] + + main :: proc() { + b: Ebitset = { .A, .C, .{*} } + } + `, + } + + // I think this test will pass even if there is A and C + test.expect_completion_details(t, &source, "", {"B"}) +} |