[pygccxml-commit] SF.net SVN: pygccxml: [1315] pyplusplus_dev/unittests
Brought to you by:
mbaas,
roman_yakovenko
|
From: <rom...@us...> - 2008-04-28 15:22:47
|
Revision: 1315
http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1315&view=rev
Author: roman_yakovenko
Date: 2008-04-28 08:22:30 -0700 (Mon, 28 Apr 2008)
Log Message:
-----------
adding new test case - inner template class
Modified Paths:
--------------
pyplusplus_dev/unittests/test_all.py
Added Paths:
-----------
pyplusplus_dev/unittests/data/inner_tmpl_class_to_be_exported.hpp
pyplusplus_dev/unittests/inner_tmpl_class_tester.py
Added: pyplusplus_dev/unittests/data/inner_tmpl_class_to_be_exported.hpp
===================================================================
--- pyplusplus_dev/unittests/data/inner_tmpl_class_to_be_exported.hpp (rev 0)
+++ pyplusplus_dev/unittests/data/inner_tmpl_class_to_be_exported.hpp 2008-04-28 15:22:30 UTC (rev 1315)
@@ -0,0 +1,28 @@
+// 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 __inner_tmpl_class_to_be_exported_hpp__
+#define __inner_tmpl_class_to_be_exported_hpp__
+
+#include <string>
+
+namespace inner_tmpl_class{
+
+struct Outer {
+ template <typename T>
+ struct Inner{
+ Inner(T t_) : t( t_ )
+ {}
+
+ T t;
+ };
+
+ typedef Inner<int> Inner_int;
+ Inner_int f() { return Inner_int(23); }
+};
+
+}
+
+#endif//__inner_tmpl_class_to_be_exported_hpp__
Added: pyplusplus_dev/unittests/inner_tmpl_class_tester.py
===================================================================
--- pyplusplus_dev/unittests/inner_tmpl_class_tester.py (rev 0)
+++ pyplusplus_dev/unittests/inner_tmpl_class_tester.py 2008-04-28 15:22:30 UTC (rev 1315)
@@ -0,0 +1,35 @@
+# 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 = 'inner_tmpl_class'
+
+ def __init__( self, *args ):
+ fundamental_tester_base.fundamental_tester_base_t.__init__(
+ self
+ , tester_t.EXTENSION_NAME
+ , *args )
+
+ def run_tests( self, module):
+ o = module.Outer()
+ i = o.f()
+ self.failUnless( i.t == 23 )
+
+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-27 20:03:45 UTC (rev 1314)
+++ pyplusplus_dev/unittests/test_all.py 2008-04-28 15:22:30 UTC (rev 1315)
@@ -102,6 +102,7 @@
import balanced_files_tester
import ft_inout_tester
import split_module_indexing_suite_bug_tester
+import inner_tmpl_class_tester
testers = [
algorithms_tester
@@ -191,6 +192,7 @@
, deepcopy_tester
, override_bug_tester
, split_module_indexing_suite_bug_tester
+ , inner_tmpl_class_tester
]
class module_runner_t( object ):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|