ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/LockSupportTest.java
(Generate patch)

Comparing jsr166/src/test/tck/LockSupportTest.java (file contents):
Revision 1.7 by dl, Wed Jul 12 12:59:04 2006 UTC vs.
Revision 1.8 by jsr166, Mon Nov 2 20:28:31 2009 UTC

# Line 2 | Line 2
2   * Written by Doug Lea with assistance from members of JCP JSR-166
3   * Expert Group and released to the public domain, as explained at
4   * http://creativecommons.org/licenses/publicdomain
5 < * Other contributors include Andrew Wright, Jeffrey Hayes,
6 < * Pat Fisher, Mike Judd.
5 > * Other contributors include Andrew Wright, Jeffrey Hayes,
6 > * Pat Fisher, Mike Judd.
7   */
8  
9   import junit.framework.*;
# Line 13 | Line 13 | import java.util.concurrent.locks.*;
13  
14   public class LockSupportTest extends JSR166TestCase{
15      public static void main(String[] args) {
16 <        junit.textui.TestRunner.run (suite());  
16 >        junit.textui.TestRunner.run (suite());
17      }
18      public static Test suite() {
19          return new TestSuite(LockSupportTest.class);
# Line 22 | Line 22 | public class LockSupportTest extends JSR
22      /**
23       * park is released by unpark occurring after park
24       */
25 <    public void testPark() {
25 >    public void testPark() {
26          Thread t = new Thread(new Runnable() {
27                  public void run() {
28                      try {
# Line 46 | Line 46 | public class LockSupportTest extends JSR
46      /**
47       * park is released by unpark occurring before park
48       */
49 <    public void testPark2() {
49 >    public void testPark2() {
50          Thread t = new Thread(new Runnable() {
51                  public void run() {
52                      try {
# Line 68 | Line 68 | public class LockSupportTest extends JSR
68      }
69  
70      /**
71 <     * park is released by interrupt
71 >     * park is released by interrupt
72       */
73 <    public void testPark3() {
73 >    public void testPark3() {
74          Thread t = new Thread(new Runnable() {
75                  public void run() {
76                      try {
# Line 94 | Line 94 | public class LockSupportTest extends JSR
94      /**
95       * park returns if interrupted before park
96       */
97 <    public void testPark4() {
97 >    public void testPark4() {
98          final ReentrantLock lock = new ReentrantLock();
99          lock.lock();
100          Thread t = new Thread(new Runnable() {
# Line 121 | Line 121 | public class LockSupportTest extends JSR
121      /**
122       * parkNanos times out if not unparked
123       */
124 <    public void testParkNanos() {
124 >    public void testParkNanos() {
125          Thread t = new Thread(new Runnable() {
126                  public void run() {
127                      try {
# Line 144 | Line 144 | public class LockSupportTest extends JSR
144      /**
145       * parkUntil times out if not unparked
146       */
147 <    public void testParkUntil() {
147 >    public void testParkUntil() {
148          Thread t = new Thread(new Runnable() {
149                  public void run() {
150                      try {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines