mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-09 07:02:29 +08:00
fix: fix issue for PR #334, usge Pair struct to instance enum items
This commit is contained in:
@@ -21,9 +21,9 @@ func TestNewItem(t *testing.T) {
|
||||
t.Parallel()
|
||||
assert := internal.NewAssert(t, "TestNewItem")
|
||||
|
||||
items := NewItems[Status](
|
||||
Active, "Active",
|
||||
Inactive, "Inactive",
|
||||
items := NewItems(
|
||||
Pair[Status]{Value: Active, Name: "Active"},
|
||||
Pair[Status]{Value: Inactive, Name: "Inactive"},
|
||||
)
|
||||
|
||||
assert.Equal(2, len(items))
|
||||
|
||||
Reference in New Issue
Block a user