Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/Java/Openjdk/test/langtools/tools/javac/jvm/   (Sun/Oracle ©)  Datei vom 13.11.2022 mit Größe 960 B image not shown  

Quelle  T8020689.java   Sprache: JAVA

 
/*
 * @test  /nodynamiccopyright/
 * @bug 8020689
 * @summary Making sure the LineNumberTable entry is correctly generated for the leading method invocation in the else section
 * @compile T8020689.java
 * @run main T8020689
 */


public class T8020689 {

    public static void main(String... args) {
        if (args.length > 0) {
            a();
        } else {
            b();
        }
    }

    static void a() {
    }

    static void b() {
        assertLine(15);
    }

    public static void assertLine(int expectedline) {
        Exception e = new Exception("expected line#: " + expectedline);
        int myline = e.getStackTrace()[2].getLineNumber();
        if( myline != expectedline) {
            throw new RuntimeException("Incorrect line number " +
                    "expected: " + expectedline +
                    ", got: " + myline, e);
        }
        System.out.format("Got expected line number %d correct %n", myline);
    }
}

Messung V0.5
C=100 H=98 G=98

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.