Revision: 1535
http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1535&view=rev
Author: roman_yakovenko
Date: 2009-01-05 21:03:16 +0000 (Mon, 05 Jan 2009)
Log Message:
-----------
adding missing tester
Added Paths:
-----------
pygccxml_dev/unittests/calling_convention_tester.py
Added: pygccxml_dev/unittests/calling_convention_tester.py
===================================================================
--- pygccxml_dev/unittests/calling_convention_tester.py (rev 0)
+++ pygccxml_dev/unittests/calling_convention_tester.py 2009-01-05 21:03:16 UTC (rev 1535)
@@ -0,0 +1,39 @@
+# Copyright 2004-2008 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 unittest
+import autoconfig
+import parser_test_case
+
+from pygccxml import utils
+from pygccxml import parser
+from pygccxml import declarations
+
+
+class tester_t( unittest.TestCase ):
+ def __init__(self, *args ):
+ unittest.TestCase.__init__( self, *args )
+
+ def test_extract( self ):
+ data = [
+ ( 'thiscall', '(public: __thiscall std::auto_ptr<class pof::number_t>::auto_ptr<class pof::number_t>(class std::auto_ptr<class pof::number_t> &))' )
+ , ( '', "(const pof::number_t::`vftable')" )
+ ]
+
+ for expected, text in data:
+ got = declarations.CALLING_CONVENTION_TYPES.extract( text )
+ self.failUnless( got == expected
+ , "Expected calling convention: %s, got %s" % ( expected, got ) )
+
+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()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|