Last change
on this file since 45 was
29,
checked in by landauf, 16 years ago
|
updated boost from 1_33_1 to 1_34_1
|
File size:
752 bytes
|
Line | |
---|
1 | # Copyright Bruno da Silva de Oliveira 2003. Use, modification and |
---|
2 | # distribution is subject to the Boost Software License, Version 1.0. |
---|
3 | # (See accompanying file LICENSE_1_0.txt or copy at |
---|
4 | # http:#www.boost.org/LICENSE_1_0.txt) |
---|
5 | import unittest |
---|
6 | from _wrappertest import * |
---|
7 | |
---|
8 | class WrapperTest(unittest.TestCase): |
---|
9 | |
---|
10 | def testIt(self): |
---|
11 | self.assertEqual(Range(10), range(10)) |
---|
12 | self.assertEqual(C().Mul(10), [x*10 for x in range(10)]) |
---|
13 | |
---|
14 | a = A() |
---|
15 | self.assertEqual(a.f(), 10) |
---|
16 | self.assertEqual(call_foo(a), 10) |
---|
17 | class D(A): |
---|
18 | def f(self): return 2 |
---|
19 | d = D() |
---|
20 | self.assertEqual(d.f(), 2) |
---|
21 | self.assertEqual(call_foo(d), 2) |
---|
22 | |
---|
23 | if __name__ == '__main__': |
---|
24 | unittest.main() |
---|
Note: See
TracBrowser
for help on using the repository browser.