Commit graph

374 commits

Author SHA1 Message Date
William S Fulton
0bf4e965a6 Test %interface_impl 2016-03-03 08:55:20 +00:00
William S Fulton
50fec04759 Support namespaces and nspace with the interface feature for Java 2016-02-26 18:17:14 +00:00
William S Fulton
31b22ff6ac Cosmetic test case changes 2016-02-26 07:35:18 +00:00
William S Fulton
67f38e8124 Add another interface test selecting just one base as an interface 2016-02-12 22:38:58 +00:00
William S Fulton
d0fb0ae801 Add overloading tests for interface feature 2016-02-12 20:22:37 +00:00
William S Fulton
212300c62b interfaces branch merge fixes 2016-02-11 20:21:25 +00:00
William S Fulton
abccc13a4a Merge branch 'interfaces' into interfaces2
* interfaces:
  Remove unnecessary interfaces for concrete classes
  cosmetic code formatting changes
  Correct interface name attributes that are internal
  interface macro changes to support templates
  Test non-virtual method in Derived classes
  interface tests for a most derived class inheriting the interfaces further up the chain
  Rename GetCPtr/getCPtr to SWIGInterfaceUpcast
  interface feature support for const ref pointers (used by the STL)
  Interface feature support for arrays
  More interface feature testing for return values
  interface feature support for passing by value
  interface feature support for references
  Multiple inheritance parameters as pointers testing
  Simplify multiple_inheritance_abstract Java runtime test
  Warning fixes
  Rename test functions in multiple_inheritance_abstract testcase
  Formatting fixes in generated code for interface feature
  Cosmetic spacing changes in test case
  interface feature typemap corrections to handle NULL pointers
  interface test added
  javadirectorin fix
  interface implementation visibility
  interface inheritance (2)
  interface inheritance (1)
  feature:interface ported to Java
  propagate non-abstract "interface" base methods (3)
  propagate non-abstract "interface" base methods (2)
  propagate non-abstract "interface" base methods (1)
  namespace support added GetCPtr now returns HandleRef "feature:interface:name" is now mandatory attribute
  interfaces (1)
  interfaces (1)

Conflicts:
	Source/Modules/csharp.cxx
	Source/Modules/java.cxx
2016-02-11 19:37:31 +00:00
William S Fulton
3931b5800c Remove unnecessary interfaces for concrete classes
Add Java test for checking expected base and interfaces are generated (to be expanded further)
In the example, E was previously implementing IA, IB, IC. Now it doesn't implement any.
C# virtual/override still to be fixed for this test case
2016-02-10 20:54:39 +00:00
William S Fulton
8c49741eb2 interface tests for a most derived class inheriting the interfaces further up the chain 2016-02-08 20:49:57 +00:00
William S Fulton
e8907132cc interface feature support for const ref pointers (used by the STL)
Also interface feature return by value fixes
2016-02-07 13:58:47 +00:00
William S Fulton
5572b5f035 More interface feature testing for return values 2016-02-06 20:15:47 +00:00
William S Fulton
a1f2d60535 interface feature support for passing by value
Also add in missing $owner for governing ownership when returning pointers and references
2016-02-06 20:15:40 +00:00
William S Fulton
3eec3e2ea5 interface feature support for references 2016-02-06 20:15:29 +00:00
William S Fulton
eb15ba1638 Multiple inheritance parameters as pointers testing 2016-02-06 16:34:33 +00:00
William S Fulton
cb65828310 Simplify multiple_inheritance_abstract Java runtime test 2016-02-06 16:34:33 +00:00
William S Fulton
7379ea7848 Rename test functions in multiple_inheritance_abstract testcase
new names are just more friendly for analysing the test
2016-02-06 16:34:33 +00:00
William S Fulton
a16a818523 Cosmetic spacing changes in test case 2016-02-05 20:20:39 +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
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
Lindley French
94f683868a Enable variable and typemap substitution in typemap kwargs, and a test that verifies this works for directorin:descriptor. 2015-07-22 11:31:21 -07: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
d325eeee84 Fix incorrect test case code 2015-07-06 19:50:22 +01:00
William S Fulton
e543299d97 Fix array overrun in li_carrays testcase 2015-07-04 20:53:49 +01:00
William S Fulton
117f6d0026 Fix C++11 type aliasing seg fault.
Closes #424
2015-06-09 07:59:22 +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
6c1630b152 Fix Java multi-argument typemaps (char *STRING, size_t LENGTH)
Now they can be applied to a wider range of types.
Closes #385.
2015-05-10 13:35:51 +01:00
Olly Betts
8fc7796643 Merge pull request #403 from LindleyF/master
Zero-initialize swig_override in the director constructor.
2015-05-07 13:26:04 +12:00
William S Fulton
428b6176df Add support for friend templates, including operator overloading.
Closes #196.
2015-05-05 06:48:25 +01:00
Lindley French
3ce7867a0a Added missing untracked files. 2015-05-04 15:27:51 -07:00
William S Fulton
21b176f07f Fix preproc_line_file test 2015-01-26 22:35:17 +00:00
William S Fulton
ee35389d22 Fix abort using template default parameters
Closes #280
2014-12-28 10:39:53 +00:00
William S Fulton
5c57a8c877 Warning suppressions in tests 2014-12-22 20:35:13 +00:00
William S Fulton
68a936a638 Add testcase for nested inner class deriving from a templated base class and defined outside of the outer class.
For languages that don't support nested class support, use flatnested.
See issue #270
2014-12-19 19:35:38 +00:00
William S Fulton
2e01533b23 Partial support for %constant and structs
Test case is slightly modified from the test case in issue #250

