Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions json_fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ func FuzzRoundTripJSON(f *testing.F) {
require.NoError(t, json.Unmarshal(mapJsonData, &m2))

t.Logf("initial data = %s", string(data))
t.Logf("unmarshalled map = %v", m1)
t.Logf("re-marshalled from map = %s", string(mapJsonData))
t.Logf("re-marshalled from test obj = %s", string(jsonData))
t.Logf("re-unmarshalled map = %s", m2)
t.Logf("unmarshaled map = %v", m1)
t.Logf("re-marshaled from map = %s", string(mapJsonData))
t.Logf("re-marshaled from test obj = %s", string(jsonData))
t.Logf("re-unmarshaled map = %s", m2)
}
})
}
Expand Down
6 changes: 3 additions & 3 deletions json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/stretchr/testify/require"
)

// to test marshalling TextMarshalers and unmarshalling TextUnmarshalers
// to test marshalling TextMarshalers and unmarshaling TextUnmarshalers
type marshallable int

func (m marshallable) MarshalText() ([]byte, error) {
Expand Down Expand Up @@ -129,7 +129,7 @@ func TestMarshalJSON(t *testing.T) {
})
}

func TestUnmarshallJSON(t *testing.T) {
func TestUnmarshalJSON(t *testing.T) {
t.Run("int key", func(t *testing.T) {
data := `{"1":"bar","7":"baz","2":28,"3":100,"4":"baz","5":"28","6":"100","8":"baz"}`

Expand Down Expand Up @@ -229,7 +229,7 @@ func TestJSONSpecialCharacters(t *testing.T) {
require.Equal(t, baselineData, b)
})

t.Run("unmarshall special characters", func(t *testing.T) {
t.Run("unmarshal special characters", func(t *testing.T) {
om := New[string, any]()
require.NoError(t, json.Unmarshal(baselineData, &om))
assertOrderedPairsEqual(t, om,
Expand Down
8 changes: 4 additions & 4 deletions orderedmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ func TestNewWithCapacity(t *testing.T) {
}

func TestNewWithOptions(t *testing.T) {
t.Run("wih capacity", func(t *testing.T) {
t.Run("with capacity", func(t *testing.T) {
om := New[string, any](WithCapacity[string, any](98))
assert.Equal(t, 0, om.Len())
})
Expand Down Expand Up @@ -499,16 +499,16 @@ func TestIteratorsFrom(t *testing.T) {

func TestFilter(t *testing.T) {
om := New[int, int]()

n := 10 * 3 // ensure divisibility by 3 for the length check below
for i := range n {
om.Set(i, i*i)
}

om.Filter(func(k, v int) bool {
return k % 3 == 0
})

assert.Equal(t, n / 3, om.Len())
for k := range om.FromOldest() {
assert.True(t, k%3==0)
Expand Down
4 changes: 2 additions & 2 deletions yaml_fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ func FuzzRoundTripYAML(f *testing.F) {
require.NoError(t, yaml.Unmarshal(mapJsonData, &m2))

t.Logf("initial data = %s", string(data))
t.Logf("unmarshalled map = %v", m1)
t.Logf("unmarshaled map = %v", m1)
t.Logf("re-marshalled from map = %s", string(mapJsonData))
t.Logf("re-marshalled from test obj = %s", string(yamlData))
t.Logf("re-unmarshalled map = %s", m2)
t.Logf("re-unmarshaled map = %s", m2)
}
})
}
Expand Down
4 changes: 2 additions & 2 deletions yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ abc: true
})
}

func TestUnmarshallYAML(t *testing.T) {
func TestUnmarshalYAML(t *testing.T) {
t.Run("int key", func(t *testing.T) {
data := `
1: bar
Expand Down Expand Up @@ -226,7 +226,7 @@ func TestYAMLSpecialCharacters(t *testing.T) {
require.Equal(t, baselineData, b)
})

t.Run("unmarshall special characters", func(t *testing.T) {
t.Run("unmarshal special characters", func(t *testing.T) {
om := New[string, any]()
require.NoError(t, yaml.Unmarshal(baselineData, &om))
assertOrderedPairsEqual(t, om,
Expand Down