Commit graph

260 commits

Author SHA1 Message Date
William S Fulton
dcbccc6f6f Test non-default compare template argument in std::map 2018-10-09 22:43:19 +01:00
William S Fulton
b90e3ae35d C# directors override/virtual - additional testing
Add runtime test for scenario described in #1323.
Expand testing to cover a mix of override/virtual method overloading.
Remove testSwigDerivedClassHasMethod() test - not fixed yet.
2018-09-25 19:40:35 +01:00
Rokas Kupstys
e4a251f321 Add new keywords for non-verriding methods in director_basic test. 2018-09-25 19:39:53 +01:00
Rokas Kupstys
ea3140a981 Improve correctness of SwigDerivedClassHasMethod() tests
Tests first added in issue #1323
2018-09-25 19:39:02 +01:00
William S Fulton
220247c130 Test c++17 nested namespaces and %nspace 2018-05-14 21:03:31 +01:00
William S Fulton
5c39dcfb28 Add c++17 nested namespaces runtime test for C# 2018-05-14 21:03:31 +01:00
William S Fulton
368cd3b52c Add ToArray test for C# std::vector wrapper 2018-01-12 18:26:47 +00:00
William S Fulton
dafe2d6949 Add director typemaps for pointer const ref types 2017-10-24 23:47:40 +01:00
William S Fulton
46ea2ab0a6 Add director shared_ptr typemaps for C# 2017-10-17 21:55:31 +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
ed4b84f4d3 Fix overloading of shared_ptr method overloading
Add 'equivalent' attribute to typecheck typemap.
Closes #1098.
2017-09-23 15:19:34 +01:00
William S Fulton
f5e1856650 Expand std::shared_ptr testing to C# D Java Python 2017-09-22 20:03:47 +01:00
William S Fulton
19fa79830d Run some preprocessor constants tests that were previously disabled.
These probably should have been enabled with 256e283fc3
2017-09-18 07:10:49 +01:00
William S Fulton
9e2a12416c Fix type promotion wrapping some non-trivial constant expressions
This was previously an integral type instead of a floating point type:
2017-09-18 07:06:27 +01:00
William S Fulton
90ba174fce Fix generated code for constant expressions containing wchar_t L literals.
Such as:
  # define __WCHAR_MAX    (0x7fffffff + L'\0')

Reported on swig-user mailing list.
2017-09-17 19:02:55 +01:00
Olly Betts
90f9117e10 Fix various comment and documentation typos 2017-08-13 18:04:33 +12:00
William S Fulton
241460eddc director_smartptr runtime tests enhancement
Add same changes from previous commit to additional languages
2017-05-23 21:36:24 +01:00
Vadim Zeitlin
ec565f74cf Extend C# complex support to member variables of this type
Define csvar{in,out} typemaps needed to support properties of complex type and
apply the existing cstype and csin ones to them as well.

Add unit test verifying that this works as expected in C# and, also, in
Python, even though no changes were needed there.
2017-04-01 23:51:45 +02:00
Vadim Zeitlin
aa047c43f7 Add support for std::complex<> to C#
Create Lib/csharp/complex.i with simplest possible typemaps mapping
std::complex<> to System.Numerics.Complex.
2017-04-01 23:51:45 +02:00
William S Fulton
281eec7d18 Add tests for constructing C# std::vector from various container interface types 2017-02-08 20:02:40 +00:00
William S Fulton
3d2e57b0f2 Add %proxycode directive for adding code into proxy classes for C#, D and Java 2017-01-13 20:43:50 +00:00
William S Fulton
eda0779e76 C# std::array changes file addition
Fix C# warnings in test-case too.
2016-10-30 22:35:59 +00:00
William S Fulton
d48b1712a8 Merge branch 'myd7349-master'
* myd7349-master:
  Convert the Java runtime testcase cpp11_li_std_array_runme to C#
  Add C++11 std::array interface file for C#
  SWIG_STD_VECTOR_ENHANCED for std::wstring
2016-10-30 22:27:47 +00:00
William S Fulton
e9e6a99f0f Add missing VOID_INT_PTR director typemaps 2016-10-23 16:18:05 +01:00
William S Fulton
f89b8836dd Merge branch 'jiulongw-master'
* jiulongw-master:
  Fix go wrapper compilation error
  Fix missing semicolon in golang wrapper
  Fix extra quote escape in golang
  Fix #define error when value contains char in compound expression
  Add more test case for char const expression in enum
  Revert "Add enum test cases with const char in compound expression"
  Add runtime tests for char in compound expression patch
  Add enum test cases with const char in compound expression
  Fix enum error when value contains char in compound expression
