Skip to content

Commit 0268dde

Browse files
committed
Extend diamond multi test to fix go
1 parent b08713f commit 0268dde

File tree

5 files changed

+30
-0
lines changed

5 files changed

+30
-0
lines changed

Examples/test-suite/multi_import.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
#ifndef MULTI_IMPORT_H
2+
#define MULTI_IMPORT_H
3+
4+
class WWW {
5+
public:
6+
void nullop() const {}
7+
};
8+
19
class XXX
210
{
311
public:
@@ -15,3 +23,5 @@ class ZZZ : public XXX
1523
public:
1624
int testz() { return 2;}
1725
};
26+
27+
#endif /* MULTI_IMPORT_H */

Examples/test-suite/multi_import_a.i

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ class ZZZ : public XXX
1414
public:
1515
int testz();
1616
};
17+
18+
%inline %{
19+
void use_www_a(const WWW& w) {w.nullop();}
20+
%}

Examples/test-suite/multi_import_b.i

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ class YYY : public XXX
1111
public:
1212
int testy();
1313
};
14+
15+
%inline %{
16+
void use_www_b(const WWW& w) {w.nullop();}
17+
%}

Examples/test-suite/multi_import_c.i

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
%import "multi_import_d.i"
22

3+
// NB: this module is only imported, never compiled, so it's not necessary to
4+
// include the header for testing purposes.
5+
36
class XXX
47
{
58
public:

Examples/test-suite/multi_import_d.i

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
%module multi_import_d
22

33
%constant int myval = 1234;
4+
5+
%{
6+
#include "multi_import.h"
7+
%}
8+
9+
class WWW {
10+
public:
11+
void nullop() const;
12+
};

0 commit comments

Comments
 (0)