Update of /cvsroot/pygccxml/source/pyplusplus/unittests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7137/pyplusplus/unittests
Added Files:
dwrapper_printer_tester.py
Log Message:
Removing DeclPrinter class from experemental folder.
Now there are 2 printers: decl_printer_t and decl_wrapper_printer_t
--- NEW FILE: dwrapper_printer_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 autoconfig
from pygccxml import parser
from pyplusplus import decl_wrappers
from pyplusplus import module_builder
class tester_t(unittest.TestCase):
def _get_files( self ):
files = [
'enums_to_be_exported.hpp'
, 'free_functions_to_be_exported.hpp'
, 'free_operators_to_be_exported.hpp'
, 'global_variables_to_be_exported.hpp'
, 'index_operator_to_be_exported.hpp'
, 'member_functions_to_be_exported.hpp'
]
return map( lambda f: os.path.join( autoconfig.data_directory, f )
, files )
def test(self):
config = parser.config_t( gccxml_path=autoconfig.gccxml_path
, include_paths=[autoconfig.boost_path]
, undefine_symbols=['__MINGW32__'])
mb = module_builder.module_builder_t(
'dummy'
, self._get_files()
, config )
writer = lambda decl: None
decl_wrappers.print_declarations( mb.declarations, writer=writer )
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()
|