Merge branch 'master' into vadz-doxygen
* master: Add Octave 4.4 to Travis allow_failures Fixes for appveyor image changes Javascript test-suite Makefile parallel jobs Add changes entry for csconstruct, dconstruct and javaconstruct fix Fix lookup of csconstruct, dconstructor and javaconstruct typemaps Javascript %nspace fix in generated C++ code Add C++17 documentation chapter Add changes notes for C++17 nested namespaces support Test for invalid C++17 nested namespace aliases Test c++17 nested namespaces and %nspace Add c++17 nested namespaces runtime test for C# Add c++17 nested namespaces runtime test for Python Add support for c++17 nested namespaces Update CHANGES.current .travis.yml: test against Octave 4.4 Examples/test-suite/register_par.i: rename 'tree' to 'swig_tree' Examples/octave/module_load/runme.m: update 'exist()' statements for Octave >= 4.4 Examples/octave/module_load/runme.m: do not use duplicate function names Examples/Makefile.in: unset OCTAVE_PATH when running Octave for tests Lib/octave: fix getting/setting global variables for Octave >= 4.4 Lib/octave: use new class for function member dereference with Octave >= 4.4 Lib/octave: fix operator installation for Octave >= 4.4 Lib/Octave: in Octave >= 4.4, assign reference to base class in subclass Lib/octave: fix call to mlock() for Octave >= 4.4 Lib/octave: fix call to octave::call_stack::current() for Octave >= 4.4 Lib/octave: 'octave_exit' not longer exists in Octave >= 4.4 Lib/octave: replace is_bool_type() with islogical() for Octave >= 4.4 Lib/octave: replace is_numeric_type() with isnumeric() for Octave >= 4.4 Lib/octave: replace is_cell() with iscell() for Octave >= 4.4 Lib/octave: call octave::feval() instead of feval() for Octave >= 4.4 Lib/octave: fix function name passed to unwind_protect::begin_frame() C#, D, Java methodmodifiers on destructors Javascript assert.h - move to header section Appveyor cl compiler warning fixes during configure Java vector wrappers cast correction test-suite fixes (Java directors) for compilers that don't support varargs Go - use director.swg like other languages test-suite fixes (2) for compilers that don't support varargs Consistent spacing in generated exception specifications test-suite fixes for compilers that don't support vararg macros Enhance Travis testing to use gcc 8 and test C++17 and C17 Enhance SWIG_isfinite for older standards: C++03/C++98/C89 test-suite support for gcc-8 targeting C++11 and C++14 Scilab portability fixes - remove use of strdup Scilab array overbounds fix handling char type exceptions test-suite fix for c++17 and throw macro Remove use of 'register' in C source test-suite support for C++17: switch testing of the deprecated C++17 'register' keyword from C++ to C Examples update to support C++17: exception specification throw removal Cosmetic syntax tweak using throw in Octave directors test-suite support for C++17 (Java): exception specification throw removal test-suite support for C++17: exception specification throw removal __cplusplus macro usage tweak Improve detection of Python's 2to3 tool Correct C shared library creation when specifing CC to configure Remove superfluous parens in generated Python scripts. [ci] guile 2.2 build no longer expected to fail guile - resstructure some configure tests Disable guile configuration if guile-config and guile report a different version Fix guile executable detection on early 2.0.x guile versions guile - drop GDB_INTERFACE related stuff guile - replace obsolete scm_listify with scm_list_n guile - use more reliable method of finding guile executable based on guile-config Fix go version matching in configure for go1.10 [Python] Suppress new pycodestyle warning Add if-no-present action for jsv8inc arg Fix typo in help --with-jscoreinc and --with-jscorelib Fix off-by-one error * Makefile.in (configfiles): Update URLs for latest configfiles. Add changes entry for Ruby %alias fix for global functions [Ruby] Pass Qnil instead of NULL to rb_funcall() Fix typo Fix ruby %alias directive for native c functions Stop testing Python on Appveyor msys/mingw Fix -Wimplicit-fallthrough gcc-7.3 warning
This commit is contained in:
commit
0cfd53cff7
136 changed files with 2767 additions and 1956 deletions
|
|
@ -22,6 +22,7 @@ CPP_TEST_CASES = \
|
|||
li_std_stack \
|
||||
li_std_wstring \
|
||||
primitive_types \
|
||||
ruby_alias_method \
|
||||
ruby_keywords \
|
||||
ruby_minherit_shared_ptr \
|
||||
ruby_naming \
|
||||
|
|
@ -44,6 +45,8 @@ CPP11_TEST_CASES = \
|
|||
|
||||
C_TEST_CASES += \
|
||||
li_cstring \
|
||||
ruby_alias_global_function \
|
||||
ruby_alias_module_function \
|
||||
ruby_manual_proxy \
|
||||
|
||||
include $(srcdir)/../common.mk
|
||||
|
|
@ -52,6 +55,7 @@ include $(srcdir)/../common.mk
|
|||
SWIGOPT += -w801 -noautorename -features autodoc=4
|
||||
|
||||
# Custom tests - tests with additional commandline options
|
||||
ruby_alias_global_function.ctest: SWIGOPT += -globalmodule
|
||||
ruby_naming.cpptest: SWIGOPT += -autorename
|
||||
|
||||
# Rules for the different types of tests
|
||||
|
|
|
|||
20
Examples/test-suite/ruby/ruby_alias_global_function_runme.rb
Normal file
20
Examples/test-suite/ruby/ruby_alias_global_function_runme.rb
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env ruby
|
||||
#
|
||||
# Runtime tests for ruby_alias_global_function.i
|
||||
#
|
||||
|
||||
require 'swig_assert'
|
||||
require 'ruby_alias_global_function'
|
||||
|
||||
expected_name = get_my_name
|
||||
|
||||
swig_assert(fullname == expected_name, msg: "nickname not working as expected")
|
||||
swig_assert(nickname == expected_name, msg: "fullname not working as expected")
|
||||
|
||||
if method(:nickname).respond_to?(:original_name)
|
||||
swig_assert_equal_simple(method(:nickname).original_name, :get_my_name)
|
||||
swig_assert_equal_simple(method(:fullname).original_name, :get_my_name)
|
||||
else
|
||||
swig_assert(method(:nickname) == method(:get_my_name), msg: "nickname is not an alias of get_my_name")
|
||||
swig_assert(method(:fullname) == method(:get_my_name), msg: "fullname is not an alias of get_my_name")
|
||||
end
|
||||
24
Examples/test-suite/ruby/ruby_alias_method_runme.rb
Normal file
24
Examples/test-suite/ruby/ruby_alias_method_runme.rb
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env ruby
|
||||
#
|
||||
# Runtime tests for ruby_alias_method.i
|
||||
#
|
||||
|
||||
require 'swig_assert'
|
||||
require 'ruby_alias_method'
|
||||
|
||||
include Ruby_alias_method
|
||||
|
||||
expected_name = "Chester Tester"
|
||||
syn = Synonym.new(expected_name)
|
||||
|
||||
swig_assert(syn.getMyName() == expected_name, msg: "getMyName not working as expected")
|
||||
swig_assert(syn.nickname() == expected_name, msg: "nickname not working as expected")
|
||||
swig_assert(syn.fullname() == expected_name, msg: "fullname not working as expected")
|
||||
|
||||
if syn.method(:nickname).respond_to?(:original_name)
|
||||
swig_assert_equal_simple(syn.method(:nickname).original_name, :getMyName)
|
||||
swig_assert_equal_simple(syn.method(:fullname).original_name, :getMyName)
|
||||
else
|
||||
swig_assert(syn.method(:nickname) == syn.method(:getMyName))
|
||||
swig_assert(syn.method(:fullname) == syn.method(:getMyName))
|
||||
end
|
||||
26
Examples/test-suite/ruby/ruby_alias_module_function_runme.rb
Normal file
26
Examples/test-suite/ruby/ruby_alias_module_function_runme.rb
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env ruby
|
||||
#
|
||||
# Runtime tests for ruby_alias_module_function.i
|
||||
#
|
||||
|
||||
require 'swig_assert'
|
||||
require 'ruby_alias_module_function'
|
||||
|
||||
include Ruby_alias_module_function
|
||||
|
||||
expected_name = Ruby_alias_module_function.get_my_name
|
||||
|
||||
swig_assert(Ruby_alias_module_function.nickname == expected_name, msg: "nickname returned a different result than get_my_name")
|
||||
swig_assert(Ruby_alias_module_function.fullname == expected_name, msg: "fullname returned a different result than get_my_name")
|
||||
|
||||
nickname_method = Ruby_alias_module_function.method(:nickname)
|
||||
fullname_method = Ruby_alias_module_function.method(:fullname)
|
||||
|
||||
if nickname_method.respond_to?(:original_name)
|
||||
swig_assert_equal_simple(nickname_method.original_name, :get_my_name)
|
||||
swig_assert_equal_simple(fullname_method.original_name, :get_my_name)
|
||||
else
|
||||
original_method = Ruby_alias_module_function.method(:get_my_name)
|
||||
swig_assert(nickname_method == original_method, msg: "nickname is not an alias of get_my_name")
|
||||
swig_assert(fullname_method == original_method, msg: "fullname is not an alias of get_my_name")
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue