mojo/public/tools/mojom/mojom/generate/pack_unittest.py
def testGetVersionInfoEmptyStruct(self):
    """Tests that pack.GetVersionInfo() never returns an empty list, even for
    empty structs.
    """
    struct = mojom.Struct('test')
    ps = pack.PackedStruct(struct)

    versions = pack.GetVersionInfo(ps)
    self.assertEqual(1, len(versions))
    self.assertEqual(0, versions[0].version)
    self.assertEqual(0, versions[0].num_fields)
    self.assertEqual(8, versions[0].num_bytes)
Tests that pack.GetVersionInfo() never returns an empty list, even for
    empty structs.
    
Tests that pack.GetVersionInfo() never returns an empty list, even for
empty structs.
Tests that pack . GetVersionInfo () never returns an empty list even for empty structs .
def testGetVersionInfoEmptyStruct(self):
    struct = mojom.Struct('test')
    ps = pack.PackedStruct(struct)
    versions = pack.GetVersionInfo(ps)
    self.assertEqual(1, len(versions))
    self.assertEqual(0, versions[0].version)
    self.assertEqual(0, versions[0].num_fields)
    self.assertEqual(8, versions[0].num_bytes)
def testGetVersionInfoEmptyStruct ( self ) : struct = mojom . Struct ( 'test' ) ps = pack . PackedStruct ( struct ) versions = pack . GetVersionInfo ( ps ) self . assertEqual ( 1 , len ( versions ) ) self . assertEqual ( 0 , versions [ 0 ] . version ) self . assertEqual ( 0 , versions [ 0 ] . num_fields ) self . assertEqual ( 8 , versions [ 0 ] . num_bytes )
Tests that pack.GetVersionInfo() never returns an empty list, even for
empty structs.
Tests that pack . GetVersionInfo () never returns an empty list even for empty structs .
"""Tests that pack.GetVersionInfo() never returns an empty list, even for
    empty structs.
    """
self