[pygccxml-commit] SF.net SVN: pygccxml: [1279] pygccxml_dev/unittests
Brought to you by:
mbaas,
roman_yakovenko
From: <rom...@us...> - 2008-03-12 21:11:13
|
Revision: 1279 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1279&view=rev Author: roman_yakovenko Date: 2008-03-12 14:11:19 -0700 (Wed, 12 Mar 2008) Log Message: ----------- adding new unit testers Added Paths: ----------- pygccxml_dev/unittests/bsc_tester.py pygccxml_dev/unittests/data/xxx.bsc.bz2 pygccxml_dev/unittests/data/xxx.pdb.bz2 pygccxml_dev/unittests/pdb_tester.py Added: pygccxml_dev/unittests/bsc_tester.py =================================================================== --- pygccxml_dev/unittests/bsc_tester.py (rev 0) +++ pygccxml_dev/unittests/bsc_tester.py 2008-03-12 21:11:19 UTC (rev 1279) @@ -0,0 +1,31 @@ +import os +import unittest +import autoconfig + +from pygccxml.msvc import bsc + +class tester_t( unittest.TestCase ): + def __init__(self, *args): + unittest.TestCase.__init__(self, *args) + + def test(self): + control_bsc = os.path.join( autoconfig.data_directory, r'xxx.bsc' ) + reader = bsc.reader_t( control_bsc ) + reader.print_stat() + print 'is_case_sensitive', reader.is_case_sensitive + reader.load_instances() + print 'done' + #reader.files + #reader.print_classes( )#r'c:\dev\produce_pdb\produce_pdb.cpp') + + +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() \ No newline at end of file Added: pygccxml_dev/unittests/data/xxx.bsc.bz2 =================================================================== (Binary files differ) Property changes on: pygccxml_dev/unittests/data/xxx.bsc.bz2 ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pygccxml_dev/unittests/data/xxx.pdb.bz2 =================================================================== (Binary files differ) Property changes on: pygccxml_dev/unittests/data/xxx.pdb.bz2 ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pygccxml_dev/unittests/pdb_tester.py =================================================================== --- pygccxml_dev/unittests/pdb_tester.py (rev 0) +++ pygccxml_dev/unittests/pdb_tester.py 2008-03-12 21:11:19 UTC (rev 1279) @@ -0,0 +1,29 @@ +import os +import unittest +import autoconfig + +from pygccxml.msvc import pdb +from pygccxml import declarations + +class tester_t( unittest.TestCase ): + def __init__(self, *args): + unittest.TestCase.__init__(self, *args) + + def test(self): + control_pdb = os.path.join( autoconfig.data_directory, r'xxx.pdb' ) + reader = pdb.reader_t( control_pdb ) + reader.read() + f = file( 'decls.cpp', 'w+' ) + declarations.print_declarations( reader.global_ns, writer=f.write ) + f.close() + +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() \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |