]> git.saurik.com Git - bison.git/blobdiff - tests/java.at
c++: fix the use of destructors when variants are enabled
[bison.git] / tests / java.at
index 2b206988d411b2090992a44e1be9422a59f80d54..8a4f5af42d640ecc5cf011ab53966feacec21709 100644 (file)
@@ -1,6 +1,6 @@
 # Java tests for simple calculator.           -*- Autotest -*-
 
-# Copyright (C) 2007-2013 Free Software Foundation, Inc.
+# Copyright (C) 2007-2015 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -725,18 +725,23 @@ AT_CLEANUP
 
 AT_SETUP([Java constructor init and init_throws])
 
+m4_pushdef([AT_Witness],
+[super("Test Thread"); if (true) throw new InterruptedException();])
+
 AT_CHECK_JAVA_MINIMAL([[
 %define extends {Thread}
-%code init { super("Test Thread"); if (true) throw new InterruptedException(); }
+%code init { ]AT_Witness[ }
 %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([[grep ']AT_Witness[' YYParser.java]], 0, [ignore])
 
 AT_CHECK_JAVA_MINIMAL_W_LEXER([[
 %define extends {Thread}
-%code init { super("Test Thread"); if (true) throw new InterruptedException(); }
+%code init { ]AT_Witness[ }
 %define init_throws {InterruptedException}]], [], [[return EOF;]])
-AT_CHECK([[grep -q 'super("Test Thread"); if (true) throw new InterruptedException();' YYParser.java]])
+AT_CHECK([[grep ']AT_Witness[' YYParser.java]], 0, [ignore])
+
+m4_popdef([AT_Witness])
 
 AT_CLEANUP