diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-08-17 19:31:37 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-08-17 19:31:37 -0300 |
commit | e0c29962e6f334452f0c9db2caaf6ed18065de85 (patch) | |
tree | cee27801c196fbcacf6130ad64216af133b555dd /tests/samplebinding/reference_test.py |
The End Is the Beginning Is the End
Diffstat (limited to 'tests/samplebinding/reference_test.py')
-rwxr-xr-x | tests/samplebinding/reference_test.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/samplebinding/reference_test.py b/tests/samplebinding/reference_test.py new file mode 100755 index 000000000..ed4c5cbc8 --- /dev/null +++ b/tests/samplebinding/reference_test.py @@ -0,0 +1,28 @@ +#!/usr/bin/python + +'''Test cases for methods that receive references to objects.''' + +import sys +import unittest + +from sample import Reference + +class ReferenceTest(unittest.TestCase): + '''Test case for methods that receive references to objects.''' + + def testMethodThatReceivesReference(self): + '''Test a method that receives a reference to an object as argument.''' + objId = 123 + r = Reference(objId) + self.assertEqual(Reference.usesReference(r), objId) + + def testMethodThatReceivesConstReference(self): + '''Test a method that receives a const reference to an object as argument.''' + objId = 123 + r = Reference(objId) + self.assertEqual(Reference.usesConstReference(r), objId) + + +if __name__ == '__main__': + unittest.main() + |