/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6911256 6964740 6967842 6961571
* @summary Test that the resource variable kind is appropriately set
* @author Joseph D. Darcy
* @library ../../../lib
* @build JavacTestingAbstractProcessor TestResourceVariable
* @compile -processor TestResourceVariable -proc:only TestResourceVariable.java
*/
/**
* Using the tree API, retrieve element representations of the
* resource of an ARM block and verify their kind tags are set
* appropriately.
*/
if (!roundEnv.processingOver()) {
(new ResourceVariableScanner(trees)).
}
if (resourceVariableCount != 3)
throw new RuntimeException("Bad resource variable count " +
}
return true;
}
public void close() {}
private void test1() {
try(TestResourceVariable trv = this) {}
}
private void test2() {
}
/**
* Verify that a resource variable modeled as an element behaves
* as expected under 6 and 7 specific visitors.
*/
try {
throw new RuntimeException("Expected UnknownElementException not thrown.");
} catch (UnknownElementException uee) {
; // Expected.
}
Void p) {
return e; // a non-null value
}
};
throw new RuntimeException("Null result of resource variable visitation.");
}
}
super();
}
}
}
}
}