Update of /cvsroot/pygccxml/source/pyplusplus/unittests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4665/pyplusplus/unittests
Modified Files:
test_all.py
Added Files:
optional_tester.py
Log Message:
init< ... , optional< ... > > is now implemented
Index: test_all.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/test_all.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** test_all.py 15 Feb 2006 07:45:31 -0000 1.30
--- test_all.py 2 Mar 2006 13:30:37 -0000 1.31
***************
*** 40,43 ****
--- 40,44 ----
import regression2_tester
import regression3_tester
+ import optional_tester
def create_suite(times):
***************
*** 76,79 ****
--- 77,81 ----
, class_order3_tester
, class_order4_tester
+ , optional_tester
]
--- NEW FILE: optional_tester.py ---
# Copyright 2004 Roman Yakovenko.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
import os
import sys
import unittest
import fundamental_tester_base
from pygccxml import declarations
from pyplusplus import code_creators
class tester_t(fundamental_tester_base.fundamental_tester_base_t):
EXTENSION_NAME = 'optional'
def __init__( self, *args ):
fundamental_tester_base.fundamental_tester_base_t.__init__(
self
, tester_t.EXTENSION_NAME
, *args )
def customize( self, mb ):
for decl in declarations.make_flatten( mb.declarations ):
if isinstance( decl, declarations.calldef_t ):
decl.use_default_arguments = False
def run_tests(self, module):
d = module.data()
self.failUnless( d.m_i == 0 )
self.failUnless( d.m_j == 1 )
d2 = module.data(0)
self.failUnless( d2.m_i == 0 )
self.failUnless( d2.m_j == 1 )
def create_suite():
suite = unittest.TestSuite()
suite.addTest( unittest.makeSuite(tester_t))
return suite
def run_suite():
unittest.TextTestRunner(verbosity=2).run( create_suite() )
if __name__ == "__main__":
run_suite()
|