Example #1
0
 def testScopedEnumType(self):
     pyType = sample.getPythonType('Abstract::Type')
     self.assertEqual(pyType, sample.Abstract.Type)
Example #2
0
 def testMapContainerType(self):
     pyType = sample.getPythonType('std::map<std::string,int>')
     self.assertEqual(pyType, dict)
Example #3
0
 def testGlobalEnumType(self):
     pyType = sample.getPythonType('GlobalEnum')
     self.assertEqual(pyType, sample.GlobalEnum)
Example #4
0
 def testPairContainerType(self):
     pyType = sample.getPythonType('std::pair<Complex,int>')
     self.assertEqual(pyType, list)
Example #5
0
 def testListContainerType(self):
     pyType = sample.getPythonType('std::list<int>')
     self.assertEqual(pyType, list)
Example #6
0
 def testPrimitiveTypeAndTypedef(self):
     pyType = sample.getPythonType('double')
     self.assertEqual(pyType, float)
     pyTypedef = sample.getPythonType('real')
     self.assertEqual(pyType, pyTypedef)
Example #7
0
 def testGetUsersPrimitiveTypeWithoutTargetLangApiName(self):
     '''If the primitive type attribute "target-lang-api-name" is not set
     there'll be no Python type associated with the C++ type.'''
     pyType = sample.getPythonType('PStr')
     self.assertEqual(pyType, None)
Example #8
0
 def testGetUsersPrimitiveType(self):
     pyType = sample.getPythonType('OddBool')
     self.assertEqual(pyType, bool)
Example #9
0
 def testGetValueType(self):
     pyType1 = sample.getPythonType('Point')
     self.assertEqual(pyType1, sample.Point)
     pyType2 = sample.getPythonType('Point*')
     self.assertEqual(pyType2, sample.Point)
     self.assertEqual(pyType1, pyType2)
Example #10
0
 def testGetObjectType(self):
     pyType1 = sample.getPythonType('ObjectType')
     self.assertEqual(pyType1, sample.ObjectType)
     pyType2 = sample.getPythonType('ObjectType*')
     self.assertEqual(pyType2, sample.ObjectType)
     self.assertEqual(pyType1, pyType2)