2 * Copyright (C) 2014, United States Government, as represented by the
3 * Administrator of the National Aeronautics and Space Administration.
6 * The Java Pathfinder core (jpf-core) platform is licensed under the
7 * Apache License, Version 2.0 (the "License"); you may not use this file except
8 * in compliance with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0.
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 package gov.nasa.jpf.test.vm.threads;
21 import gov.nasa.jpf.util.test.TestJPF;
22 import gov.nasa.jpf.vm.Verify;
24 import org.junit.Test;
27 * Tests the functionality of gov.nasa.jpf.listener.LockedStackDepth
29 * It would be very difficult to put asserts in the test. Hence, asserts are
30 * added to LockedStackDepth.
32 * Run all of the JPF tests with
33 * listener+=,gov.nasa.jpf.listener.LockedStackDepth to take advantage of the
36 public class LockedStackDepthTest extends TestJPF {
38 private static final String LISTENER = "+listener+=,.listener.LockedStackDepth";
41 public void recursiveLock() {
42 if (verifyNoPropertyViolation(LISTENER)) {
51 public void waitRetainsDepth() throws InterruptedException {
52 if (verifyNoPropertyViolation(LISTENER)) {
62 public void breadthFirstSearch() throws InterruptedException {
63 if (verifyNoPropertyViolation(LISTENER, "+search.class=gov.nasa.jpf.search.heuristic.BFSHeuristic")) {
73 public void randomHeuristicSearch() throws InterruptedException {
74 if (verifyNoPropertyViolation(LISTENER, "+search.class=gov.nasa.jpf.search.heuristic.RandomHeuristic")) {
84 public void hitSameStateThroughDifferentSearchPaths() {
85 if (verifyNoPropertyViolation(LISTENER)) {