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

Function TestDimension

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

Source from the content-addressed store, hash-verified

43}
44
45func TestDimension(t *testing.T) {
46 assert := assert.To(t)
47 for _, fn := range []string{
48 "testdata/manifest7.binxml",
49 } {
50 originalData, err := ioutil.ReadFile(fn)
51 assert.For("err").ThatError(err).Succeeded()
52
53 tree, err := decodeXmlTree(bytes.NewReader(originalData))
54 assert.For("err").ThatError(err).Succeeded()
55
56 assert.For("xml").ThatString(tree.toXmlString()).Contains(`android:minWidth="-1.125000px"`)
57 assert.For("xml").ThatString(tree.toXmlString()).Contains(`android:maxWidth="32.000000in"`)
58
59 // Make sure we haven't broken the binary representation and that it still parses after the change.
60 _, err = decodeXmlTree(bytes.NewReader(tree.encode()))
61 assert.For("err").ThatError(err).Succeeded()
62 }
63}

Callers

nothing calls this directly

Calls 9

decodeXmlTreeFunction · 0.85
SucceededMethod · 0.80
ThatErrorMethod · 0.80
ForMethod · 0.80
ThatStringMethod · 0.80
toXmlStringMethod · 0.80
NewReaderMethod · 0.65
ContainsMethod · 0.65
encodeMethod · 0.65

Tested by

no test coverage detected