author | never |
Wed, 07 Jul 2010 12:40:01 -0700 | |
changeset 5915 | 406168b53eb0 |
parent 2985 | f43e1241e7fb |
permissions | -rw-r--r-- |
10 | 1 |
/* |
2 |
* @test /nodynamiccopyright/ |
|
3 |
* @bug 4469737 |
|
4 |
* @summary Verify the source position for assertions. |
|
5 |
* @author gafter |
|
6 |
*/ |
|
7 |
||
2985
f43e1241e7fb
6843761: Update langtools tests to remove unncessary -source and -target options
darcy
parents:
10
diff
changeset
|
8 |
|
10 | 9 |
public class Position { |
10 |
static public void main(String[] args) { |
|
11 |
Position.class.getClassLoader().setClassAssertionStatus("U", true); |
|
12 |
new U().main(); |
|
13 |
} |
|
14 |
} |
|
2985
f43e1241e7fb
6843761: Update langtools tests to remove unncessary -source and -target options
darcy
parents:
10
diff
changeset
|
15 |
|
f43e1241e7fb
6843761: Update langtools tests to remove unncessary -source and -target options
darcy
parents:
10
diff
changeset
|
16 |
|
10 | 17 |
class U { |
18 |
void main() { |
|
19 |
try { |
|
20 |
assert false; // line 20 |
|
21 |
} catch (Throwable t) { |
|
22 |
if (t.getStackTrace()[0].getLineNumber() == 20) { |
|
23 |
return; // passed |
|
24 |
} |
|
25 |
} |
|
26 |
throw new Error("failed 4469737"); |
|
27 |
} |
|
28 |
} |