/
githubmirror
/
panama-vector
Обзор
Документация
Войти
/
githubmirror
/
panama-vector
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/langtools/tools/javac/assert/Position.java
28 строк
590 B
Erik Joelsson
8187443: Forest Consolidation: Move files to unified layout
12 сен 2017, 20:03
12 сен 2017, 20:03
3789983
Код
Авторство
О чём код?
/* * @test /nodynamiccopyright/ * @bug 4469737 * @summary Verify the source position for assertions. * @author gafter */ public class Position { static public void main(String[] args) { Position.class.getClassLoader().setClassAssertionStatus("U", true); new U().main(); } } class U { void main() { try { assert false; // line 20 } catch (Throwable t) { if (t.getStackTrace()[0].getLineNumber() == 20) { return; // passed } } throw new Error("failed 4469737"); } }