test/langtools/jdk/jshell/ClassesTest.java
changeset 50735 2f2af62dfac7
parent 48208 0a8db756a7e7
child 55397 5eeee2cc94f5
equal deleted inserted replaced
50734:0828a0f6676b 50735:2f2af62dfac7
     1 /*
     1 /*
     2  * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug 8145239 8129559 8080354 8189248
    26  * @bug 8145239 8129559 8080354 8189248 8010319
    27  * @summary Tests for EvaluationState.classes
    27  * @summary Tests for EvaluationState.classes
    28  * @build KullaTesting TestingInputStream ExpectedDiagnostic
    28  * @build KullaTesting TestingInputStream ExpectedDiagnostic
    29  * @run testng ClassesTest
    29  * @run testng ClassesTest
    30  */
    30  */
    31 
    31 
   306     }
   306     }
   307 
   307 
   308     public void testInnerClassesCrash() {
   308     public void testInnerClassesCrash() {
   309         Snippet a = classKey(assertEval("class A { class B extends A {} }"));
   309         Snippet a = classKey(assertEval("class A { class B extends A {} }"));
   310         Snippet a2 = classKey(assertEval("class A { interface I1 extends I2 {} interface I2 {} }",
   310         Snippet a2 = classKey(assertEval("class A { interface I1 extends I2 {} interface I2 {} }",
   311                 ste(MAIN_SNIPPET, VALID, VALID, false, null),
   311                 ste(MAIN_SNIPPET, VALID, VALID, true, null),
   312                 ste(a, VALID, OVERWRITTEN, false, MAIN_SNIPPET)));
   312                 ste(a, VALID, OVERWRITTEN, false, MAIN_SNIPPET)));
   313         assertEval("class A { A a = new A() {}; }",
   313         assertEval("class A { A a = new A() {}; }",
   314                 ste(MAIN_SNIPPET, VALID, VALID, true, null),
   314                 ste(MAIN_SNIPPET, VALID, VALID, true, null),
   315                 ste(a2, VALID, OVERWRITTEN, false, MAIN_SNIPPET));
   315                 ste(a2, VALID, OVERWRITTEN, false, MAIN_SNIPPET));
   316     }
   316     }