Changeset 429 for trunk/icedtea-web/tests/reproducers/simple/simpletest2
- Timestamp:
- Sep 24, 2014, 9:34:21 PM (11 years ago)
- Location:
- trunk/icedtea-web/tests/reproducers/simple/simpletest2
- Files:
-
- 2 edited
-
srcs/SimpleTest2.java (modified) (2 diffs)
-
testcases/SimpleTest2Test.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/icedtea-web/tests/reproducers/simple/simpletest2/srcs/SimpleTest2.java
r418 r429 1 2 import java.applet.Applet; 3 1 4 /* SimpleTest2.java 2 5 Copyright (C) 2011 Red Hat, Inc. … … 36 39 */ 37 40 38 public class SimpleTest2 {41 public class SimpleTest2 extends Applet{ 39 42 40 public static void main(String[] args){ 41 throw new RuntimeException("Correct exception"); 43 public static void main(String[] args) { 44 throw new RuntimeException("Correct exception"); 45 } 42 46 47 @Override 48 public void init() { 49 System.out.println("applet was initialised"); 43 50 } 51 52 @Override 53 public void start() { 54 System.out.println("applet was started"); 55 main(null); 56 } 57 58 @Override 59 public void stop() { 60 System.out.println("applet was stopped"); 61 } 62 63 @Override 64 public void destroy() { 65 System.out.println("applet will be destroyed"); 66 } 67 44 68 } -
trunk/icedtea-web/tests/reproducers/simple/simpletest2/testcases/SimpleTest2Test.java
r418 r429 36 36 */ 37 37 38 import net.sourceforge.jnlp.ProcessResult; 38 39 import net.sourceforge.jnlp.ServerAccess; 40 39 41 import org.junit.Assert; 40 41 42 import org.junit.Test; 42 43 … … 48 49 @Test 49 50 public void testSimpletest2lunchException() throws Exception { 50 ServerAccess.ProcessResult pr=server.executeJavawsHeadless(null,"/simpletest2.jnlp"); 51 Assert.assertTrue("stdout should be < 1 , but was "+pr.stdout.trim().length(),pr.stdout.trim().length() < 1); 51 ProcessResult pr=server.executeJavawsHeadless(null,"/simpletest2.jnlp"); 52 52 String s="Correct exception"; 53 53 Assert.assertTrue("stderr should contains "+s+" but didn't",pr.stderr.contains(s)); … … 55 55 Assert.assertTrue("stderr should contains "+ss+" but did not",pr.stderr.contains(ss)); 56 56 Assert.assertFalse("testSimpletest2lunchException should not be terminated, but was",pr.wasTerminated); 57 //Assert.assertFalse(0==pr.returnValue);exception and still returned 0?58 57 } 59 58
Note:
See TracChangeset
for help on using the changeset viewer.
