SWIG 4 Template Directive Changes (#1741)

* Updated convert_swig to account for template directive changes in SWIG 4

* Fixed merge issues

* Merge cleanup
This commit is contained in:
Pherring04
2024-07-23 11:45:37 -05:00
committed by GitHub
parent 7b4253d703
commit a9aa7088ad
8 changed files with 274 additions and 56 deletions

View File

@ -2995,6 +2995,24 @@ def main():
TRICK_EXPECT_TRUE( test_so.test_true(), test_suite , "boolean function return" )
TRICK_EXPECT_FALSE( test_so.test_false(), test_suite , "boolean function return" )
######################################################################################################################
test_suite = "SWIG Templates"
test_so.obj.class_no_ns.tnns.x = 1
test_so.obj.class_no_ns.tns.y = 2
test_so.obj.class_ns.tnns.x = 3
test_so.obj.class_ns.tns.y = 4
test_so.obj.foo1.bar.z = 5
test_so.obj.foo2.bar.z = 6
TRICK_EXPECT_EQ( test_so.obj.class_no_ns.tnns.x, 1, test_suite , "template member access" )
TRICK_EXPECT_EQ( test_so.obj.class_no_ns.tns.y, 2, test_suite , "template member access" )
TRICK_EXPECT_EQ( test_so.obj.class_ns.tnns.x, 3, test_suite , "template member access" )
TRICK_EXPECT_EQ( test_so.obj.class_ns.tns.y, 4, test_suite , "template member access" )
TRICK_EXPECT_EQ( test_so.obj.foo1.bar.z, 5, test_suite , "template member access" )
TRICK_EXPECT_EQ( test_so.obj.foo2.bar.z, 6, test_suite , "template member access" )
######################################################################################################################
if __name__ == "__main__":