diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk index 59b7abd31..5c2bb01e7 100644 --- a/Examples/test-suite/common.mk +++ b/Examples/test-suite/common.mk @@ -168,6 +168,7 @@ CPP_TEST_CASES += \ pointer_reference \ primitive_ref \ private_assign \ + protected_rename \ pure_virtual \ reference_global_vars \ rename_default \ diff --git a/Examples/test-suite/protected_rename.i b/Examples/test-suite/protected_rename.i new file mode 100644 index 000000000..b5cc9b689 --- /dev/null +++ b/Examples/test-suite/protected_rename.i @@ -0,0 +1,17 @@ +%module protected_rename + +/** + * We should be able to rename Foo::y() to 'x' since the protected + * member variable of the same name is not wrapped. Thus this test + * case shouldn't generate any warnings. + */ + +%rename(x) Foo::y(); + +class Foo { +protected: + int x; +public: + void y(); +}; +