Ignore:
Timestamp:
Sep 24, 2014, 9:34:21 PM (11 years ago)
Author:
dmik
Message:

icedtea-web: Merge version 1.5.1 from vendor to trunk.

Location:
trunk/icedtea-web/tests/reproducers/simple/simpletest2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/icedtea-web/tests/reproducers/simple/simpletest2/srcs/SimpleTest2.java

    r418 r429  
     1
     2import java.applet.Applet;
     3
    14/* SimpleTest2.java
    25Copyright (C) 2011 Red Hat, Inc.
     
    3639 */
    3740
    38 public class SimpleTest2{
     41public class SimpleTest2 extends Applet{
    3942
    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    }
    4246
     47    @Override
     48    public void init() {
     49        System.out.println("applet was initialised");
    4350    }
     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
    4468}
  • trunk/icedtea-web/tests/reproducers/simple/simpletest2/testcases/SimpleTest2Test.java

    r418 r429  
    3636 */
    3737
     38import net.sourceforge.jnlp.ProcessResult;
    3839import net.sourceforge.jnlp.ServerAccess;
     40
    3941import org.junit.Assert;
    40 
    4142import org.junit.Test;
    4243
     
    4849    @Test
    4950    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");
    5252        String s="Correct exception";
    5353        Assert.assertTrue("stderr should contains "+s+" but didn't",pr.stderr.contains(s));
     
    5555        Assert.assertTrue("stderr should contains "+ss+" but did not",pr.stderr.contains(ss));
    5656        Assert.assertFalse("testSimpletest2lunchException should not be terminated, but was",pr.wasTerminated);
    57         //Assert.assertFalse(0==pr.returnValue);exception and still returned 0?
    5857    }
    5958
Note: See TracChangeset for help on using the changeset viewer.