コード例 #1
0
 def testConversionInBothDirections(self):
     '''Test converting a map from Python to C++ and back again.'''
     mu = MapUser()
     map_ = {'odds' : [2, 4, 6], 'evens' : [3, 5, 7], 'primes' : [3, 4, 6]}
     mu.setMap(map_)
     result = mu.getMap()
     self.assertEqual(result, map_)
コード例 #2
0
ファイル: map_test.py プロジェクト: Hasimir/Shiboken
 def testConversionInBothDirections(self):
     '''Test converting a map from Python to C++ and back again.'''
     mu = MapUser()
     map_ = {'odds' : [2, 4, 6], 'evens' : [3, 5, 7], 'primes' : [3, 4, 6]}
     mu.setMap(map_)
     result = mu.getMap()
     self.assertEqual(result, map_)
コード例 #3
0
 def testConversionMapIntKeyValueTypeValue(self):
     '''C++ signature: MapUser::passMapIntValueType(const std::map<int, const ByteArray>&)'''
     mu = MapUser()
     map_ = {0 : 'string'}
     result = mu.passMapIntValueType(map_)
     self.assertEqual(map_, result)
コード例 #4
0
 def __init__(self):
     MapUser.__init__(self)
     self.create_map_called = False
コード例 #5
0
ファイル: map_test.py プロジェクト: Hasimir/Shiboken
 def testConversionMapIntKeyValueTypeValue(self):
     '''C++ signature: MapUser::passMapIntValueType(const std::map<int, const ByteArray>&)'''
     mu = MapUser()
     map_ = {0 : 'string'}
     result = mu.passMapIntValueType(map_)
     self.assertEqual(map_, result)
コード例 #6
0
ファイル: map_test.py プロジェクト: Hasimir/Shiboken
 def __init__(self):
     MapUser.__init__(self)
     self.create_map_called = False