Skip to content

Commit

Permalink
fixing type
Browse files Browse the repository at this point in the history
  • Loading branch information
Mzack9999 committed Aug 8, 2023
1 parent 6337114 commit 6a90183
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions context/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ func TestWithValues(t *testing.T) {
name string
keyValue []ContextArg
expectedError error
expectedValue map[string]string
expectedValue map[ContextArg]ContextArg
}

var testCases = []testCase{
{
name: "even number of key-value pairs",
keyValue: []ContextArg{"key1", "value1", "key2", "value2"},
expectedError: nil,
expectedValue: map[string]string{"key1": "value1", "key2": "value2"},
expectedValue: map[ContextArg]ContextArg{"key1": "value1", "key2": "value2"},
},
{
name: "odd number of key-value pairs",
keyValue: []ContextArg{"key1", "value1", "key2"},
expectedError: ErrIncorrectNumberOfItems,
expectedValue: map[string]string{},
expectedValue: map[ContextArg]ContextArg{},
},
{
name: "overwriting values",
keyValue: []ContextArg{"key1", "value1", "key1", "newValue"},
expectedError: nil,
expectedValue: map[string]string{"key1": "newValue"},
expectedValue: map[ContextArg]ContextArg{"key1": "newValue"},
},
}
ctx := context.Background()
Expand Down

0 comments on commit 6a90183

Please sign in to comment.