aboutsummaryrefslogtreecommitdiffstats
path: root/tests/samplebinding
diff options
context:
space:
mode:
authorMatthew Woehlke <matthew.woehlke@kitware.com>2013-08-28 12:18:22 -0400
committerJohn Cummings <jcummings2@users.sf.net>2013-09-24 19:19:38 +0200
commit22aa9ced0d6b167ee835b4b184511c5df3f79591 (patch)
tree907354d65004a7c4434a5ae2b0b88deb6d530370 /tests/samplebinding
parent8287ee801965f2fbeea573e1eb652cc851920f86 (diff)
Write inititializations in topological order
Add methods to various places in the hierarchy so that the generator can access the topologically ordered class list (in addition to the unordered class list). Modify CppGenerator::finishGeneration to use this. This fixes a failure to correctly create Python wrapper classes due to subclass wrappers being initialized before their base class (with the result that the looked-up type object for the base class is null, causing the derived class to be created without referencing the base). Also change one of the test cases to test that we correctly wrap a typedef of a template class derived from a non-template base (which was failing before this change for the aforementioned reason). Change-Id: Ib4dc2626a41cb7bb905ff4a302c2613ea12d026b Reviewed-by: John Cummings <jcummings2@users.sf.net>
Diffstat (limited to 'tests/samplebinding')
-rw-r--r--tests/samplebinding/CMakeLists.txt1
-rw-r--r--tests/samplebinding/typesystem_sample.xml1
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/samplebinding/CMakeLists.txt b/tests/samplebinding/CMakeLists.txt
index 78bba9da4..23ff63c3d 100644
--- a/tests/samplebinding/CMakeLists.txt
+++ b/tests/samplebinding/CMakeLists.txt
@@ -65,6 +65,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/sample/pairuser_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/sample/pen_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/sample/persistentmodelindex_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/sample/photon_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/sample/photon_base_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/sample/photon_valueidentity_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/sample/photon_valueduplicator_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/sample/point_wrapper.cpp
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml
index 14b4f9d0f..4e3a9245b 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -595,6 +595,7 @@
<namespace-type name="Photon">
<enum-type name="ClassType"/>
+ <value-type name="Base"/>
<value-type name="TemplateBase" generate="no"/>
<value-type name="ValueIdentity"/>
<value-type name="ValueDuplicator"/>