MCPcopy Create free account
hub / github.com/google/gapid / TestBinaryXmlDecodingAndEncoding

Function TestBinaryXmlDecodingAndEncoding

core/os/android/binaryxml/decode_test.go:25–43  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23)
24
25func TestBinaryXmlDecodingAndEncoding(t *testing.T) {
26 assert := assert.To(t)
27 for _, fn := range []string{
28 "testdata/manifest1.binxml",
29 "testdata/manifest2.binxml",
30 "testdata/manifest3.binxml",
31 "testdata/manifest4.binxml",
32 "testdata/manifest5.binxml",
33 "testdata/manifest6.binxml",
34 "testdata/manifest7.binxml",
35 } {
36 originalData, err := ioutil.ReadFile(fn)
37 assert.For("err").ThatError(err).Succeeded()
38
39 tree, err := decodeXmlTree(bytes.NewReader(originalData))
40 assert.For("err").ThatError(err).Succeeded()
41 assert.For("enc").ThatSlice(tree.encode()).Equals(originalData)
42 }
43}
44
45func TestDimension(t *testing.T) {
46 assert := assert.To(t)

Callers

nothing calls this directly

Calls 8

decodeXmlTreeFunction · 0.85
SucceededMethod · 0.80
ThatErrorMethod · 0.80
ForMethod · 0.80
ThatSliceMethod · 0.80
NewReaderMethod · 0.65
EqualsMethod · 0.65
encodeMethod · 0.65

Tested by

no test coverage detected