From 3ca167ca8262034cd07051db3b98cbbc5af3b95f Mon Sep 17 00:00:00 2001 From: Vincent Couvert Date: Fri, 28 Jan 2011 14:37:32 +0000 Subject: [PATCH] Add aggregate_runme.sci test file git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@12403 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/common.mk | 2 +- Examples/test-suite/scilab/Makefile.in | 2 +- .../test-suite/scilab/aggregate_runme.sci | 21 +++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 Examples/test-suite/scilab/aggregate_runme.sci diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk index 026612db5..02548747c 100644 --- a/Examples/test-suite/common.mk +++ b/Examples/test-suite/common.mk @@ -64,7 +64,7 @@ CXXSRCS = CSRCS = TARGETPREFIX = TARGETSUFFIX = -SWIGOPT = -outcurrentdir -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE) +SWIGOPT = -debug-module 4 -outcurrentdir -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE) INCLUDES = -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE) LIBS = -L. LIBPREFIX = lib diff --git a/Examples/test-suite/scilab/Makefile.in b/Examples/test-suite/scilab/Makefile.in index 3ee3476ea..dd3b32a02 100644 --- a/Examples/test-suite/scilab/Makefile.in +++ b/Examples/test-suite/scilab/Makefile.in @@ -17,7 +17,7 @@ include $(srcdir)/../common.mk # Rules for the different types of tests %.cpptest: @$(setup) - @+$(swig_and_compile_cpp) > scilab.log + +$(swig_and_compile_cpp) > scilab.log @$(run_testcase) %.ctest: diff --git a/Examples/test-suite/scilab/aggregate_runme.sci b/Examples/test-suite/scilab/aggregate_runme.sci new file mode 100644 index 000000000..881ca7d1a --- /dev/null +++ b/Examples/test-suite/scilab/aggregate_runme.sci @@ -0,0 +1,21 @@ +exec("swigtest.start", -1); + +if UP_get()<>int32(1) then swigtesterror(); end +if typeof(UP_get())<>"int32" then swigtesterror(); end + +if DOWN_get()<>int32(2) then swigtesterror(); end +if typeof(DOWN_get())<>"int32" then swigtesterror(); end + +if LEFT_get()<>int32(3) then swigtesterror(); end +if typeof(LEFT_get())<>"int32" then swigtesterror(); end + +if RIGHT_get()<>int32(4) then swigtesterror(); end +if typeof(RIGHT_get())<>"int32" then swigtesterror(); end + +// TODO: move is a Scilab function... +//result = move(UP_get()); +//result = move(DOWN_get()); +//result = move(LEFT_get()); +//result = move(RIGHT_get()); + +exec("swigtest.quit", -1);