mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-26 12:23:59 +08:00
SyncGlobal.java, [...]: New test case.
* libjava.lang/SyncGlobal.java, libjava.lang/SyncGlobal.out: New test case. From-SVN: r52207
This commit is contained in:
parent
9002507c70
commit
4b4248b674
@ -1,3 +1,8 @@
|
||||
2002-04-12 Loren J. Rittle <ljrittle@acm.org>
|
||||
|
||||
* libjava.lang/SyncGlobal.java, libjava.lang/SyncGlobal.out:
|
||||
New test case.
|
||||
|
||||
2002-04-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
|
||||
|
||||
* libjava.lang/PR6204.java, libjava.lang/PR6204.out: New test case.
|
||||
|
24
libjava/testsuite/libjava.lang/SyncGlobal.java
Normal file
24
libjava/testsuite/libjava.lang/SyncGlobal.java
Normal file
@ -0,0 +1,24 @@
|
||||
// Test suitability of alignment of statically-allocated Objects.
|
||||
class SyncGlobal
|
||||
{
|
||||
private static final byte[] global_1 = { 1 };
|
||||
private static final byte[] global_2 = { 2, 3 };
|
||||
private static final byte[] global_3 = { 4, 5, 6 };
|
||||
private static final byte[] global_4 = { 7, 8, 9, 10 };
|
||||
private static final byte[] global_5 = { 11, 12, 13, 14, 15 };
|
||||
private static final byte[] global_6 = { 16, 17, 18, 19, 20, 21 };
|
||||
private static final byte[] global_7 = { 22, 23, 24, 25, 26, 27, 28 };
|
||||
private static final byte[] global_8 = { 29, 30, 31, 32, 33, 34, 35, 36 };
|
||||
|
||||
public static void main (String args[])
|
||||
{
|
||||
synchronized (global_1) { System.out.println ("PASS1"); }
|
||||
synchronized (global_2) { System.out.println ("PASS2"); }
|
||||
synchronized (global_3) { System.out.println ("PASS3"); }
|
||||
synchronized (global_4) { System.out.println ("PASS4"); }
|
||||
synchronized (global_5) { System.out.println ("PASS5"); }
|
||||
synchronized (global_6) { System.out.println ("PASS6"); }
|
||||
synchronized (global_7) { System.out.println ("PASS7"); }
|
||||
synchronized (global_8) { System.out.println ("PASS8"); }
|
||||
}
|
||||
}
|
8
libjava/testsuite/libjava.lang/SyncGlobal.out
Normal file
8
libjava/testsuite/libjava.lang/SyncGlobal.out
Normal file
@ -0,0 +1,8 @@
|
||||
PASS1
|
||||
PASS2
|
||||
PASS3
|
||||
PASS4
|
||||
PASS5
|
||||
PASS6
|
||||
PASS7
|
||||
PASS8
|
Loading…
Reference in New Issue
Block a user