rename special_variable_functions testcase to special_variable_macros
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11475 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
028fcff0a5
commit
75aa67b99c
6 changed files with 26 additions and 26 deletions
|
|
@ -292,7 +292,7 @@ CPP_TEST_CASES += \
|
||||||
smart_pointer_templatevariables \
|
smart_pointer_templatevariables \
|
||||||
smart_pointer_typedef \
|
smart_pointer_typedef \
|
||||||
special_variables \
|
special_variables \
|
||||||
special_variable_functions \
|
special_variable_macros \
|
||||||
static_array_member \
|
static_array_member \
|
||||||
static_const_member \
|
static_const_member \
|
||||||
static_const_member_2 \
|
static_const_member_2 \
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
using System;
|
using System;
|
||||||
using special_variable_functionsNamespace;
|
using special_variable_macrosNamespace;
|
||||||
|
|
||||||
public class runme {
|
public class runme {
|
||||||
static void Main() {
|
static void Main() {
|
||||||
Name name = new Name();
|
Name name = new Name();
|
||||||
if (special_variable_functions.testFred(name) != "none")
|
if (special_variable_macros.testFred(name) != "none")
|
||||||
throw new Exception("test failed");
|
throw new Exception("test failed");
|
||||||
if (special_variable_functions.testJack(name) != "$specialname")
|
if (special_variable_macros.testJack(name) != "$specialname")
|
||||||
throw new Exception("test failed");
|
throw new Exception("test failed");
|
||||||
if (special_variable_functions.testJill(name) != "jilly")
|
if (special_variable_macros.testJill(name) != "jilly")
|
||||||
throw new Exception("test failed");
|
throw new Exception("test failed");
|
||||||
if (special_variable_functions.testMary(name) != "SWIGTYPE_p_NameWrap")
|
if (special_variable_macros.testMary(name) != "SWIGTYPE_p_NameWrap")
|
||||||
throw new Exception("test failed");
|
throw new Exception("test failed");
|
||||||
NewName newName = NewName.factory("factoryname");
|
NewName newName = NewName.factory("factoryname");
|
||||||
name = newName.getStoredName();
|
name = newName.getStoredName();
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
|
|
||||||
import special_variable_functions.*;
|
import special_variable_macros.*;
|
||||||
|
|
||||||
public class special_variable_functions_runme {
|
public class special_variable_macros_runme {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
System.loadLibrary("special_variable_functions");
|
System.loadLibrary("special_variable_macros");
|
||||||
} catch (UnsatisfiedLinkError e) {
|
} catch (UnsatisfiedLinkError e) {
|
||||||
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
|
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
|
|
@ -14,13 +14,13 @@ public class special_variable_functions_runme {
|
||||||
|
|
||||||
public static void main(String argv[]) {
|
public static void main(String argv[]) {
|
||||||
Name name = new Name();
|
Name name = new Name();
|
||||||
if (!special_variable_functions.testFred(name).equals("none"))
|
if (!special_variable_macros.testFred(name).equals("none"))
|
||||||
throw new RuntimeException("test failed");
|
throw new RuntimeException("test failed");
|
||||||
if (!special_variable_functions.testJack(name).equals("$specialname"))
|
if (!special_variable_macros.testJack(name).equals("$specialname"))
|
||||||
throw new RuntimeException("test failed");
|
throw new RuntimeException("test failed");
|
||||||
if (!special_variable_functions.testJill(name).equals("jilly"))
|
if (!special_variable_macros.testJill(name).equals("jilly"))
|
||||||
throw new RuntimeException("test failed");
|
throw new RuntimeException("test failed");
|
||||||
if (!special_variable_functions.testMary(name).equals("SWIGTYPE_p_NameWrap"))
|
if (!special_variable_macros.testMary(name).equals("SWIGTYPE_p_NameWrap"))
|
||||||
throw new RuntimeException("test failed");
|
throw new RuntimeException("test failed");
|
||||||
NewName newName = NewName.factory("factoryname");
|
NewName newName = NewName.factory("factoryname");
|
||||||
name = newName.getStoredName();
|
name = newName.getStoredName();
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
import special_variable_functions
|
|
||||||
|
|
||||||
name = special_variable_functions.Name()
|
|
||||||
if special_variable_functions.testFred(name) != "none":
|
|
||||||
raise "test failed"
|
|
||||||
if special_variable_functions.testJack(name) != "$specialname":
|
|
||||||
raise "test failed"
|
|
||||||
if special_variable_functions.testJill(name) != "jilly":
|
|
||||||
raise "test failed"
|
|
||||||
if special_variable_functions.testMary(name) != "SWIGTYPE_p_NameWrap":
|
|
||||||
raise "test failed"
|
|
||||||
|
|
||||||
12
Examples/test-suite/python/special_variable_macros_runme.py
Normal file
12
Examples/test-suite/python/special_variable_macros_runme.py
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
import special_variable_macros
|
||||||
|
|
||||||
|
name = special_variable_macros.Name()
|
||||||
|
if special_variable_macros.testFred(name) != "none":
|
||||||
|
raise "test failed"
|
||||||
|
if special_variable_macros.testJack(name) != "$specialname":
|
||||||
|
raise "test failed"
|
||||||
|
if special_variable_macros.testJill(name) != "jilly":
|
||||||
|
raise "test failed"
|
||||||
|
if special_variable_macros.testMary(name) != "SWIGTYPE_p_NameWrap":
|
||||||
|
raise "test failed"
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
%module special_variable_functions
|
%module special_variable_macros
|
||||||
|
|
||||||
// test $typemap() special variable function
|
// test $typemap() special variable function
|
||||||
// these tests are not typical of how $typemap() should be used, but it checks that it is mostly working
|
// these tests are not typical of how $typemap() should be used, but it checks that it is mostly working
|
||||||
Loading…
Add table
Add a link
Reference in a new issue