Example #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")
Example #2
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")
Example #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]")
Example #4
0
 def testAssociativeArray(self):
     """Tests a simple uint8{string}."""
     # pylint: disable=W0212
     self.assertEquals(translate._MapKind("uint8{string}"), "m[s][u8]")
Example #5
0
 def testSimpleArray(self):
     """Tests a simple int32[]."""
     # pylint: disable=W0212
     self.assertEquals(translate._MapKind("int32[]"), "a:i32")
Example #6
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]")
Example #7
0
 def testAssociativeArray(self):
   """Tests a simple uint8{string}."""
   # pylint: disable=W0212
   self.assertEquals(translate._MapKind("uint8{string}"), "m[s][u8]")
Example #8
0
 def testSimpleArray(self):
   """Tests a simple int32[]."""
   # pylint: disable=W0212
   self.assertEquals(translate._MapKind("int32[]"), "a:i32")