remove perl specific modifications to the enum_thorough test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11280 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
0a1c7c91b1
commit
222b9e4710
9 changed files with 9 additions and 38 deletions
|
|
@ -402,7 +402,7 @@ public class runme {
|
|||
if ((int)enum_thorough.repeatTest(repeat.initial) != 1) throw new Exception("repeatTest 2 failed");
|
||||
if ((int)enum_thorough.repeatTest(repeat.two) != 2) throw new Exception("repeatTest 3 failed");
|
||||
if ((int)enum_thorough.repeatTest(repeat.three) != 3) throw new Exception("repeatTest 4 failed");
|
||||
if ((int)enum_thorough.repeatTest(repeat.last) != 3) throw new Exception("repeatTest 5 failed");
|
||||
if ((int)enum_thorough.repeatTest(repeat.llast) != 3) throw new Exception("repeatTest 5 failed");
|
||||
if ((int)enum_thorough.repeatTest(repeat.end) != 3) throw new Exception("repeatTest 6 failed");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@ public class runme {
|
|||
if (enum_thorough_simple.repeatTest(enum_thorough_simple.initial) != 1) throw new Exception("repeatTest 2 failed");
|
||||
if (enum_thorough_simple.repeatTest(enum_thorough_simple.two) != 2) throw new Exception("repeatTest 3 failed");
|
||||
if (enum_thorough_simple.repeatTest(enum_thorough_simple.three) != 3) throw new Exception("repeatTest 4 failed");
|
||||
if (enum_thorough_simple.repeatTest(enum_thorough_simple.last) != 3) throw new Exception("repeatTest 5 failed");
|
||||
if (enum_thorough_simple.repeatTest(enum_thorough_simple.llast) != 3) throw new Exception("repeatTest 5 failed");
|
||||
if (enum_thorough_simple.repeatTest(enum_thorough_simple.end) != 3) throw new Exception("repeatTest 6 failed");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@ public class runme {
|
|||
if (enum_thorough_typesafe.repeatTest(repeat.initial).swigValue != 1) throw new Exception("repeatTest 2 failed");
|
||||
if (enum_thorough_typesafe.repeatTest(repeat.two).swigValue != 2) throw new Exception("repeatTest 3 failed");
|
||||
if (enum_thorough_typesafe.repeatTest(repeat.three).swigValue != 3) throw new Exception("repeatTest 4 failed");
|
||||
if (enum_thorough_typesafe.repeatTest(repeat.last).swigValue != 3) throw new Exception("repeatTest 5 failed");
|
||||
if (enum_thorough_typesafe.repeatTest(repeat.llast).swigValue != 3) throw new Exception("repeatTest 5 failed");
|
||||
if (enum_thorough_typesafe.repeatTest(repeat.end).swigValue != 3) throw new Exception("repeatTest 6 failed");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -534,9 +534,6 @@ IgnoreTest::IgnoreD ignoreDTest(IgnoreTest::IgnoreD n) { return n; }
|
|||
IgnoreTest::IgnoreE ignoreETest(IgnoreTest::IgnoreE n) { return n; }
|
||||
%}
|
||||
|
||||
#warning TODO: remove SWIGPERL code - replace with portable symbols
|
||||
|
||||
#if defined(SWIGPERL)
|
||||
%inline %{
|
||||
|
||||
namespace RepeatSpace {
|
||||
|
|
@ -554,24 +551,3 @@ repeat repeatTest(repeat e) { return e; }
|
|||
|
||||
%}
|
||||
|
||||
#else
|
||||
%inline %{
|
||||
|
||||
namespace RepeatSpace {
|
||||
typedef enum
|
||||
{
|
||||
one = 1,
|
||||
initial = one,
|
||||
two,
|
||||
three,
|
||||
last = three,
|
||||
end = last
|
||||
} repeat;
|
||||
repeat repeatTest(repeat e) { return e; }
|
||||
}
|
||||
|
||||
%}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ public class enum_thorough_proper_runme {
|
|||
if (enum_thorough_proper.repeatTest(repeat.initial).swigValue() != 1) throw new RuntimeException("repeatTest 2 failed");
|
||||
if (enum_thorough_proper.repeatTest(repeat.two).swigValue() != 2) throw new RuntimeException("repeatTest 3 failed");
|
||||
if (enum_thorough_proper.repeatTest(repeat.three).swigValue() != 3) throw new RuntimeException("repeatTest 4 failed");
|
||||
if (enum_thorough_proper.repeatTest(repeat.last).swigValue() != 3) throw new RuntimeException("repeatTest 5 failed");
|
||||
if (enum_thorough_proper.repeatTest(repeat.llast).swigValue() != 3) throw new RuntimeException("repeatTest 5 failed");
|
||||
if (enum_thorough_proper.repeatTest(repeat.end).swigValue() != 3) throw new RuntimeException("repeatTest 6 failed");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ public class enum_thorough_runme {
|
|||
if (enum_thorough.repeatTest(repeat.initial).swigValue() != 1) throw new RuntimeException("repeatTest 2 failed");
|
||||
if (enum_thorough.repeatTest(repeat.two).swigValue() != 2) throw new RuntimeException("repeatTest 3 failed");
|
||||
if (enum_thorough.repeatTest(repeat.three).swigValue() != 3) throw new RuntimeException("repeatTest 4 failed");
|
||||
if (enum_thorough.repeatTest(repeat.last).swigValue() != 3) throw new RuntimeException("repeatTest 5 failed");
|
||||
if (enum_thorough.repeatTest(repeat.llast).swigValue() != 3) throw new RuntimeException("repeatTest 5 failed");
|
||||
if (enum_thorough.repeatTest(repeat.end).swigValue() != 3) throw new RuntimeException("repeatTest 6 failed");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ public class enum_thorough_simple_runme {
|
|||
if (enum_thorough_simple.repeatTest(enum_thorough_simpleConstants.initial) != 1) throw new RuntimeException("repeatTest 2 failed");
|
||||
if (enum_thorough_simple.repeatTest(enum_thorough_simpleConstants.two) != 2) throw new RuntimeException("repeatTest 3 failed");
|
||||
if (enum_thorough_simple.repeatTest(enum_thorough_simpleConstants.three) != 3) throw new RuntimeException("repeatTest 4 failed");
|
||||
if (enum_thorough_simple.repeatTest(enum_thorough_simpleConstants.last) != 3) throw new RuntimeException("repeatTest 5 failed");
|
||||
if (enum_thorough_simple.repeatTest(enum_thorough_simpleConstants.llast) != 3) throw new RuntimeException("repeatTest 5 failed");
|
||||
if (enum_thorough_simple.repeatTest(enum_thorough_simpleConstants.end) != 3) throw new RuntimeException("repeatTest 6 failed");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ public class enum_thorough_typeunsafe_runme {
|
|||
if (enum_thorough_typeunsafe.repeatTest(repeat.initial) != 1) throw new RuntimeException("repeatTest 2 failed");
|
||||
if (enum_thorough_typeunsafe.repeatTest(repeat.two) != 2) throw new RuntimeException("repeatTest 3 failed");
|
||||
if (enum_thorough_typeunsafe.repeatTest(repeat.three) != 3) throw new RuntimeException("repeatTest 4 failed");
|
||||
if (enum_thorough_typeunsafe.repeatTest(repeat.last) != 3) throw new RuntimeException("repeatTest 5 failed");
|
||||
if (enum_thorough_typeunsafe.repeatTest(repeat.llast) != 3) throw new RuntimeException("repeatTest 5 failed");
|
||||
if (enum_thorough_typeunsafe.repeatTest(repeat.end) != 3) throw new RuntimeException("repeatTest 6 failed");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# an adaptation of ../java/enum_thorough_runme.java
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 299;
|
||||
use Test::More tests => 298;
|
||||
BEGIN { use_ok('enum_thorough') }
|
||||
require_ok('enum_thorough');
|
||||
|
||||
|
|
@ -392,12 +392,7 @@ SKIP: {
|
|||
is(enum_thorough::repeatTest($enum_thorough::initial), 1, "repeatTest 2");
|
||||
is(enum_thorough::repeatTest($enum_thorough::two), 2, "repeatTest 3");
|
||||
is(enum_thorough::repeatTest($enum_thorough::three), 3, "repeatTest 4");
|
||||
{ local $TODO = "overzealous keyword guarding";
|
||||
ok(defined($enum_thorough::last), "found enum value");
|
||||
SKIP: {
|
||||
skip "enum value not in expected package", 1 unless defined $enum_thorough::last;
|
||||
is(enum_thorough::repeatTest($enum_thorough::last), 3, "repeatTest 5");
|
||||
}}
|
||||
is(enum_thorough::repeatTest($enum_thorough::llast), 3, "repeatTest 5");
|
||||
is(enum_thorough::repeatTest($enum_thorough::end), 3, "repeatTest 6");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue