Exemple #1
0
 def testScopedEnumType(self):
     pyType = sample.getPythonType('Abstract::Type')
     self.assertEqual(pyType, sample.Abstract.Type)
Exemple #2
0
 def testMapContainerType(self):
     pyType = sample.getPythonType('std::map<std::string,int>')
     self.assertEqual(pyType, dict)
Exemple #3
0
 def testGlobalEnumType(self):
     pyType = sample.getPythonType('GlobalEnum')
     self.assertEqual(pyType, sample.GlobalEnum)
Exemple #4
0
 def testPairContainerType(self):
     pyType = sample.getPythonType('std::pair<Complex,int>')
     self.assertEqual(pyType, list)
Exemple #5
0
 def testListContainerType(self):
     pyType = sample.getPythonType('std::list<int>')
     self.assertEqual(pyType, list)
Exemple #6
0
 def testPrimitiveTypeAndTypedef(self):
     pyType = sample.getPythonType('double')
     self.assertEqual(pyType, float)
     pyTypedef = sample.getPythonType('real')
     self.assertEqual(pyType, pyTypedef)
Exemple #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)
Exemple #8
0
 def testGetUsersPrimitiveType(self):
     pyType = sample.getPythonType('OddBool')
     self.assertEqual(pyType, bool)
Exemple #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)
Exemple #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)