Clean up example Makefiles.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/oliverb-javascript-v8@13784 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Oliver Buchtala 2012-09-08 01:04:26 +00:00
commit 0341e6b14c
14 changed files with 78 additions and 93 deletions

View file

@ -1,6 +1,7 @@
//file: runme.js
// Throw a lot of exceptions
print("Trying to catch some exceptions.");
t = new example.Test();
try{
t.unknown();
@ -9,6 +10,8 @@ try{
{
if(error == -1) {
print("t.unknown() didn't throw");
} else {
print("successfully catched throw in Test::unknown().");
}
}
@ -19,6 +22,8 @@ try{
catch(error){
if(error == -1) {
print("t.simple() did not throw");
} else {
print("successfully catched throw in Test::simple().");
}
}
@ -28,6 +33,8 @@ try{
} catch(error){
if(error == -1) {
print("t.message() did not throw");
} else {
print("successfully catched throw in Test::message().");
}
}
@ -38,6 +45,8 @@ try{
catch(error){
if(error == -1) {
print("t.hosed() did not throw");
} else {
print("successfully catched throw in Test::hosed().");
}
}
@ -48,7 +57,9 @@ for (var i=1; i<4; i++) {
}
catch(error){
if(error == -1) {
print("t.mulit(" + i + ") did not throw");
print("t.multi(" + i + ") did not throw");
} else {
print("successfully catched throw in Test::multi().");
}
}
}
}