Commit graph

85 commits

Author SHA1 Message Date
William S Fulton
99954d6d4e Shorten testcase variable names for Scilab 6 to work 2021-11-15 22:45:56 +00:00
Vadim Zeitlin
4b05d8d947 Don't run ccomplextest as part of JavaScript test suite
This test currently fails due to "I" being undefined, so disable it to
let the rest of the tests to pass and add it later when this can be
fixed.
2021-10-01 02:11:11 +02:00
Vadim Zeitlin
58a49bac66 Suppress more -Wignored-qualifiers in JavaScript tests
This is probably not the greatest idea, and it would be better to change
the generated code to avoid these tests instead, but it was already done
like this for several tests, so just add two more of them that generate
warnings such as

../../member_funcptr_galore_wrap.cxx: In function ‘SwigV8ReturnValue _wrap_MemberFuncPtrs_aaa6(const SwigV8Arguments&)’:
../../member_funcptr_galore_wrap.cxx:3495:90: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]
 3495 |   result = (int)((MemberFuncPtrs const *)arg1)->aaa6((short (Funcs::*const )(bool) const)arg2);
      |                                                                                          ^~~~

when using gcc 9.
2021-10-01 01:39:12 +02:00
William S Fulton
9739be60d0 Add two Javascript testcases converted from Python 2021-03-11 20:10:18 +00:00
William S Fulton
04b46cc8a3 Javascript type conversion support
Add testcase for previous commit.
Add missing assert for future type conversions support that will use
the heap instead of pointer casts (for smart pointer type conversions).

Closes #1963
2021-03-11 20:10:13 +00:00
William S Fulton
227614056b Convert javascript_arrays.i example into testcase 2021-03-06 10:55:47 +00:00
William S Fulton
4b64becbbb OUTPUT typemaps on methods that don't return void
SWIGJSC_ValueIsArray could be implemented by JSValueIsArray in later
versions of Javascript webkit, similar fix to previous commits for v8.

Enhance testing of OUTPUT typemaps to test more than one output.
2021-03-01 14:20:18 +00:00
William S Fulton
1de4a3a8f6 Add Javascript test for missing new in constructor call
Testcase for issue #969 and issue #626
2021-02-28 22:01:32 +00:00
William S Fulton
769dc27bcd Javascript: Add runtime tests for typemaps.i
Tests fix in previous couple of commits.
2021-02-28 21:01:56 +00:00
William S Fulton
1d4ef62466 Node: Fix handling of large unsigned values
Closes #1269
2021-02-26 23:31:12 +00:00
William S Fulton
f318bb8286 Add missing clean targets
template_typedef_cplx2 files are generated by the template_typedef_import.multicpptest
but can also be cleaned by the template_typedef_cplx2.cpptest target.
2020-10-10 15:02:26 +01:00
William S Fulton
fd592fdc3b Split C complex.h from C++ complex testing 2020-10-10 15:01:29 +01:00
William S Fulton
339377410b Put test in alphabetical order 2020-10-07 22:21:37 +01:00
Thomas Reitmayr
c259702314 Perform proper spacing in director method declarations
If a director method returns a const pointer, eg. 'int *const', then in its
method declaration a space has to be inserted between 'const' and the
method name.
This fixes swig#1810.
2020-06-20 12:14:42 +02:00
Chris Walker
e7993dca97 Dev Checkpoint 201906252113 2019-06-25 21:13:49 -06:00
William S Fulton
4e5d1891e6 testcase fixes for gcc-9 2019-04-15 23:25:53 +01:00
Zackery Spytz
83df4e8ed6 [OCaml] Fix and re-enable the string_simple, minherit, and unions tests
copy_string() is a macro in the OCaml C API, so rename the function
to copy_str(). Add a runtime test.

The minherit runtime test was fixed by b64d685.

Use the proper syntax for accessing member variables in
unions_runme.ml
2019-01-13 17:28:00 -07:00
William S Fulton
ec8d978995 Overloading for non-pointers and NULL - Javascript
Overloading support for Javascript is generally incomplete as there are
no typecheck typemaps, so the overloading and NULL support added here
doesn't work and won't work until the typecheck typemaps are
implemented.
2018-12-30 10:11:35 +00:00
William S Fulton
1f76cda125 Javascript test-suite Makefile parallel jobs
Suppress warning running test-suite and examples:
  make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
Note that node-gyp uses make under the hood and clearing the MAKEFILE env is the
only way I could find to suppress this warning.
2018-05-17 08:15:48 +01:00
William S Fulton
a55981b883 Fix C# std::complex pass by value typemaps 2017-10-02 19:07:24 +01:00
William S Fulton
e01cfd70c7 Add missing declaration for std::complex
Fixes missing type information for std::complex in scripting languages.
Closes #732.