Use of constant objects does not seem to work in Python - the type is
SwigPyObject instead of constant_directive.Type1.
2014-12-18 07:01:08 +00:00
William S Fulton
ae555c2339 Fix templated constructors regression
Templated constructors were incorrectly ignored because SWIG thought they were
methods without a return type.
Regression introduced in swig-3.0.0
Closes #245.
2014-12-09 23:48:37 +00:00
William S Fulton
80ae335319 Enhance C++11 strongly typed enums testcase 2014-11-27 19:56:08 +00:00
William S Fulton
49761fe347 Add Java runtime testcases for C++11 strongly typed enums 2014-11-25 07:08:02 +00:00
William S Fulton
0664ecdeb7 Fix strongly typed enums for Java when using simple enum wrappers 2014-11-24 07:04:54 +00:00
William S Fulton
296d45aec5 Merge branch 'alexey-pelykh-cpp11_strongly_typed_enums__direct_inject_in_java'
* alexey-pelykh-cpp11_strongly_typed_enums__direct_inject_in_java:
  Enhance cpp11_strongly_typed_enumerations testcase and turn it on
  Simplify/improve strongly typed enum implementation for Java
  Rewrite some Java director nested class support code for strongly typed enums
  Expand director_nested_class test to test more than one level of nesting
  Add director_nested_class testcase
  Removed useless code (it does not affect output, at least on our testcases)
  Java/Fix: swig_connect_director used not-fully-qualified classname (proper)
  Java/Fix: swig_connect_director used not-fully-qualified classname
  Java: fix generation of ProxyName when JNI descriptor is requested - for inner classes '$' should be used as separator instead of '/'
  Java: fix invalid director 'self' variable type name (wasn't fully qualified)
  Clean-up test suite and fix issue with nspace, as well as keep the fix for Class::Struct::EnumClass being JNI-referenced as Struct_EnumClass
  C++11 strongly-typed enums fix for Java only (proper)
  Revert "C++11 strongly-typed enums fix for Java only"
  Additional test cases for C++11 strongly-typed enums
  C++11 strongly-typed enums fix for Java only
2014-11-21 07:34:12 +00:00
William S Fulton
92d3146a06 Expand director_nested_class test to test more than one level of nesting 2014-11-10 19:57:49 +00:00
William S Fulton
bca042a7dd Add director_nested_class testcase
Java nested director class test for fix in e7db081d5e
2014-11-07 19:50:20 +00:00
David Nadlinger
a9d7b7f40c Work around D test suite failure due to issue #254.
Object is currently a D keyword for the purposes of SWIG
(that's in fact a little too strict, but Object is the root
of the class hierarchy and some parts of the code break).
'template_typedef_typedef' is supposed to test.
2014-11-06 23:04:35 +01:00
William S Fulton
bfde148887 The kwargs feature no longer turns on compactdefaultargs for languages that don't support kwargs.
Affects all languages except Python and Ruby.

Closes #242
2014-10-21 07:34:51 +01:00
William S Fulton
8441e3eab4 Java 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.

Was notably failing on RHEL6 using OpenSUSE build testing with openjdk-1.6
2014-10-14 19:22:25 +01:00
Yuval Kashtan
093fe2a556 Add support for java.nio.Buffer
including test-suite test case and documentation
2014-07-18 15:45:16 +03:00
William S Fulton
81d023ac05 Merge branch 'wkalinin-csymbols-2' - %extend and nested structs
* wkalinin-csymbols-2:
  Add runtime test for %extend and nested union
  test fixed
  %extend symbols for nested structs get into a wrong C symbol table
2014-06-02 07:11:22 +01:00
William S Fulton
5f3ee109c8 Add runtime test for %extend and nested union 2014-06-02 07:09:35 +01:00
William S Fulton
78719759d5 Test-suite makefile fixes for Windows
Remove $(realpath ) which is no good for Windows executables running
under Cygwin's make
2014-05-28 23:44:55 +01:00
William S Fulton
243671700f Fix li_boost_intrusive_ptr for various versions of boost
Modify testcase to fix compile errors on various versions of boost.
Tested using various combinations from boost-1.33/gcc-3.4.2 to
boost-1.53/gcc-4.7.3. Originally noticed as broken on
boost-1.36/gcc-4.3.4 on SLE 11.

Add in some diagnostics when reference count is wrong... which does
still happen occasionally.
2014-05-18 23:29:06 +01:00
William S Fulton
2f25b68d10 Merge branch 'kwwette-out-of-src'
* kwwette-out-of-src:
  Configured languages display improvement
  Fix out of source clean-android-examples
  Neaten up test-suite Makefile regeneration
  Remove duplicate test target in CCache Makefile
  Add in CPPFLAGS and LDFLAGS to examples/test-suite
  Remove unnecessary make invocation when running test-suite
  gitignore to ignore build directory names
  Partially fix R out of source test-suite
  Update all languages to use SCRIPTDIR
  Slight simplification of test-suite build for new out-of-source changes
  Allow examples and test-suite to be built out of source tree
  Add "make maintainer-clean" to Travis CI build
  CCache/Makefile.in: fix to allow out of source tree check/install
  Regenerate configured Makefile if Makefile.in or config.status have changed
  Fix segmentation fault in some Javascript examples
  configure.ac: print configured languages at end of configuration
2014-05-15 23:32:10 +01:00