}
}
public void TestContstruction()
{
UScriptRun scriptRun = null;
char[] nullChars = null, dummyChars = {'d', 'u', 'm', 'm', 'y'};
String nullString = null, dummyString = new String(dummyChars);
try {
scriptRun = new UScriptRun(nullString, 0, 100);
errln("new UScriptRun(nullString, 0, 100) did not produce an IllegalArgumentException!");
} catch (IllegalArgumentException iae) {
logln("PASS: UScriptRun failed as expected");
}
try {
scriptRun = new UScriptRun(nullString, 100, 0);
errln("new UScriptRun(nullString, 100, 0) did not produce an IllegalArgumentException!");
} catch (IllegalArgumentException iae) {
logln("PASS: UScriptRun failed as expected");
}
try {
scriptRun = new UScriptRun(nullString, 0, -100);
errln("new UScriptRun(nullString, 0, -100) did not produce an IllegalArgumentException!");
} catch (IllegalArgumentException iae) {
logln("PASS: UScriptRun failed as expected");
}
try {
scriptRun = new UScriptRun(nullString, -100, 0);
errln("new UScriptRun(nullString, -100, 0) did not produce an IllegalArgumentException!");
} catch (IllegalArgumentException iae) {
logln("PASS: UScriptRun failed as expected");
}
try {
scriptRun = new UScriptRun(nullChars, 0, 100);
errln("new UScriptRun(nullChars, 0, 100) did not produce an IllegalArgumentException!");
} catch (IllegalArgumentException iae) {
logln("PASS: UScriptRun failed as expected");
}
try {
scriptRun = new UScriptRun(nullChars, 100, 0);
errln("new UScriptRun(nullChars, 100, 0) did not produce an IllegalArgumentException!");
} catch (IllegalArgumentException iae) {
logln("PASS: UScriptRun failed as expected");
}
try {
scriptRun = new UScriptRun(nullChars, 0, -100);
errln("new UScriptRun(nullChars, 0, -100) did not produce an IllegalArgumentException!");
} catch (IllegalArgumentException iae) {
logln("PASS: UScriptRun failed as expected");
}
try {
scriptRun = new UScriptRun(nullChars, -100, 0);
errln("new UScriptRun(nullChars, -100, 0) did not produce an IllegalArgumentException!");
} catch (IllegalArgumentException iae) {
logln("PASS: UScriptRun failed as expected");
}
try {
scriptRun = new UScriptRun(dummyString, 0, 6);
errln("new UScriptRun(dummyString, 0, 6) did not produce an IllegalArgumentException!");
} catch (IllegalArgumentException iae) {
logln("PASS: UScriptRun failed as expected");
}
try {
scriptRun = new UScriptRun(dummyString, 6, 0);
errln("new UScriptRun(dummy, 6, 0) did not produce an IllegalArgumentException!");
}catch (IllegalArgumentException iae) {
logln("PASS: UScriptRun failed as expected");
}
try {
scriptRun = new UScriptRun(dummyString, 0, -100);
errln("new UScriptRun(dummyString, 0, -100) did not produce an IllegalArgumentException!");
} catch (IllegalArgumentException iae) {
logln("PASS: UScriptRun failed as expected");
}
try {
scriptRun = new UScriptRun(dummyString, -100, 0);
errln("new UScriptRun(dummy, -100, 0) did not produce an IllegalArgumentException!");
} catch (IllegalArgumentException iae) {
logln("PASS: UScriptRun failed as expected");
}
try {
scriptRun = new UScriptRun(dummyChars, 0, 6);
errln("new UScriptRun(dummyChars, 0, 6) did not produce an IllegalArgumentException!");
} catch (IllegalArgumentException iae) {
logln("PASS: UScriptRun failed as expected");
}
try {
scriptRun = new UScriptRun(dummyChars, 6, 0);
errln("new UScriptRun(dummyChars, 6, 0) did not produce an IllegalArgumentException!");
}catch (IllegalArgumentException iae) {
logln("PASS: UScriptRun failed as expected");
}
try {
scriptRun = new UScriptRun(dummyChars, 0, -100);
errln("new UScriptRun(dummyChars, 0, -100) did not produce an IllegalArgumentException!");
} catch (IllegalArgumentException iae) {
logln("PASS: UScriptRun failed as expected");
}
try {
scriptRun = new UScriptRun(dummyChars, -100, 0);
errln("new UScriptRun(dummy, -100, 0) did not produce an IllegalArgumentException!");
} catch (IllegalArgumentException iae) {
logln("PASS: UScriptRun failed as expected");
}
if(scriptRun!=null){