MCPcopy Create free account
hub / github.com/dotabuff/manta / TestParseStringTableUpdate

Function TestParseStringTableUpdate

string_table_test.go:154–167  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

152}
153
154func TestParseStringTableUpdate(t *testing.T) {
155 assert := assert.New(t)
156 buf := _read_fixture("string_tables/updates/tick_03960_table_7_items_13_size_208")
157
158 items, err := parseStringTable(buf, 13, "", false, 0, 0, false)
159 assert.NoError(err)
160
161 assert.Equal(int32(261), items[0].Index)
162 assert.Equal("broodmother_spawn_spiderlings", items[0].Key)
163 assert.Equal(int32(262), items[1].Index)
164 assert.Equal("broodmother_spin_web", items[1].Key)
165 assert.Equal(int32(263), items[2].Index)
166 assert.Equal("broodmother_incapacitating_bite", items[2].Key)
167}
168
169// TestParseStringTableTruncated verifies that a blob which decodes past the end
170// of its buffer surfaces an error instead of silently returning a partial table.

Callers

nothing calls this directly

Calls 2

_read_fixtureFunction · 0.85
parseStringTableFunction · 0.85

Tested by

no test coverage detected