[pygccxml-commit] SF.net SVN: pygccxml: [850] pyplusplus_dev/unittests
Brought to you by:
mbaas,
roman_yakovenko
|
From: <rom...@us...> - 2007-01-06 19:26:28
|
Revision: 850
http://svn.sourceforge.net/pygccxml/?rev=850&view=rev
Author: roman_yakovenko
Date: 2007-01-06 11:26:24 -0800 (Sat, 06 Jan 2007)
Log Message:
-----------
adding new test
Modified Paths:
--------------
pyplusplus_dev/unittests/temp/named_tuple.py
pyplusplus_dev/unittests/test_all.py
Added Paths:
-----------
pyplusplus_dev/unittests/data/throw_to_be_exported.cpp
pyplusplus_dev/unittests/data/throw_to_be_exported.hpp
pyplusplus_dev/unittests/throw_tester.py
Added: pyplusplus_dev/unittests/data/throw_to_be_exported.cpp
===================================================================
--- pyplusplus_dev/unittests/data/throw_to_be_exported.cpp (rev 0)
+++ pyplusplus_dev/unittests/data/throw_to_be_exported.cpp 2007-01-06 19:26:24 UTC (rev 850)
@@ -0,0 +1,13 @@
+// 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)
+
+#include "throw_to_be_exported.hpp"
+
+namespace throw_exceptions{
+
+
+}//throw_exceptions
+
+
Added: pyplusplus_dev/unittests/data/throw_to_be_exported.hpp
===================================================================
--- pyplusplus_dev/unittests/data/throw_to_be_exported.hpp (rev 0)
+++ pyplusplus_dev/unittests/data/throw_to_be_exported.hpp 2007-01-06 19:26:24 UTC (rev 850)
@@ -0,0 +1,29 @@
+// 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)
+
+#ifndef __throw_to_be_exported_hpp__
+#define __throw_to_be_exported_hpp__
+
+namespace throw_exceptions{
+
+struct my_exception{
+};
+
+inline void raise_nothing() throw() {};
+inline void raise_nothing(int) throw() {};
+inline void raise_always() throw( my_exception ){};
+inline void raise_always(int) throw( my_exception ){};
+
+struct mem_fun_throw_exception_t{
+ void raise_nothing() throw() {};
+ void raise_nothing(int) throw() {};
+ virtual void raise_always() throw( my_exception ){};
+ virtual void raise_always(int) throw( my_exception ){};
+};
+
+
+}
+
+#endif//__throw_to_be_exported_hpp__
Modified: pyplusplus_dev/unittests/temp/named_tuple.py
===================================================================
--- pyplusplus_dev/unittests/temp/named_tuple.py 2007-01-04 22:05:32 UTC (rev 849)
+++ pyplusplus_dev/unittests/temp/named_tuple.py 2007-01-06 19:26:24 UTC (rev 850)
@@ -1,5 +1,5 @@
-# This file has been generated by Py++.
-
+# This file has been generated by Py++.
+
# Copyright 2004 Roman Yakovenko.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
@@ -43,4 +43,4 @@
assert a == 0 and b == 1
assert nt[ "a" ] == 0 and nt[ "b" ] == 1
-
+
Modified: pyplusplus_dev/unittests/test_all.py
===================================================================
--- pyplusplus_dev/unittests/test_all.py 2007-01-04 22:05:32 UTC (rev 849)
+++ pyplusplus_dev/unittests/test_all.py 2007-01-06 19:26:24 UTC (rev 850)
@@ -68,6 +68,7 @@
import inner_class_bug_tester
import declarations_order_bug_tester
import function_transformations_tester
+import throw_tester
def create_suite(times):
testers = [
@@ -132,6 +133,7 @@
, inner_class_bug_tester
, declarations_order_bug_tester
, function_transformations_tester
+ , throw_tester
]
main_suite = unittest.TestSuite()
Added: pyplusplus_dev/unittests/throw_tester.py
===================================================================
--- pyplusplus_dev/unittests/throw_tester.py (rev 0)
+++ pyplusplus_dev/unittests/throw_tester.py 2007-01-06 19:26:24 UTC (rev 850)
@@ -0,0 +1,34 @@
+# 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 pyplusplus import code_creators
+
+class tester_t(fundamental_tester_base.fundamental_tester_base_t):
+ EXTENSION_NAME = 'throw'
+
+ def __init__( self, *args ):
+ fundamental_tester_base.fundamental_tester_base_t.__init__(
+ self
+ , tester_t.EXTENSION_NAME
+ , *args )
+
+ def run_tests( self, module):
+ #check compilation
+ pass
+
+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.
|