コード例 #1
0
 def testAssociatedKinds(self):
     """Tests type spec translation of associated interfaces and requests."""
     # pylint: disable=W0212
     self.assertEquals(translate._MapKind("asso<SomeInterface>?"),
                       "?asso:x:SomeInterface")
     self.assertEquals(translate._MapKind("asso<SomeInterface&>?"),
                       "?asso:r:x:SomeInterface")
コード例 #2
0
 def testAssociativeArray(self):
     """Tests a simple uint8{string}."""
     # pylint: disable=W0212
     self.assertEquals(translate._MapKind("uint8{string}"), "m[s][u8]")
コード例 #3
0
 def testLeftToRightAssociativeArray(self):
     """Makes sure that parsing is done from right to left on the internal kinds
    in the presence of an associative array."""
     # pylint: disable=W0212
     self.assertEquals(translate._MapKind("uint8[]{string}"), "m[s][a:u8]")
コード例 #4
0
 def testSimpleArray(self):
     """Tests a simple int32[]."""
     # pylint: disable=W0212
     self.assertEquals(translate._MapKind("int32[]"), "a:i32")