(t *testing.T)
| 179 | } |
| 180 | |
| 181 | func TestMultiMessage(t *testing.T) { |
| 182 | ip := net.ParseIP("127.0.0.1") |
| 183 | mCache := GetCache("cache.file") |
| 184 | d := NewDecoder(ip, multiMessage) |
| 185 | r, err := d.Decode(mCache) |
| 186 | if err != nil { |
| 187 | t.Error("unexpected error happened:", err) |
| 188 | } |
| 189 | if l := len(r.DataSets); l != 3 { |
| 190 | t.Error("Expected 3 datasets, but received", l) |
| 191 | } |
| 192 | expectedSets := []int{256, 257, 262, 263, 264, 265, 266, 267, 268, 512} |
| 193 | actualSets := mCache.allSetIds() |
| 194 | if !reflect.DeepEqual(expectedSets, actualSets) { |
| 195 | t.Error("Expected template sets:", expectedSets, ", but received:", actualSets) |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | func TestUnknownDatasetsMessage(t *testing.T) { |
| 200 | ip := net.ParseIP("127.0.0.1") |
nothing calls this directly
no test coverage detected