Repository navigation
Commit cc200ff
committed
test: replace constructor value tests with one table test
The previous commit added a separate 177-line test file for the
constructor fix. Parts of it pass without the fix, and
TestConstructedValuesDefaultStorage asserted that changing the caller's
slice after NewStringSlice(defaults...) shows up in Value(), which is
not something we want to promise.
Test Set on one constructor per value type in flag_test.go instead, next
to the other constructor tests. Each case panics without the fix.
Reference: eddb896 ("fix: initialize parsers in collection value constructors")
Assisted-by: claude:claude-opus-5-5
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>1 parent eddb896 commit cc200ff
2 files changed
Lines changed: 21 additions & 177 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2580 | 2580 | | |
2581 | 2581 | | |
2582 | 2582 | | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
2583 | 2604 | | |
2584 | 2605 | | |
2585 | 2606 | | |
| |||
0 commit comments