|
Last change
on this file since 47 was
29,
checked in by landauf, 17 years ago
|
|
updated boost from 1_33_1 to 1_34_1
|
|
File size:
1.0 KB
|
| 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 _header_test import * |
|---|
| 7 | |
|---|
| 8 | class HeaderTest(unittest.TestCase): |
|---|
| 9 | |
|---|
| 10 | def testIt(self): |
|---|
| 11 | self.assertEqual(choice.red, 0) |
|---|
| 12 | self.assertEqual(choice.blue, 1) |
|---|
| 13 | self.assertEqual(choice_str(choice.blue), 'blue') |
|---|
| 14 | self.assertEqual(choice_str(choice.red), 'red') |
|---|
| 15 | c = C() |
|---|
| 16 | c.c = choice.blue |
|---|
| 17 | self.assertEqual(c.get(), 'blue') |
|---|
| 18 | c.c = choice.red |
|---|
| 19 | self.assertEqual(c.get(), 'red') |
|---|
| 20 | # the following classes/functions should not have being exported |
|---|
| 21 | self.assertRaises(NameError, lambda: A()) |
|---|
| 22 | self.assertRaises(NameError, lambda: foo()) |
|---|
| 23 | self.assertRaises(NameError, lambda: bar.value) |
|---|
| 24 | self.assertRaises(NameError, lambda: ForwardDeclared()) |
|---|
| 25 | |
|---|
| 26 | if __name__ == '__main__': |
|---|
| 27 | unittest.main() |
|---|
Note: See
TracBrowser
for help on using the repository browser.