def testPassingExtendsNoImplicitConversionAsNoImplicitConversionByReference( self): '''Gives an ExtendsNoImplicitConversion object to a function expecting a NoImplicitConversion, passing by reference.''' obj = ExtendsNoImplicitConversion(123) self.assertEqual( obj.objId(), NoImplicitConversion.receivesNoImplicitConversionByReference(obj))
def testNoImplicitConversion(self): '''Basic test to see if the NoImplicitConversion is Ok.''' obj = NoImplicitConversion(123) # NoImplicitConversion.receivesNoImplicitConversionByValue(NoImplicitConversion) self.assertEqual(obj.objId(), NoImplicitConversion.receivesNoImplicitConversionByValue(obj)) # NoImplicitConversion.receivesNoImplicitConversionByPointer(NoImplicitConversion*) self.assertEqual(obj.objId(), NoImplicitConversion.receivesNoImplicitConversionByPointer(obj)) # NoImplicitConversion.receivesNoImplicitConversionByReference(NoImplicitConversion&) self.assertEqual(obj.objId(), NoImplicitConversion.receivesNoImplicitConversionByReference(obj))
def testPassingExtendsNoImplicitConversionAsNoImplicitConversionByReference(self): '''Gives an ExtendsNoImplicitConversion object to a function expecting a NoImplicitConversion, passing by reference.''' obj = ExtendsNoImplicitConversion(123) self.assertEqual(obj.objId(), NoImplicitConversion.receivesNoImplicitConversionByReference(obj))