Modified test cases to enable multiple inheritance mode for Ruby.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4747 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
7aee539451
commit
d3a7c986ab
10 changed files with 22 additions and 24 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
%module abstract_virtual
|
%module(ruby_minherit="1") abstract_virtual
|
||||||
|
|
||||||
%warnfilter(802, 813) D; /* Ruby, Java multiple inheritance */
|
%warnfilter(813) D; /* Ruby, Java multiple inheritance */
|
||||||
%warnfilter(802, 813) E; /* Ruby, Java multiple inheritance */
|
%warnfilter(813) E; /* Ruby, Java multiple inheritance */
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
struct A
|
struct A
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
// This module tests default constructor generation under a
|
// This module tests default constructor generation under a
|
||||||
// number of different conditions
|
// number of different conditions
|
||||||
|
|
||||||
%module default_constructor
|
%module(ruby_minherit="1") default_constructor
|
||||||
|
|
||||||
%warnfilter(802, 813) EB; /* Ruby, Java multiple inheritance */
|
%warnfilter(813) EB; /* Ruby, Java multiple inheritance */
|
||||||
%warnfilter(802, 813) AD; /* Ruby, Java multiple inheritance */
|
%warnfilter(813) AD; /* Ruby, Java multiple inheritance */
|
||||||
%warnfilter(510) F; /* friend function */
|
%warnfilter(510) F; /* friend function */
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
%module evil_diamond
|
%module(ruby_minherit="1") evil_diamond
|
||||||
|
|
||||||
%warnfilter(801) foo; // Ruby, wrong class name
|
%warnfilter(801) foo; // Ruby, wrong class name
|
||||||
%warnfilter(801) bar; // Ruby, wrong class name
|
%warnfilter(801) bar; // Ruby, wrong class name
|
||||||
%warnfilter(801) baz; // Ruby, wrong class name
|
%warnfilter(801) baz; // Ruby, wrong class name
|
||||||
%warnfilter(801,802,813) spam; // Ruby, wrong class name; Ruby & Java, multiple inheritance
|
%warnfilter(801,813) spam; // Ruby, wrong class name; Ruby & Java, multiple inheritance
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
%module evil_diamond_ns
|
%module(ruby_minherit="1") evil_diamond_ns
|
||||||
|
|
||||||
%warnfilter(801) Blah::foo; // Ruby, wrong class name
|
%warnfilter(801) Blah::foo; // Ruby, wrong class name
|
||||||
%warnfilter(801) Blah::bar; // Ruby, wrong class name
|
%warnfilter(801) Blah::bar; // Ruby, wrong class name
|
||||||
%warnfilter(801) Blah::baz; // Ruby, wrong class name
|
%warnfilter(801) Blah::baz; // Ruby, wrong class name
|
||||||
%warnfilter(801,802,813) Blah::spam; // Ruby, wrong class name; Ruby & Java, multiple inheritance
|
%warnfilter(801,813) Blah::spam; // Ruby, wrong class name; Ruby & Java, multiple inheritance
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
namespace Blah {
|
namespace Blah {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
%module evil_diamond_prop
|
%module(ruby_minherit="1") evil_diamond_prop
|
||||||
|
|
||||||
%warnfilter(801) foo; // Ruby, wrong class name
|
%warnfilter(801) foo; // Ruby, wrong class name
|
||||||
%warnfilter(801) bar; // Ruby, wrong class name
|
%warnfilter(801) bar; // Ruby, wrong class name
|
||||||
%warnfilter(801) baz; // Ruby, wrong class name
|
%warnfilter(801) baz; // Ruby, wrong class name
|
||||||
%warnfilter(801,802,813) spam; // Ruby, wrong class name; Ruby & Java, multiple inheritance
|
%warnfilter(801,813) spam; // Ruby, wrong class name; Ruby & Java, multiple inheritance
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,7 @@
|
||||||
as in this file:
|
as in this file:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
%module pure_virtual
|
%module(ruby_minherit="1") pure_virtual
|
||||||
|
|
||||||
%warnfilter(802) E; /* Ruby, multiple inheritance */
|
|
||||||
|
|
||||||
%nodefault C;
|
%nodefault C;
|
||||||
%nodefault E;
|
%nodefault E;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
%module template_inherit_abstract
|
%module(ruby_minherit="1") template_inherit_abstract
|
||||||
|
|
||||||
%warnfilter(801) oss::test; /* Ruby, wrong class name */
|
%warnfilter(801) oss::test; /* Ruby, wrong class name */
|
||||||
%warnfilter(802, 813) oss::Module; /* Ruby & Java, multiple inheritance */
|
%warnfilter(813) oss::Module; /* Ruby & Java, multiple inheritance */
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
%module using_composition
|
%module(ruby_minherit="1") using_composition
|
||||||
|
|
||||||
%warnfilter(802, 813) FooBar; // Ruby, Java multiple inheritance
|
%warnfilter(813) FooBar; // Ruby, Java multiple inheritance
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
class Foo {
|
class Foo {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
%module using_extend
|
%module(ruby_minherit="1") using_extend
|
||||||
|
|
||||||
%warnfilter(802, 813) FooBar; // Ruby, Java multiple inheritance
|
%warnfilter(813) FooBar; // Ruby, Java multiple inheritance
|
||||||
|
|
||||||
%extend Foo {
|
%extend Foo {
|
||||||
int blah(int x, int y) {
|
int blah(int x, int y) {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
%module using_namespace
|
%module(ruby_minherit="1") using_namespace
|
||||||
|
|
||||||
%warnfilter(801) hi::hi0; /* Ruby, wrong class name */
|
%warnfilter(801) hi::hi0; /* Ruby, wrong class name */
|
||||||
%warnfilter(801) hi::hi1; /* Ruby, wrong class name */
|
%warnfilter(801) hi::hi1; /* Ruby, wrong class name */
|
||||||
|
|
||||||
%warnfilter(802, 813) Hi<hello::Hello, hi::hi0>; // Ruby, Java multiple inheritance
|
%warnfilter(813) Hi<hello::Hello, hi::hi0>; // Ruby, Java multiple inheritance
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
namespace hello
|
namespace hello
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue