[pygccxml-commit] SF.net SVN: pygccxml: [1302] pyplusplus_dev/unittests
Brought to you by:
mbaas,
roman_yakovenko
|
From: <rom...@us...> - 2008-04-07 21:45:08
|
Revision: 1302
http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1302&view=rev
Author: roman_yakovenko
Date: 2008-04-07 14:45:15 -0700 (Mon, 07 Apr 2008)
Log Message:
-----------
adding new test case
Modified Paths:
--------------
pyplusplus_dev/unittests/test_all.py
Added Paths:
-----------
pyplusplus_dev/unittests/data/split_module_indexing_suite_bug_to_be_exported.hpp
pyplusplus_dev/unittests/split_module_indexing_suite_bug_tester.py
Added: pyplusplus_dev/unittests/data/split_module_indexing_suite_bug_to_be_exported.hpp
===================================================================
--- pyplusplus_dev/unittests/data/split_module_indexing_suite_bug_to_be_exported.hpp (rev 0)
+++ pyplusplus_dev/unittests/data/split_module_indexing_suite_bug_to_be_exported.hpp 2008-04-07 21:45:15 UTC (rev 1302)
@@ -0,0 +1,30 @@
+// 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 __split_module_indexing_suite_bug_to_be_exported_hpp__
+#define __split_module_indexing_suite_bug_to_be_exported_hpp__
+
+#include <string>
+#include <boost/any.hpp>
+#include <map>
+#include <vector>
+
+
+struct generic_string_map_t
+{
+public:
+ generic_string_map_t() {};
+
+ std::vector<std::string> get_value(std::string key) const{
+ return std::vector<std::string>();
+ }
+
+private:
+ std::map<std::string, boost::any> m_fields;
+
+};
+
+
+#endif//__split_module_indexing_suite_bug_to_be_exported_hpp__
Added: pyplusplus_dev/unittests/split_module_indexing_suite_bug_tester.py
===================================================================
--- pyplusplus_dev/unittests/split_module_indexing_suite_bug_tester.py (rev 0)
+++ pyplusplus_dev/unittests/split_module_indexing_suite_bug_tester.py 2008-04-07 21:45:15 UTC (rev 1302)
@@ -0,0 +1,56 @@
+# 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 autoconfig
+import fundamental_tester_base
+
+from pyplusplus import module_builder
+from pyplusplus.module_builder import call_policies
+
+class tester_t(fundamental_tester_base.fundamental_tester_base_t):
+ EXTENSION_NAME = 'split_module_indexing_suite_bug'
+
+ def __init__( self, *args ):
+ fundamental_tester_base.fundamental_tester_base_t.__init__(
+ self
+ , tester_t.EXTENSION_NAME
+ , indexing_suite_version=2
+ , *args )
+ self.files = []
+
+ def customize( self, mb ):
+ #~ find out what does happen here
+ #string = mb.class_( lambda cls: cls.partial_name.startswith( 'basic_string<' )
+ # and 'wchar_t' not in cls.partial_name )
+ #string.alias = 'string'
+ pass
+
+ def generate_source_files( self, mb ):
+ files = mb.split_module( autoconfig.build_dir, on_unused_file_found=lambda fpath: fpath )
+ self.files = filter( lambda fname: fname.endswith( 'cpp' ), files )
+ #~ self.files.append( os.path.join( autoconfig.data_directory
+ #~ , self.EXTENSION_NAME + '_to_be_exported.cpp' ) )
+ print self.files
+
+
+ def get_source_files( self ):
+ return self.files
+
+ 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 2008-04-07 21:41:50 UTC (rev 1301)
+++ pyplusplus_dev/unittests/test_all.py 2008-04-07 21:45:15 UTC (rev 1302)
@@ -101,6 +101,7 @@
import precompiled_header_tester
import balanced_files_tester
import ft_inout_tester
+import split_module_indexing_suite_bug_tester
testers = [
algorithms_tester
@@ -189,6 +190,7 @@
, ft_inout_tester
, deepcopy_tester
, override_bug_tester
+ , split_module_indexing_suite_bug_tester
]
class module_runner_t( object ):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|