From 571292260e9f365bf136a9b7865b42750db40d74 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 4 Oct 2004 20:04:22 +0000 Subject: [PATCH] minor runtime test mods git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6302 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- .../perl5/multiple_inheritance_runme.pl | 9 +++---- .../test-suite/perl5/primitive_ref_runme.pl | 24 +++++++++---------- Examples/test-suite/perl5/unions_runme.pl | 15 ++++-------- 3 files changed, 20 insertions(+), 28 deletions(-) diff --git a/Examples/test-suite/perl5/multiple_inheritance_runme.pl b/Examples/test-suite/perl5/multiple_inheritance_runme.pl index f0121085f..b639f20ae 100644 --- a/Examples/test-suite/perl5/multiple_inheritance_runme.pl +++ b/Examples/test-suite/perl5/multiple_inheritance_runme.pl @@ -3,16 +3,13 @@ use multiple_inheritance; $fooBar = new multiple_inheritance::FooBar(); if ($fooBar->foo() != 2) { - print "Runtime test1 failed\n"; - exit 1; + die "Runtime test1 failed\n"; } if ($fooBar->bar() != 1) { - print "Runtime test2 failed\n"; - exit 1; + die "Runtime test2 failed\n"; } if ($fooBar->fooBar() != 3) { - print "Runtime test3 failed\n"; - exit 1; + die "Runtime test3 failed\n"; } diff --git a/Examples/test-suite/perl5/primitive_ref_runme.pl b/Examples/test-suite/perl5/primitive_ref_runme.pl index 727b3ec6e..15990fff1 100644 --- a/Examples/test-suite/perl5/primitive_ref_runme.pl +++ b/Examples/test-suite/perl5/primitive_ref_runme.pl @@ -1,38 +1,38 @@ use primitive_ref; if (primitive_ref::ref_int(3) != 3) { - print "ref_int failed!\n"; + die "ref_int failed!\n"; } if (primitive_ref::ref_uint(3) != 3) { - print "ref_uint failed!\n"; + die "ref_uint failed!\n"; } if (primitive_ref::ref_short(3) != 3) { - print "ref_short failed!\n"; + die "ref_short failed!\n"; } if (primitive_ref::ref_ushort(3) != 3) { - print "ref_ushort failed!\n"; + die "ref_ushort failed!\n"; } if (primitive_ref::ref_long(3) != 3) { - print "ref_long failed!\n"; + die "ref_long failed!\n"; } if (primitive_ref::ref_ulong(3) != 3) { - print "ref_ulong failed!\n"; + die "ref_ulong failed!\n"; } if (primitive_ref::ref_schar(3) != 3) { - print "ref_schar failed!\n"; + die "ref_schar failed!\n"; } if (primitive_ref::ref_uchar(3) != 3) { - print "ref_uchar failed!\n"; + die "ref_uchar failed!\n"; } if (primitive_ref::ref_bool(1) != 1) { - print "ref_bool failed!\n"; + die "ref_bool failed!\n"; } if (primitive_ref::ref_float(3.5) != 3.5) { - print "ref_float failed!\n"; + die "ref_float failed!\n"; } if (primitive_ref::ref_double(3.5) != 3.5) { - print "ref_double failed!\n"; + die "ref_double failed!\n"; } if (primitive_ref::ref_char('x') != 'x') { - print "ref_char failed!\n"; + die "ref_char failed!\n"; } diff --git a/Examples/test-suite/perl5/unions_runme.pl b/Examples/test-suite/perl5/unions_runme.pl index fca499f0e..9f20ce2df 100644 --- a/Examples/test-suite/perl5/unions_runme.pl +++ b/Examples/test-suite/perl5/unions_runme.pl @@ -21,14 +21,12 @@ $eut->{number} = 1; $eut->{uni}->{small} = $small; $Jill1 = $eut->{uni}->{small}->{jill}; if ($Jill1 != 200) { - print "Runtime test1 failed. eut.uni.small.jill=" , $Jill1, "\n"; - exit 1; + die "Runtime test1 failed. eut.uni.small.jill=" , $Jill1, "\n"; } $Num1 = $eut->{number}; if ($Num1 != 1) { - print "Runtime test2 failed. eut.number=" , $Num1, "\n"; - exit 1; + die "Runtime test2 failed. eut.number=" , $Num1, "\n"; } # Secondly check the BigStruct in EmbeddedUnionTest @@ -36,19 +34,16 @@ $eut->{number} = 2; $eut->{uni}->{big} = $big; $Jack1 = $eut->{uni}->{big}->{jack}; if ($Jack1 != 300) { - print "Runtime test3 failed. eut.uni.big.jack=" , $Jack1, "\n"; - exit 1; + die "Runtime test3 failed. eut.uni.big.jack=" , $Jack1, "\n"; } $Jill2 = $eut->{uni}->{big}->{smallstruct}->{jill}; if ($Jill2 != 200) { - print "Runtime test4 failed. eut.uni.big.smallstruct.jill=" , $Jill2, "\n"; - exit 1; + die "Runtime test4 failed. eut.uni.big.smallstruct.jill=" , $Jill2, "\n"; } $Num2 = $eut->{number}; if ($Num2 != 2) { - print "Runtime test5 failed. eut.number=" , $Num2, "\n"; - exit 1; + die "Runtime test5 failed. eut.number=" , $Num2, "\n"; }