(t *testing.T)
| 113 | } |
| 114 | |
| 115 | func TestKeyValues(t *testing.T) { |
| 116 | m := orderedmap.NewMap() |
| 117 | m.Set("x", 10) |
| 118 | m.Set("y", 20) |
| 119 | |
| 120 | kvs := m.KeyValues() |
| 121 | if len(kvs) != 2 { |
| 122 | t.Fatalf("expected 2 pairs, got %d", len(kvs)) |
| 123 | } |
| 124 | if kvs[0].Key != "x" || kvs[0].Value != 10 { |
| 125 | t.Fatalf("unexpected first pair: %v", kvs[0]) |
| 126 | } |
| 127 | if kvs[1].Key != "y" || kvs[1].Value != 20 { |
| 128 | t.Fatalf("unexpected second pair: %v", kvs[1]) |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | func TestEqual(t *testing.T) { |
| 133 | a := orderedmap.NewMap() |