[pygccxml-commit] SF.net SVN: pygccxml:[1742] pyplusplus_dev/unittests
Brought to you by:
mbaas,
roman_yakovenko
|
From: <rom...@us...> - 2009-08-05 20:25:19
|
Revision: 1742
http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1742&view=rev
Author: roman_yakovenko
Date: 2009-08-05 20:25:05 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
updating testers
Modified Paths:
--------------
pyplusplus_dev/unittests/test_all.py
Added Paths:
-----------
pyplusplus_dev/unittests/data/selection_bug_to_be_exported.hpp
pyplusplus_dev/unittests/selection_bug_tester.py
Added: pyplusplus_dev/unittests/data/selection_bug_to_be_exported.hpp
===================================================================
--- pyplusplus_dev/unittests/data/selection_bug_to_be_exported.hpp (rev 0)
+++ pyplusplus_dev/unittests/data/selection_bug_to_be_exported.hpp 2009-08-05 20:25:05 UTC (rev 1742)
@@ -0,0 +1,27 @@
+// 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)
+
+#ifndef __selection_bug_to_be_exported_hpp__
+#define __selection_bug_to_be_exported_hpp__
+
+#include "libconfig.h"
+#include <stdio.h>
+
+class A{
+public:
+ void g() { printf("A::g()\n"); }
+ virtual void foo() = 0;
+};
+
+class B : public A{
+ virtual void foo() { printf("B:foo()\n"); }
+};
+
+void free_func(A *a){
+ a->foo();
+}
+
+
+#endif//__selection_bug_to_be_exported_hpp__
Added: pyplusplus_dev/unittests/selection_bug_tester.py
===================================================================
--- pyplusplus_dev/unittests/selection_bug_tester.py (rev 0)
+++ pyplusplus_dev/unittests/selection_bug_tester.py 2009-08-05 20:25:05 UTC (rev 1742)
@@ -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 os
+import sys
+import unittest
+import fundamental_tester_base
+
+class tester_t(fundamental_tester_base.fundamental_tester_base_t):
+ EXTENSION_NAME = 'selection_bug'
+
+ def __init__( self, *args ):
+ fundamental_tester_base.fundamental_tester_base_t.__init__(
+ self
+ , tester_t.EXTENSION_NAME
+ , *args )
+
+ def customize(self, mb ):
+ mb.class_( 'A' ).include()
+ mb.class_( 'B' ).include()
+
+ #~ mb.member_functions(lambda decl:decl.virtuality == "virtual").include()
+ #~ mb.member_functions(lambda decl:decl.virtuality != "virtual").exclude()
+ mb.mem_funs( lambda decl: decl.virtuality == "not virtual" ).exclude()
+ def run_tests(self, module):
+ 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()
Modified: pyplusplus_dev/unittests/test_all.py
===================================================================
--- pyplusplus_dev/unittests/test_all.py 2009-08-05 20:12:45 UTC (rev 1741)
+++ pyplusplus_dev/unittests/test_all.py 2009-08-05 20:25:05 UTC (rev 1742)
@@ -117,6 +117,8 @@
import std_pair_tester
import mem_var_compile_error_bug_tester
import return_ref_to_ptr_tester
+import function_adaptor_tester
+import selection_bug_tester
#import ogre_generate_tester
testers = [
@@ -224,6 +226,8 @@
, std_pair_tester
, mem_var_compile_error_bug_tester
, return_ref_to_ptr_tester
+ , function_adaptor_tester
+ , selection_bug_tester
# , ogre_generate_tester too much time
]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|