Update of /cvsroot/pygccxml/source/pyplusplus/unittests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32499/pyplusplus/unittests
Modified Files:
test_all.py
Added Files:
pointer_as_arg_tester.py
Log Message:
Adding unit test to next use case void f( data* x=0 )
Pinter that has null as default value
--- NEW FILE: pointer_as_arg_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 = 'pointer_as_arg'
def __init__( self, *args ):
fundamental_tester_base.fundamental_tester_base_t.__init__(
self
, tester_t.EXTENSION_NAME
, *args )
def run_tests(self, module):
d = module.data()
self.failUnless( module.test_for_null( d ) )
self.failUnless( not module.test_for_null() )
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()
Index: test_all.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/test_all.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** test_all.py 19 Mar 2006 13:35:39 -0000 1.35
--- test_all.py 26 Mar 2006 07:20:56 -0000 1.36
***************
*** 47,50 ****
--- 47,51 ----
import free_function_ignore_bug_tester
import optional_bug_tester
+ import pointer_as_arg_tester
def create_suite(times):
***************
*** 90,93 ****
--- 91,95 ----
, free_function_ignore_bug_tester
, optional_bug_tester
+ , pointer_as_arg_tester
]
|