diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-03-24 17:48:35 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-03-26 16:02:04 -0300 |
commit | 817e90dab1c2727bf4e5b96fdf1ba8a39dfd0736 (patch) | |
tree | 02999ab5e48a0559c61f38cfa21bed227fe13332 /tests/samplebinding/size_test.py | |
parent | 03525843adab2fceda8c1e3aa2d9f1ad72bcda89 (diff) |
Adds test case for libsample's Size class copy constructor.
Also fixes samplebinding type system indentation.
Diffstat (limited to 'tests/samplebinding/size_test.py')
-rwxr-xr-x | tests/samplebinding/size_test.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/samplebinding/size_test.py b/tests/samplebinding/size_test.py index 0d44828bf..e85cb766c 100755 --- a/tests/samplebinding/size_test.py +++ b/tests/samplebinding/size_test.py @@ -26,7 +26,6 @@ '''Test cases for operator overloads on Size class''' -import sys import unittest from sample import Size @@ -42,6 +41,14 @@ class PointTest(unittest.TestCase): self.assertEqual(size.height(), height) self.assertEqual(size.calculateArea(), width * height) + def testCopyConstructor(self): + '''Test Size class copy constructor.''' + width, height = (5.0, 2.3) + s1 = Size(width, height) + s2 = Size(s1) + self.assertFalse(s1 is s2) + self.assertEqual(s1, s2) + def testPlusOperator(self): '''Test Size class + operator.''' s1 = Size(5.0, 2.3) |