-# --------------------------------------------- #
-# Java stype, position_class and location_class #
-# --------------------------------------------- #
+# ------------------------------------- #
+# Java constructor init and init_throws #
+# ------------------------------------- #
+
+AT_SETUP([Java constructor init and init_throws])
+
+AT_CHECK_JAVA_MINIMAL([[
+%define extends "Thread"
+%code init { super("Test Thread"); if (true) throw new InterruptedException(); }
+%define init_throws "InterruptedException"
+%lex-param {int lex_param}]])
+AT_CHECK([[grep -q 'super("Test Thread"); if (true) throw new InterruptedException();' YYParser.java]])
+
+AT_CHECK_JAVA_MINIMAL_W_LEXER([[
+%define extends "Thread"
+%code init { super("Test Thread"); if (true) throw new InterruptedException(); }
+%define init_throws "InterruptedException"]], [], [[return EOF;]])
+AT_CHECK([[grep -q 'super("Test Thread"); if (true) throw new InterruptedException();' YYParser.java]])
+
+AT_CLEANUP
+
+
+# ------------------------------------------ #
+# Java value, position, and location types. #
+# ------------------------------------------ #