Update Javascript and Octave complextest, although they don't actually
get run as they don't work
2017-10-02 19:07:24 +01:00
William S Fulton
95e8643d70 Rename func to funk in tests to avoid Go keyword problems 2017-06-16 19:24:48 +01:00
Olly Betts
b138f054e5 [Javascript] Fix SWIG_exception() macro (#792)
Fix SWIG_exception() macro to return from the current function.
Fixes #789, reported by Julien Dutriaux.
2016-09-17 17:29:42 +12:00
William S Fulton
7aa5f07dfd Fix 'make partialcheck-test-suite'
Python pep8 should not be run as part of partialcheck
Javascript should also only invoke SWIG during partialcheck
2016-03-18 18:56:55 +00:00
William S Fulton
bc3bf51af2 Duplicate tests that are run twice as both C and C++ tests to fix parallel make: empty 2016-02-21 18:03:14 +00:00
William S Fulton
ca64b06229 Consistent quoting in Makefile 2015-08-21 22:48:34 +01:00
William S Fulton
e00a8026a6 More remove SWIG_LIB variable 2015-08-21 22:48:34 +01:00
Vadim Zeitlin
a1bddd56eb Make (char*, size_t) typemap usable for strings of other types in Java.
Notably it now works for "unsigned char*" strings.

Add a test to check that it now works in Java and also showing that it already
worked for the other languages with support for this typemap.
2015-08-07 19:44:45 +02:00
William S Fulton
1610ca86dd Fix javascript clean 2014-12-28 19:07:32 +00:00
William S Fulton
8b9d68582d Fix javascript clean
Regression introduced a couple of commits ago
2014-12-28 17:35:18 +00:00
William S Fulton
2b04d37b94 Tidy up Javascript build system 2014-12-28 16:13:22 +00:00
William S Fulton
3d85dfba9a Add c++11 strongly typed enums runtime test for Javascript 2014-12-02 19:59:59 +00:00
Richard
b0afc7a9a5 Allow to specify V8 version, for example:
V8_VERSION=0x031511 ENGINE=v8 make check-javascript-test-suite
2014-08-28 19:46:49 -05:00
William S Fulton
664c6cc81e Fix infinity testcase on windows 2014-05-29 07:50:21 +01:00
Karl Wette
fca95febde Fully clean Javascript test-suite with jsc and v8 2014-05-29 02:29:27 +02:00
Oliver Buchtala
3f0f588891 Javascript: support null pointers.
We allow to set pointer types using JS null.
2014-05-19 16:04:22 +02:00
Oliver Buchtala
2471e4ad9f Javascript: Use RUNTOOL for running tests. 2014-05-19 12:11:15 +02:00
Oliver Buchtala
7cc617a19d Revert "Javascript: support null pointers."
This reverts commit 11963788e0.
2014-05-19 11:46:21 +02:00
Oliver Buchtala
a64549034c Javascript: generalise test-case 'typemap_variables' so that it can be used for Javascript V8.
The original version contains output typemaps that produced incompatible code.
Introduce a pre-processor macro that is set to a valid value for v8.
2014-05-19 00:58:32 +02:00
Oliver Buchtala
11963788e0 Javascript: support null pointers.
We allow to set pointer types using JS null.
2014-05-19 00:21:21 +02:00
William S Fulton
ac89f7f785 Javascript examples tidy up
- Remove empty files
- Improve clean
2014-05-18 00:59:47 +01:00
William S Fulton
beccd3258f Update all languages to use SCRIPTDIR
R also to use SCRIPTPREFIX and SCRIPTSUFFIX
2014-05-15 23:11:07 +01:00
William S Fulton
2b5499a262 Slight simplification of test-suite build for new out-of-source changes
Provide default SRCDIR and SCRIPTDIR variables in common.mk and override
only where needed.
2014-05-15 23:11:07 +01:00
Karl Wette
f574a34155 Allow examples and test-suite to be built out of source tree
- Examples/Makefile.in rules use SRCDIR as the relative source directory

- ./config.status replicates Examples/ source directory tree in build
  directory, and copies each Makefile to build directory, prefixed with
  a header which sets SRCDIR to source directory

- Examples/test-suite/.../Makefile.in set SRCDIR from Autoconf-set srcdir

- Examples/test-suite/errors/Makefile.in needs to filter out source
  directory from SWIG error messages

- Lua: embedded interpreters are passed location of run-time test

- Python: copy run-time scripts to build directory because of 2to3
  conversion; import_packages example copies __init__.py from source
  directory; test-suite sets SCRIPTDIR to location of run-time tests

- Javascript: binding.gyp renamed to binding.gyp.in so that $srcdir
  can be substituted with SRCDIR; removed './' from require() statements
  so that NODE_PATH can be used to point Node.js to build directory
2014-05-11 23:21:10 +02:00
Karl Wette
7cd9063b52 Remove execute permissions from various non-executable files
- source files and Makefiles need never be executable
- scripts are run directly by their interpreters in the
  test suites, so also do not need to be executable
2014-05-02 20:06:11 +02:00
Oliver Buchtala
7a7faab765 Fix bug and regression in javascript namespace generator. 2014-04-27 00:34:49 +02:00
William S Fulton
889c8e24c7 Javascript test-suite - warning suppression not needed 2014-04-24 22:49:48 +01:00
Oliver Buchtala
1d10a62192 Fix configuration for Javascript/node ctests. 2014-04-23 02:56:53 +02:00
Oliver Buchtala
f3e3fce664 Fix configuration for ctest with Javascript/v8. 2014-04-23 02:25:07 +02:00
William S Fulton
e730b16fac Revert "Javascript node test-suite makefile fixes for parallel make"
This reverts commit f105590c0a.
2014-04-21 11:23:14 +01:00