Beispiel #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_)
Beispiel #2
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_)
Beispiel #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)
Beispiel #4
0
 def __init__(self):
     MapUser.__init__(self)
     self.create_map_called = False
Beispiel #5
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)
Beispiel #6
0
 def __init__(self):
     MapUser.__init__(self)
     self.create_map_called = False