[pygccxml-commit] SF.net SVN: pygccxml:[1686] pyplusplus_dev/unittests
Brought to you by:
mbaas,
roman_yakovenko
|
From: <rom...@us...> - 2009-02-17 06:00:28
|
Revision: 1686
http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1686&view=rev
Author: roman_yakovenko
Date: 2009-02-17 06:00:16 +0000 (Tue, 17 Feb 2009)
Log Message:
-----------
adding new test case
Modified Paths:
--------------
pyplusplus_dev/unittests/test_all.py
Added Paths:
-----------
pyplusplus_dev/unittests/data/indexing_suites_v2_bug_a_to_be_exported.hpp
pyplusplus_dev/unittests/data/indexing_suites_v2_bug_b_to_be_exported.hpp
pyplusplus_dev/unittests/indexing_suites_v2_bug_tester.py
Added: pyplusplus_dev/unittests/data/indexing_suites_v2_bug_a_to_be_exported.hpp
===================================================================
--- pyplusplus_dev/unittests/data/indexing_suites_v2_bug_a_to_be_exported.hpp (rev 0)
+++ pyplusplus_dev/unittests/data/indexing_suites_v2_bug_a_to_be_exported.hpp 2009-02-17 06:00:16 UTC (rev 1686)
@@ -0,0 +1,26 @@
+// 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 __indexing_suites_v2_bug_to_be_exported_hpp__
+#define __indexing_suites_v2_bug_to_be_exported_hpp__
+
+#include <vector>
+
+namespace indexing_suites2 {
+
+std::vector<double> create_vector(){
+ std::vector<double> ret;
+ for(size_t i = 0; i < 10; i++)
+ ret.push_back(i);
+ return ret;
+}
+
+}
+
+namespace pyplusplus{ namespace aliases{
+ typedef std::vector< double > numbers_t;
+}}
+
+#endif//__indexing_suites_v2_bug_to_be_exported_hpp__
Added: pyplusplus_dev/unittests/data/indexing_suites_v2_bug_b_to_be_exported.hpp
===================================================================
--- pyplusplus_dev/unittests/data/indexing_suites_v2_bug_b_to_be_exported.hpp (rev 0)
+++ pyplusplus_dev/unittests/data/indexing_suites_v2_bug_b_to_be_exported.hpp 2009-02-17 06:00:16 UTC (rev 1686)
@@ -0,0 +1,26 @@
+// 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 __indexing_suites_v2_bug_to_be_exported_hpp__
+#define __indexing_suites_v2_bug_to_be_exported_hpp__
+
+#include <vector>
+
+namespace indexing_suites2 {
+
+std::vector<double> create_vector(){
+ std::vector<double> ret;
+ for(size_t i = 0; i < 10; i++)
+ ret.push_back(i);
+ return ret;
+}
+
+}
+
+namespace pyplusplus{ namespace aliases{
+ typedef std::vector< double > numbers_t;
+}}
+
+#endif//__indexing_suites_v2_bug_to_be_exported_hpp__
Added: pyplusplus_dev/unittests/indexing_suites_v2_bug_tester.py
===================================================================
--- pyplusplus_dev/unittests/indexing_suites_v2_bug_tester.py (rev 0)
+++ pyplusplus_dev/unittests/indexing_suites_v2_bug_tester.py 2009-02-17 06:00:16 UTC (rev 1686)
@@ -0,0 +1,44 @@
+# 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 autoconfig
+import fundamental_tester_base
+from pyplusplus import code_creators
+
+class tester_t(fundamental_tester_base.fundamental_tester_base_t):
+ def __init__( self, *args ):
+ fundamental_tester_base.fundamental_tester_base_t.__init__( self, self.EXTENSION_NAME, indexing_suite_version=2, *args )
+
+ def run_tests(self, module):
+ v = module.create_vector()
+ for i in v:
+ print i
+
+class tester_a_t(tester_t):
+ EXTENSION_NAME = 'indexing_suites_v2_bug_a'
+ def __init__( self, *args ):
+ tester_t.__init__( self, *args )
+
+
+class tester_b_t(tester_t):
+ EXTENSION_NAME = 'indexing_suites_v2_bug_b'
+ def __init__( self, *args ):
+ tester_t.__init__( self, *args )
+
+
+def create_suite():
+ suite = unittest.TestSuite()
+ suite.addTest( unittest.makeSuite(tester_a_t))
+ suite.addTest( unittest.makeSuite(tester_b_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-02-16 19:37:12 UTC (rev 1685)
+++ pyplusplus_dev/unittests/test_all.py 2009-02-17 06:00:16 UTC (rev 1686)
@@ -113,6 +113,7 @@
import return_auto_ptr_tester
import ctypes_tester
import refee_refer_tester
+import indexing_suites_v2_bug_tester
#import ogre_generate_tester
testers = [
@@ -213,6 +214,7 @@
, protected_bug_tester
, ctypes_tester
, refee_refer_tester
+ , indexing_suites_v2_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.
|