2016-10-23 10:32:48 +01:00
Daniel Vollmer
2dc87d7485 Add std::bad_cast to std_except.i
This exception occurs when dynamic_cast<T&> fails.

Fixes #783.
2016-09-17 10:26:54 +02:00
Jiulong Wang
9e53432aef Add more test case for char const expression in enum 2016-09-14 22:41:02 -07:00
Jiulong Wang
b5358ffeba Add runtime tests for char in compound expression patch 2016-09-08 17:59:22 -07:00
myd7349
407b987f4c Convert the Java runtime testcase cpp11_li_std_array_runme to C# 2016-07-05 10:44:36 +08:00
William S Fulton
98a31ff633 Fix directorin SWIGTYPE typemaps to make a copy as these are used for pass by value.
Closes #434
2016-05-14 21:32:24 +01:00
William S Fulton
e1dfad1a3b Change the name of the interface in %feature to be more portable
Use SwigInterface as a suffix to the class name when naming the
interface class instead of using a simple I as a prefix.
%feature_custom can be used to use I as a prefix if so desired.
2016-03-08 08:42:16 +00:00
William S Fulton
2dec8c5514 Add limited support for %interface_impl and %shared_ptr 2016-03-06 21:20:23 +00:00
William S Fulton
5d58de60d6 interface feature test changes for the tests to pass for all languages 2016-03-03 19:45:00 +00:00
William S Fulton
fa9d2687cb Port Java interface tests to C# 2016-03-03 08:55:20 +00:00
William S Fulton
350eff3687 Director smartptr testing
- Enhance Java and C# test
- Add Ruby test
2015-09-30 07:53:19 +01:00
William S Fulton
f266a588e0 Cosmetic comment fix in testcase 2015-09-30 07:06:40 +01:00
William S Fulton
c6f8aadc64 Cosmetic corrections - Mac OS X 2015-08-02 20:14:20 +01:00
William S Fulton
2f00f6c8cc Support special variable expansion in special variable macros in typemap attributes.
Add test cases for special variable expansions and special variable
macros (aka embedded typemaps) expansion.
2015-07-22 22:04:35 +01:00
William S Fulton
3718b810c7 Don't generate constructor wrappers if a base class has a private constructor
g++-5 errors out with this now with errors such as:

default_constructor_wrap.cxx:665:27: error: use of deleted function ‘FFF::FFF()’
   result = (FFF *)new FFF();
                           ^
default_constructor_wrap.cxx:314:7: note: ‘FFF::FFF()’ is implicitly deleted because the default definition would be ill-formed:
 class FFF : public F {
       ^
default_constructor_wrap.cxx:301:4: error: ‘F::~F()’ is private
    ~F() { }
    ^
default_constructor_wrap.cxx:314:7: error: within this context
2015-07-07 20:15:55 +01:00
William S Fulton
c767b33c3f C# gc tests failure fix
Sometimes the GC just won't run the finalizers, so we output a warning
instead of throwing an error, so now the test-suite will pass but with a
warning if the number of objects is not as expected.

li_std_auto_ptr was failing during Appveyor testing

An equivalent change was put into the corresponding Java runtime tests a
while back.
2015-07-03 20:59:24 +01:00
William S Fulton
54e2317b24 Fix shared_ptr of classes with private constructors and destructors.
Usually these use a custom deleter passed to the shared_ptr.
This also fixes the "unref" feature when used on classes with private destructors.
2015-05-14 19:03:06 +01:00
William S Fulton
2347e87451 CSharp test-suite support on windows
- Add pathconvert tool to convert to a windows path for input files for
  C# compiler
- Simplify vcfilter
2015-04-04 02:17:56 +01:00
William S Fulton
7f8bb02d78 Fix regression in introduced in merge of C++11 strongly typed enums support
- Guile constants bad casts generated
- Go non-public enum value wrappers assert failure

Also cosmetic test comment correction
2014-12-07 21:31:14 +00:00
William S Fulton
80ae335319 Enhance C++11 strongly typed enums testcase 2014-11-27 19:56:08 +00:00
William S Fulton
366948079f Add C# support for wrapping C++11 strongly typed enums 2014-11-25 07:07:47 +00:00
William S Fulton
597c671e86 More diagnostics for csharp_exceptions testcase for diagnosing erratic failures 2014-05-25 12:00:42 +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
d5b765d388 Whitespace cleanup of all Makefiles*
- some of the %.clean rules in the test-suite Makefiles were using a single tab
  as an empty rule, dangerous! I've replaced these with the safer '@exit 0'.
2014-05-02 20:06:11 +02:00