diff options
8 files changed, 40 insertions, 0 deletions
diff --git a/Examples/test-suite/global_immutable_vars.i b/Examples/test-suite/global_immutable_vars.i index cd8cb184b..ab0d4f7a8 100644 --- a/Examples/test-suite/global_immutable_vars.i +++ b/Examples/test-suite/global_immutable_vars.i @@ -20,5 +20,14 @@ %inline %{ int global_mutable_var = 43; int specific_immutable_var = 44; + + int check_values(int default_mutable, int global_immutable, int specific_mutable, int global_mutable, int specific_immutable) { + return + default_mutable == default_mutable_var && + global_immutable == global_immutable_var && + specific_mutable == specific_mutable_var && + global_mutable == global_mutable_var && + specific_immutable == specific_immutable_var; + } %} diff --git a/Examples/test-suite/global_immutable_vars_cpp.i b/Examples/test-suite/global_immutable_vars_cpp.i index 66eb8545d..40cc08e54 100644 --- a/Examples/test-suite/global_immutable_vars_cpp.i +++ b/Examples/test-suite/global_immutable_vars_cpp.i @@ -20,5 +20,14 @@ %inline %{ int global_mutable_var = 43; int specific_immutable_var = 44; + + int check_values(int default_mutable, int global_immutable, int specific_mutable, int global_mutable, int specific_immutable) { + return + default_mutable == default_mutable_var && + global_immutable == global_immutable_var && + specific_mutable == specific_mutable_var && + global_mutable == global_mutable_var && + specific_immutable == specific_immutable_var; + } %} diff --git a/Examples/test-suite/ruby/global_immutable_vars_cpp_runme.rb b/Examples/test-suite/ruby/global_immutable_vars_cpp_runme.rb index c40896a86..7897f7da5 100644 --- a/Examples/test-suite/ruby/global_immutable_vars_cpp_runme.rb +++ b/Examples/test-suite/ruby/global_immutable_vars_cpp_runme.rb @@ -45,3 +45,4 @@ end swig_assert(had_exception, nil, "Global_immutable_vars_cpp::specific_immutable_var is writable (expected to be immutable)") +swig_assert(Global_immutable_vars_cpp::check_values(80, 41, 82, 83, 44) == 1, nil, "Check values failed") diff --git a/Examples/test-suite/ruby/global_immutable_vars_runme.rb b/Examples/test-suite/ruby/global_immutable_vars_runme.rb index af55cfeb3..ffbea270f 100644 --- a/Examples/test-suite/ruby/global_immutable_vars_runme.rb +++ b/Examples/test-suite/ruby/global_immutable_vars_runme.rb @@ -49,3 +49,4 @@ end swig_assert(had_exception, nil, "Global_immutable_vars::specific_immutable_var is writable (expected to be immutable)") +swig_assert(Global_immutable_vars::check_values(80, 41, 82, 83, 44) == 1, nil, "Check values failed") diff --git a/Examples/test-suite/ruby/ruby_global_immutable_vars_cpp_runme.rb b/Examples/test-suite/ruby/ruby_global_immutable_vars_cpp_runme.rb index 8453254eb..5523b59f4 100644 --- a/Examples/test-suite/ruby/ruby_global_immutable_vars_cpp_runme.rb +++ b/Examples/test-suite/ruby/ruby_global_immutable_vars_cpp_runme.rb @@ -45,3 +45,4 @@ end swig_assert(had_exception, nil, "$specific_immutable_var is writable (expected to be immutable)") +swig_assert(check_values(80, 41, 82, 83, 44) == 1, nil, "Check values failed") diff --git a/Examples/test-suite/ruby/ruby_global_immutable_vars_runme.rb b/Examples/test-suite/ruby/ruby_global_immutable_vars_runme.rb index fda1ccf0f..45a8506ba 100644 --- a/Examples/test-suite/ruby/ruby_global_immutable_vars_runme.rb +++ b/Examples/test-suite/ruby/ruby_global_immutable_vars_runme.rb @@ -49,3 +49,4 @@ end swig_assert(had_exception, nil, "$specific_immutable_var is writable (expected to be immutable)") +swig_assert(check_values(80, 41, 82, 83, 44) == 1, nil, "Check values failed") diff --git a/Examples/test-suite/ruby_global_immutable_vars.i b/Examples/test-suite/ruby_global_immutable_vars.i index dc49cd946..6f067d269 100644 --- a/Examples/test-suite/ruby_global_immutable_vars.i +++ b/Examples/test-suite/ruby_global_immutable_vars.i @@ -21,5 +21,14 @@ %inline %{ int global_mutable_var = 43; int specific_immutable_var = 44; + + int check_values(int default_mutable, int global_immutable, int specific_mutable, int global_mutable, int specific_immutable) { + return + default_mutable == default_mutable_var && + global_immutable == global_immutable_var && + specific_mutable == specific_mutable_var && + global_mutable == global_mutable_var && + specific_immutable == specific_immutable_var; + } %} diff --git a/Examples/test-suite/ruby_global_immutable_vars_cpp.i b/Examples/test-suite/ruby_global_immutable_vars_cpp.i index cf3145e80..511390e20 100644 --- a/Examples/test-suite/ruby_global_immutable_vars_cpp.i +++ b/Examples/test-suite/ruby_global_immutable_vars_cpp.i @@ -19,5 +19,14 @@ %inline %{ int global_mutable_var = 43; int specific_immutable_var = 44; + + int check_values(int default_mutable, int global_immutable, int specific_mutable, int global_mutable, int specific_immutable) { + return + default_mutable == default_mutable_var && + global_immutable == global_immutable_var && + specific_mutable == specific_mutable_var && + global_mutable == global_mutable_var && + specific_immutable == specific_immutable_var; + } %} |