Testing Java is easy, if you play your cards right.
jls section | directory |
3.2 | tests/jls/lexical-structure/lexical-translations |
3.3 | tests/jls/lexical-structure/unicode-escapes |
3.4 | tests/jls/lexical-structure/line-terminators |
3.5 | tests/jls/lexical-structure/input-elements-and-tokens |
3.6 | tests/jls/lexical-structure/white-space |
3.7 | tests/jls/lexical-structure/comments |
3.8 | tests/jls/lexical-structure/identifiers |
3.9 | tests/jls/lexical-structure/keywords |
3.10.1 | tests/jls/lexical-structure/literals/integer-literals |
3.10.2 | tests/jls/lexical-structure/literals/floating-point-literals |
3.10.4 | tests/jls/lexical-structure/literals/character-literals |
3.10.5 | tests/jls/lexical-structure/literals/string-literals |
3.10.7 | tests/jls/lexical-structure/literals/escape-sequences |
4.5.4 | tests/jls/types-values-and-variables/variables/final-variables |
5.1.1 | tests/jls/conversions-and-promotions/kinds-of-conversion/identity-conversions |
5.1.2 | tests/jls/conversions-and-promotions/kinds-of-conversion/widening-primitive-conversions |
5.1.3 | tests/jls/conversions-and-promotions/kinds-of-conversion/narrowing-primitive-conversions |
5.2 | tests/jls/conversions-and-promotions/assignment-conversion |
6.3 | tests/jls/names/scope-of-a-declaration |
6.4.2 | tests/jls/names/members-and-inheritance/members-of-a-class-type |
6.4.3 | tests/jls/names/members-and-inheritance/members-of-an-interface-type |
6.4.4 | tests/jls/names/members-and-inheritance/members-of-an-array-type |
6.6.1 | tests/jls/names/access-control/determining-accessibility |
7.3 | tests/jls/packages/compilation-units |
7.4.1 | tests/jls/packages/package-declarations/named-packages |
7.4.2 | tests/jls/packages/package-declarations/unnamed-packages |
7.5.1 | tests/jls/packages/import-declarations/single-type-import-declaration |
7.5.2 | tests/jls/packages/import-declarations/type-import-on-demand-declaration |
7.6 | tests/jls/packages/top-level-type-declarations |
8.1.1 | tests/jls/classes/class-declaration/class-modifiers |
8.1.1.1 | tests/jls/classes/class-declaration/class-modifiers/abstract-classes |
8.1.1.2 | tests/jls/classes/class-declaration/class-modifiers/final-classes |
8.1.3 | tests/jls/classes/class-declaration/superclasses-and-subclasses |
8.2 | tests/jls/classes/class-members |
8.4.5 | tests/jls/classes/method-declarations/method-body |
8.5.1 | tests/jls/classes/member-type-declarations/access-modifiers |
8.5.2 | tests/jls/classes/member-type-declarations/static-member-type-declarations |
8.8 | tests/jls/classes/constructor-declarations |
8.8.1 | tests/jls/classes/constructor-declarations/formal-parameters |
8.8.2 | tests/jls/classes/constructor-declarations/constructor-signature |
8.8.3 | tests/jls/classes/constructor-declarations/constructor-modifiers |
8.8.5 | tests/jls/classes/constructor-declarations/constructor-body |
8.8.5.1 | tests/jls/classes/constructor-declarations/constructor-body/explicit-constructor-invocations |
8.8.6 | tests/jls/classes/constructor-declarations/constructor-overloading |
8.8.7 | tests/jls/classes/constructor-declarations/default-constructor |
9.1.1 | tests/jls/interfaces/interface-declarations/interface-modifiers |
9.1.1.1 | tests/jls/interfaces/interface-declarations/interface-modifiers/abstract-interfaces |
10.6 | tests/jls/arrays/array-initializers |
14.7 | tests/jls/blocks-and-statements/labeled-statements |
14.10 | tests/jls/blocks-and-statements/switch-statement |
14.14 | tests/jls/blocks-and-statements/break-statement |
14.15 | tests/jls/blocks-and-statements/continue-statement |
14.20 | tests/jls/blocks-and-statements/unreachable-statements |
15.9 | tests/jls/expressions/class-instance-creation |
15.9.1 | tests/jls/expressions/class-instance-creation/determining-the-class |
15.10 | tests/jls/expressions/array-creation-expressions |
15.12.2.1 | tests/jls/expressions/method-invocation-expressions/determine-method-signature/applicable-and-accessible |
15.14.1 | tests/jls/expressions/postfix-expressions/postfix-increment-operator |
15.14.2 | tests/jls/expressions/postfix-expressions/postfix-decrement-operator |
15.15 | tests/jls/expressions/unary-operators |
15.15.1 | tests/jls/expressions/unary-operators/prefix-increment-operator |
15.15.2 | tests/jls/expressions/unary-operators/prefix-decrement-operator |
15.15.3 | tests/jls/expressions/unary-operators/unary-plus-operator |
15.15.4 | tests/jls/expressions/unary-operators/unary-minus-operator |
15.15.5 | tests/jls/expressions/unary-operators/bitwise-complement-operator |
15.15.6 | tests/jls/expressions/unary-operators/logical-complement-operator |
15.17 | tests/jls/expressions/multiplicative-operators |
15.17.1 | tests/jls/expressions/multiplicative-operators/multiplication-operator |
15.17.2 | tests/jls/expressions/multiplicative-operators/division-operator |
15.17.3 | tests/jls/expressions/multiplicative-operators/remainder-operator |
15.18 | tests/jls/expressions/additive-operators |
15.18.1 | tests/jls/expressions/additive-operators/string-concatenation-operator |
15.18.2 | tests/jls/expressions/additive-operators/numeric-types |
15.26.2 | tests/jls/expressions/assignment-operators/compound-assignment-operators |
15.28 | tests/jls/expressions/constant-expression |
16.2.7 | tests/jls/definite-assignment/statements/if-statements |
16.2.8 | tests/jls/definite-assignment/statements/switch-statements |
runtime section | directory |
3.10.5 | tests/runtime/jls/lexical-structure/literals/string-literals |
8.8.7 | tests/runtime/jls/classes/constructor-declarations/default-constructor |
12.5 | tests/runtime/jls/execution/creation-of-new-class-instances |
14 | tests/runtime/jls/blocks-and-statements |
14.10 | tests/runtime/jls/blocks-and-statements/switch-statement |
14.19.2 | tests/runtime/jls/blocks-and-statements/try-statement/try-catch-finally |
15.9 | tests/runtime/jls/expressions/class-instance-creation |
15.12.3 | tests/runtime/jls/expressions/method-invocation-expressions/chosen-method-appropriate |
15.14 | tests/runtime/jls/expressions/postfix-expressions |
15.15 | tests/runtime/jls/expressions/unary-operators |
15.18.1.1 | tests/runtime/jls/expressions/additive-operators/string-conversion |
15.26.2 | tests/runtime/jls/expressions/assignment-operators/compound-assignment-operators |
non-jls section | directory |
argument-expansion | tests/non-jls/argument-expansion |
encoding | tests/non-jls/encoding |
random-crashers | tests/non-jls/random-crashers |
gcj section | directory |
gcj | tests/gcj |
jikes section | directory |
7.5.2 | tests/jikes/jls/packages/import-declarations/type-import-on-demand-declaration |
8.4.5 | tests/jikes/jls/classes/method-declarations/method-body |
8.8.5.1 | tests/jikes/jls/classes/constructor-declarations/constructor-body/explicit-constructor-invocations |
jikes | tests/jikes |
tests/jls/lexical-structure/lexical-translations
The parser must consume the largest token, even if another interpretation is validTest Case: 3.2-invalid-2Expected Result: FAIL
Regression Test:
tcltest::test 3.2-invalid-1 { The parser must consume the largest token, even if another interpretation is valid } { empty_class T32i1 { int foo(int a, int b) { return a--b; } } } {FAIL}
ensure that unicode escapes are processed before tokenization is doneTest Case: 3.2-invalid-3Expected Result: FAIL
Regression Test:
tcltest::test 3.2-invalid-2 { ensure that unicode escapes are processed before tokenization is done } { empty_class T32i2 { int foo(int a, int b) { return \u0061\u002d\u002d\u0062; } } } {FAIL}
The parser must consume the largest token, even if another interpretation is validTest Case: 3.2-invalid-4Expected Result: FAIL
Regression Test:
tcltest::test 3.2-invalid-3 { The parser must consume the largest token, even if another interpretation is valid } { compile [saveas T32i3.java {classT32i3 {}}] } {FAIL}
The parser must consume the largest token, even if another interpretation is validTest Case: 3.2-invalid-5Expected Result: FAIL
Regression Test:
tcltest::test 3.2-invalid-4 { The parser must consume the largest token, even if another interpretation is valid } { empty_main T32i4 { int i = 1/// comment starts at first /, not second 1; } } {FAIL}
Comments, as tokens, separate other tokensTest Case: 3.2-invalid-6Expected Result: FAIL
Regression Test:
tcltest::test 3.2-invalid-5 { Comments, as tokens, separate other tokens } { empty_main T32i5 { int i = 1/**/0; } } {FAIL}
Comments, as tokens, separate other tokensTest Case: 3.2-invalid-7Expected Result: FAIL
Regression Test:
tcltest::test 3.2-invalid-6 { Comments, as tokens, separate other tokens } { empty_main T32i6 { i/**/nt i = 10; } } {FAIL}
Comments, as tokens, separate other tokensTest Case: 3.2-valid-1Expected Result: FAIL
Regression Test:
tcltest::test 3.2-invalid-7 { Comments, as tokens, separate other tokens } { empty_main T32i7 { int i = 0; i +/**/= 10; } } {FAIL}
Compiler should recognize difference in tokensTest Case: 3.2-valid-2Expected Result: PASS
Regression Test:
tcltest::test 3.2-valid-1 { Compiler should recognize difference in tokens } { empty_main T32v1 { boolean b1=""+1instanceof String; boolean b2=""+1Linstanceof String; boolean b3=""+1Dinstanceof String; boolean b4=""+1Finstanceof String; boolean b5=""+0x1instanceof String; boolean b6=""+0xAinstanceof String; boolean b7=""+'1'instanceof String; boolean b8=""+1.instanceof String; boolean b9=""+.1instanceof String; } } {PASS}
The parser must consume the largest token, even if another interpretation is validExpected Result: PASS
Regression Test:
tcltest::test 3.2-valid-2 { The parser must consume the largest token, even if another interpretation is valid } { empty_main T32v2 { int i = 1/* only one comment, last / performs division *//1; } } {PASS}
tests/jls/lexical-structure/unicode-escapes
A unicode sequence must have four hex digitsTest Case: 3.3-invalid-2Expected Result: FAIL
Regression Test:
tcltest::test 3.3-invalid-1 { A unicode sequence must have four hex digits } { compile [saveas T33i1.java {class T33i1 { char c = '\u20'; }}] } {FAIL}
A unicode sequence does not recursively form more unicode sequencesTest Case: 3.3-invalid-3Expected Result: FAIL
Regression Test:
tcltest::test 3.3-invalid-2 { A unicode sequence does not recursively form more unicode sequences } { compile [saveas T33i2.java { class T33i2 { String s = "\u005cu005a"; // this sequence is not 'z' } }] } {FAIL}
An even number of \ never form a unicode escapeTest Case: 3.3-valid-1Expected Result: FAIL
Regression Test:
tcltest::test 3.3-invalid-3 { An even number of \ never form a unicode escape } { compile [saveas T33i3.java {class T33i3 {}/* \\u002a/}] } {FAIL}
Multiple u's are allowed in unicode escapesTest Case: 3.3-valid-2Expected Result: PASS
Regression Test:
tcltest::test 3.3-valid-1 { Multiple u's are allowed in unicode escapes } { compile [saveas T33v1.java {class T33v1 { char c = '\uuuuuuuuuuabcd'; }}] } {PASS}
Unicode sequences are case insensitiveTest Case: 3.3-valid-3Expected Result: PASS
Regression Test:
tcltest::test 3.3-valid-2 { Unicode sequences are case insensitive } { compile [saveas T33v2.java { class T33v2 { void foo(int i) { switch (i) { case 0: case (('\uABcD' == '\uabCd') ? 1 : 0): } } } }] } {PASS}
Check that \u replacement matches single quoted charTest Case: 3.3-valid-4Expected Result: PASS
Regression Test:
tcltest::test 3.3-valid-3 { Check that \u replacement matches single quoted char } { compile [saveas T33v3.java { class T33v3 { void foo(int i) { switch (i) { case 0: case (('\u0061' == 'a') ? 1 : 0): } } } }] } {PASS}
Check \u replacements in the ASCII rangeExpected Result: PASS
Regression Test:
tcltest::test 3.3-valid-4 { Check \u replacements in the ASCII range } { set class " class T33v4 \{ void foo(int i) \{ switch (i) \{ case 0: " set total_cases 0 # Avoid 10 (\n), 13 (\r), 39 ('), and 92 (\) foreach {low high} {0 9 11 12 14 38 40 91 93 127} { for {set i $low} {$i <= $high} {incr i} { incr total_cases append class [format "%scase ((%d == '\\u%04x') ? %d : 0): // '%c'\n" " " $i $i $total_cases $i] } } append class " \}\n \}\n\}\n" compile [saveas T33v4.java $class] } {PASS}
tests/jls/lexical-structure/line-terminators
CR (\r) is a LineTerminatorTest Case: 3.4-2Expected Result: PASS
Regression Test:
tcltest::test 3.4-1 { CR (\r) is a LineTerminator } { set S \r compile [saveas T341.java "class T341 {$S // $S}"] } {PASS}
CR (\r) is a LineTerminatorTest Case: 3.4-3Expected Result: PASS
Regression Test:
tcltest::test 3.4-2 { CR (\r) is a LineTerminator } { set S \r compile [saveas T342.java "class T342 { // $S}"] } {PASS}
LF (\n) is a LineTerminatorTest Case: 3.4-4Expected Result: PASS
Regression Test:
tcltest::test 3.4-3 { LF (\n) is a LineTerminator } { set S \n compile [saveas T343.java "class T343 {$S // $S}"] } {PASS}
LF (\n) is a LineTerminatorTest Case: 3.4-5Expected Result: PASS
Regression Test:
tcltest::test 3.4-4 { LF (\n) is a LineTerminator } { set S \n compile [saveas T344.java "class T344 { // $S}"] } {PASS}
CR + LF (\r\n) is a LineTerminatorTest Case: 3.4-6Expected Result: PASS
Regression Test:
tcltest::test 3.4-5 { CR + LF (\r\n) is a LineTerminator } { set S \r\n compile [saveas T345.java "class T345 {$S // $S}"] } {PASS}
CR + LF (\r\n) is a LineTerminatorTest Case: 3.4-7Expected Result: PASS
Regression Test:
tcltest::test 3.4-6 { CR + LF (\r\n) is a LineTerminator } { set S \r\n compile [saveas T346.java "class T346 { // $S}"] } {PASS}
CR (\u000d) is a LineTerminatorTest Case: 3.4-8Expected Result: PASS
Regression Test:
tcltest::test 3.4-7 { CR (\u000d) is a LineTerminator } { set S \\u000d compile [saveas T347.java "class T347 {$S // $S}"] } {PASS}
CR (\u000d) is a LineTerminatorTest Case: 3.4-9Expected Result: PASS
Regression Test:
tcltest::test 3.4-8 { CR (\u000d) is a LineTerminator } { set S \\u000d compile [saveas T348.java "class T348 { // $S}"] } {PASS}
LF (\u000a) is a LineTerminatorTest Case: 3.4-10Expected Result: PASS
Regression Test:
tcltest::test 3.4-9 { LF (\u000a) is a LineTerminator } { set S \\u000a compile [saveas T349.java "class T349 {$S // $S}"] } {PASS}
LF (\u000a) is a LineTerminatorTest Case: 3.4-11Expected Result: PASS
Regression Test:
tcltest::test 3.4-10 { LF (\u000a) is a LineTerminator } { set S \\u000a compile [saveas T3410.java "class T3410 { // $S}"] } {PASS}
CR + LF (\u000d\u000a) is a LineTerminatorTest Case: 3.4-12Expected Result: PASS
Regression Test:
tcltest::test 3.4-11 { CR + LF (\u000d\u000a) is a LineTerminator } { set S \\u000d\\u000a compile [saveas T3411.java "class T3411 {$S // $S}"] } {PASS}
CR + LF (\u000d\u000a) is a LineTerminatorTest Case: 3.4-13Expected Result: PASS
Regression Test:
tcltest::test 3.4-12 { CR + LF (\u000d\u000a) is a LineTerminator } { set S \\u000d\\u000a compile [saveas T3412.java "class T3412 { // $S}"] } {PASS}
CR + CR (\u000d\u000d) is two LineTerminatorsTest Case: 3.4-14Expected Result: PASS
Regression Test:
tcltest::test 3.4-13 { CR + CR (\u000d\u000d) is two LineTerminators } { set S \\u000d\\u000d compile [saveas T3413.java "class T3413 {$S // $S}"] } {PASS}
CR + CR (\u000d\u000d) is two LineTerminatorsTest Case: 3.4-15Expected Result: PASS
Regression Test:
tcltest::test 3.4-14 { CR + CR (\u000d\u000d) is two LineTerminators } { set S \\u000d\\u000d compile [saveas T3414.java "class T3414 { // $S}"] } {PASS}
LF + LF (\u000a\u000a) is two LineTerminatorsTest Case: 3.4-16Expected Result: PASS
Regression Test:
tcltest::test 3.4-15 { LF + LF (\u000a\u000a) is two LineTerminators } { set S \\u000a\\u000a compile [saveas T3415.java "class T3415 {$S // $S}"] } {PASS}
LF + LF (\u000a\u000a) is two LineTerminatorsTest Case: 3.4-17Expected Result: PASS
Regression Test:
tcltest::test 3.4-16 { LF + LF (\u000a\u000a) is two LineTerminators } { set S \\u000a\\u000a compile [saveas T3416.java "class T3416 { // $S}"] } {PASS}
CR + CR (\u000d\r) is two LineTerminatorsTest Case: 3.4-18Expected Result: PASS
Regression Test:
tcltest::test 3.4-17 { CR + CR (\u000d\r) is two LineTerminators } { set S \\u000d\r compile [saveas T3417.java "${S}class T3417 {}"] } {PASS}
LF + LF (\u000a\n) is two LineTerminatorsTest Case: 3.4-19Expected Result: PASS
Regression Test:
tcltest::test 3.4-18 { LF + LF (\u000a\n) is two LineTerminators } { set S \\u000a\n compile [saveas T3418.java "${S}class T3418 {}"] } {PASS}
CR + LF (\u000d\n) is one LineTerminatorTest Case: 3.4-20Expected Result: PASS
Regression Test:
tcltest::test 3.4-19 { CR + LF (\u000d\n) is one LineTerminator } { set S \\u000d\n compile [saveas T3419.java "${S}class T3419 {}"] } {PASS}
LF + CR (\u000a\r) is two LineTerminatorsTest Case: 3.4-21Expected Result: PASS
Regression Test:
tcltest::test 3.4-20 { LF + CR (\u000a\r) is two LineTerminators } { set S \\u000a\r compile [saveas T3420.java "${S}class T3420 {}"] } {PASS}
LF + CR + LF (\u000a\r\u000a) is two LineTerminatorsTest Case: 3.4-22Expected Result: PASS
Regression Test:
tcltest::test 3.4-21 { LF + CR + LF (\u000a\r\u000a) is two LineTerminators } { set S \\u000a\r\u000a compile [saveas T3421.java "${S}class T3421 {}"] } {PASS}
CR + LF + LF (\u000d\u000a\n) is two LineTerminatorsTest Case: 3.4-23Expected Result: PASS
Regression Test:
tcltest::test 3.4-22 { CR + LF + LF (\u000d\u000a\n) is two LineTerminators } { set S \\u000d\\u000a\n compile [saveas T3422.java "${S}class T3422 {}"] } {PASS}
CR + CR + LF + LF (\u000d\u000d\u000a\n) is three LineTerminatorsTest Case: 3.4-24Expected Result: PASS
Regression Test:
tcltest::test 3.4-23 { CR + CR + LF + LF (\u000d\u000d\u000a\n) is three LineTerminators } { set S \\u000d\\u000d\\u000a\n compile [saveas T3423.java "${S}class T3423 {}"] } {PASS}
CR + CR + CR + LF (\u000d\u000d\u000d\n) is three LineTerminatorsTest Case: 3.4-25Expected Result: PASS
Regression Test:
tcltest::test 3.4-24 { CR + CR + CR + LF (\u000d\u000d\u000d\n) is three LineTerminators } { set S \\u000d\\u000d\\u000d\n compile [saveas T3424.java "${S}class T3424 {}"] } {PASS}
LF (\uu000a) is a LineTerminatorTest Case: 3.4-26Expected Result: PASS
Regression Test:
tcltest::test 3.4-25 { LF (\uu000a) is a LineTerminator } { set S \\uu000a compile [saveas T3425.java "${S}class T3425 {}"] } {PASS}
LF (\uu000a) is a LineTerminatorTest Case: 3.4-27Expected Result: PASS
Regression Test:
tcltest::test 3.4-26 { LF (\uu000a) is a LineTerminator } { set S \\uu000a compile [saveas T3426.java "class T3426 { // ${S}}"] } {PASS}
CR + LF (\uu000d\n) is a LineTerminatorTest Case: 3.4-28Expected Result: PASS
Regression Test:
tcltest::test 3.4-27 { CR + LF (\uu000d\n) is a LineTerminator } { set S \\uu000d\n compile [saveas T3427.java "${S}class T3427 {}"] } {PASS}
CR + CR + LF + LF (\u000d\u000d\uu000a\n) is three LineTerminatorsExpected Result: PASS
Regression Test:
tcltest::test 3.4-28 { CR + CR + LF + LF (\u000d\u000d\uu000a\n) is three LineTerminators } { set S \\u000d\\u000d\\uu000a\n compile [saveas T3428.java "${S}class T3428 {}"] } {PASS}
tests/jls/lexical-structure/input-elements-and-tokens
The input sequence CRCR (0x0d0d) should be treated as two line terminators with an empty collection of input elements between them.Test Case: 3.5-2Expected Result: PASS
Regression Test:
tcltest::test 3.5-1 { The input sequence CRCR (0x0d0d) should be treated as two line terminators with an empty collection of input elements between them.} { set S \r\r compile [saveas T351.java "class T351 {$S$S}"] } {PASS}
The input sequence LFLF (0x0a0a) should be treated as two line terminators with an empty collection of input elements between them.Test Case: 3.5-3Expected Result: PASS
Regression Test:
tcltest::test 3.5-2 { The input sequence LFLF (0x0a0a) should be treated as two line terminators with an empty collection of input elements between them.} { set S \n\n compile [saveas T352.java "class T352 {$S$S}"] } {PASS}
The input sequence LFCR (0x0a0d) should be treated as two line terminators with an empty collection of input elements between them.Test Case: 3.5-4Expected Result: PASS
Regression Test:
tcltest::test 3.5-3 { The input sequence LFCR (0x0a0d) should be treated as two line terminators with an empty collection of input elements between them.} { set S \n\r compile [saveas T353.java "class T353 {$S$S}"] } {PASS}
The input sequence CRLFCRLF (0x0d0a0d0a) should be treated as two line terminators with an empty collection of input elements between them.Test Case: 3.5-5Expected Result: PASS
Regression Test:
tcltest::test 3.5-4 { The input sequence CRLFCRLF (0x0d0a0d0a) should be treated as two line terminators with an empty collection of input elements between them.} { set S \r\n\r\n compile [saveas T354.java "class T354 {$S$S}"] } {PASS}
The input sequence CRCRLF (0x0d0d0a) should be treated as two line terminators with an empty collection of input elements between them.Test Case: 3.5-6Expected Result: PASS
Regression Test:
tcltest::test 3.5-5 { The input sequence CRCRLF (0x0d0d0a) should be treated as two line terminators with an empty collection of input elements between them.} { set S \r\r\n compile [saveas T355.java "class T355 {$S$S}"] } {PASS}
The input sequence LFCRLF (0x0a0d0a) should be treated as two line terminators with an empty collection of input elements between them.Test Case: 3.5-7Expected Result: PASS
Regression Test:
tcltest::test 3.5-6 { The input sequence LFCRLF (0x0a0d0a) should be treated as two line terminators with an empty collection of input elements between them.} { set S \n\r\n compile [saveas T356.java "class T356 {$S$S}"] } {PASS}
The input sequence CRLFCR (0x0d0a0d) should be treated as two line terminators with an empty collection of input elements between them.Test Case: 3.5-8Expected Result: PASS
Regression Test:
tcltest::test 3.5-7 { The input sequence CRLFCR (0x0d0a0d) should be treated as two line terminators with an empty collection of input elements between them.} { set S \r\n\r compile [saveas T357.java "class T357 {$S$S}"] } {PASS}
The input sequence CRLFLF (0x0d0a0a) should be treated as two line terminators with an empty collection of input elements between them.Test Case: 3.5-9Expected Result: PASS
Regression Test:
tcltest::test 3.5-8 { The input sequence CRLFLF (0x0d0a0a) should be treated as two line terminators with an empty collection of input elements between them.} { set S \r\n\n compile [saveas T358.java "class T358 {$S$S}"] } {PASS}
The ASCII SUB character (0x1a) should be ignored if it is the last character in the escaped stream.Test Case: 3.5-10Expected Result: PASS
Regression Test:
tcltest::test 3.5-9 { The ASCII SUB character (0x1a) should be ignored if it is the last character in the escaped stream. } { set S \x1a compile [saveas T359.java "class T359 { }$S"] } {PASS}
The ASCII SUB character (0x1a) should be ignored if it is the last character in the escaped stream.Test Case: 3.5-11Expected Result: PASS
Regression Test:
tcltest::test 3.5-10 { The ASCII SUB character (0x1a) should be ignored if it is the last character in the escaped stream. } { set S \\u001a compile [saveas T3510.java "class T3510 { }$S"] } {PASS}
The ASCII SUB character (0x1a) should be ignored if it is the last character in the escaped stream.Expected Result: FAIL
Regression Test:
tcltest::test 3.5-11 { The ASCII SUB character (0x1a) should be ignored if it is the last character in the escaped stream. } { set S \x1a compile [saveas T3511.java "class T3511 { $S }"] } {FAIL}
tests/jls/lexical-structure/white-space
Vertical tab (Ctrl-K) '\v' is not whitespaceTest Case: 3.6-invalid-2Expected Result: FAIL
Regression Test:
tcltest::test 3.6-invalid-1 { Vertical tab (Ctrl-K) '\v' is not whitespace } { whitespace T36i1 \v } {FAIL}
Vertical tab (Ctrl-K) '\u000b' is not whitespaceTest Case: 3.6-invalid-3Expected Result: FAIL
Regression Test:
tcltest::test 3.6-invalid-2 { Vertical tab (Ctrl-K) '\u000b' is not whitespace } { whitespace T36i2 {\u000b} } {FAIL}
Backspace (Ctrl-H) '\b' is not whitespaceTest Case: 3.6-invalid-4Expected Result: FAIL
Regression Test:
tcltest::test 3.6-invalid-3 { Backspace (Ctrl-H) '\b' is not whitespace } { whitespace T36i3 \b } {FAIL}
Backspace (Ctrl-H) '\u0008' is not whitespaceTest Case: 3.6-invalid-5Expected Result: FAIL
Regression Test:
tcltest::test 3.6-invalid-4 { Backspace (Ctrl-H) '\u0008' is not whitespace } { whitespace T36i4 {\u0008} } {FAIL}
Alert (Ctrl-G) '\a' is not whitespaceTest Case: 3.6-invalid-6Expected Result: FAIL
Regression Test:
tcltest::test 3.6-invalid-5 { Alert (Ctrl-G) '\a' is not whitespace } { whitespace T36i5 \a } {FAIL}
Alert (Ctrl-G) '\u0007' is not whitespaceTest Case: 3.6-invalid-7Expected Result: FAIL
Regression Test:
tcltest::test 3.6-invalid-6 { Alert (Ctrl-G) '\u0007' is not whitespace } { whitespace T36i6 {\u0007} } {FAIL}
Null '\0' is not whitespaceTest Case: 3.6-invalid-8Expected Result: FAIL
Regression Test:
tcltest::test 3.6-invalid-7 { Null '\0' is not whitespace } { whitespace T36i7 \0 } {FAIL}
Null '\u0000' is not whitespaceTest Case: 3.6-invalid-9Expected Result: FAIL
Regression Test:
tcltest::test 3.6-invalid-8 { Null '\u0000' is not whitespace } { whitespace T36i8 {\u0000} } {FAIL}
Sub (Ctrl-Z) '\u001a' is not whitespaceTest Case: 3.6-valid-1Expected Result: FAIL
Regression Test:
tcltest::test 3.6-invalid-9 { Sub (Ctrl-Z) '\u001a' is not whitespace } { whitespace T36i9 {\u001a} } {FAIL}
Linefeed (Ctrl-J) '\n' is whitespaceTest Case: 3.6-valid-2Expected Result: PASS
Regression Test:
tcltest::test 3.6-valid-1 { Linefeed (Ctrl-J) '\n' is whitespace } { whitespace T36v1 \n } {PASS}
Linefeed (Ctrl-J) '\u000a' is whitespaceTest Case: 3.6-valid-3Expected Result: PASS
Regression Test:
tcltest::test 3.6-valid-2 { Linefeed (Ctrl-J) '\u000a' is whitespace } { whitespace T36v2 {\u000a} } {PASS}
Carriage Return (Ctrl-M) '\r' is whitespaceTest Case: 3.6-valid-4Expected Result: PASS
Regression Test:
tcltest::test 3.6-valid-3 { Carriage Return (Ctrl-M) '\r' is whitespace } { whitespace T36v3 \r } {PASS}
Carriage Return (Ctrl-M) '\u000d' is whitespaceTest Case: 3.6-valid-5Expected Result: PASS
Regression Test:
tcltest::test 3.6-valid-4 { Carriage Return (Ctrl-M) '\u000d' is whitespace } { whitespace T36v4 {\u000d} } {PASS}
CR/LF '\r\n' is whitespaceTest Case: 3.6-valid-6Expected Result: PASS
Regression Test:
tcltest::test 3.6-valid-5 { CR/LF '\r\n' is whitespace } { whitespace T36v5 \r\n } {PASS}
CR/LF '\u000d\u000a' is whitespaceTest Case: 3.6-valid-7Expected Result: PASS
Regression Test:
tcltest::test 3.6-valid-6 { CR/LF '\u000d\u000a' is whitespace } { whitespace T36v6 {\u000d\u000a} } {PASS}
Space ' ' is whitespaceTest Case: 3.6-valid-8Expected Result: PASS
Regression Test:
tcltest::test 3.6-valid-7 { Space ' ' is whitespace } { whitespace T36v7 " " } {PASS}
Space '\u0020' is whitespaceTest Case: 3.6-valid-9Expected Result: PASS
Regression Test:
tcltest::test 3.6-valid-8 { Space '\u0020' is whitespace } { whitespace T36v8 {\u0020} } {PASS}
Tab (Ctrl-I) '\t' is whitespaceTest Case: 3.6-valid-10Expected Result: PASS
Regression Test:
tcltest::test 3.6-valid-9 { Tab (Ctrl-I) '\t' is whitespace } { whitespace T36v9 \t } {PASS}
Tab (Ctrl-I) '\u0009' is whitespaceTest Case: 3.6-valid-11Expected Result: PASS
Regression Test:
tcltest::test 3.6-valid-10 { Tab (Ctrl-I) '\u0009' is whitespace } { whitespace T36v10 {\u0009} } {PASS}
Form Feed (Ctrl-L) '\f' is whitespaceTest Case: 3.6-valid-12Expected Result: PASS
Regression Test:
tcltest::test 3.6-valid-11 { Form Feed (Ctrl-L) '\f' is whitespace } { whitespace T36v11 \f } {PASS}
Form Feed (Ctrl-L) '\u000c' is whitespaceExpected Result: PASS
Regression Test:
tcltest::test 3.6-valid-12 { Form Feed (Ctrl-L) '\u000c' is whitespace } { whitespace T36v12 {\u000c} } {PASS}
tests/jls/lexical-structure/comments
/* anything */ is a commentTest Case: 3.7-2Expected Result: PASS
Regression Test:
tcltest::test 3.7-1 { /* anything */ is a comment } { compile [saveas T371.java "class T371 {/* / * // * / exit */}"] } {PASS}
/* */ comment can span multiple linesTest Case: 3.7-3Expected Result: PASS
Regression Test:
tcltest::test 3.7-2 { /* */ comment can span multiple lines } { compile [saveas T372.java "class T372 {/* hello\n bye \n*/}"] } {PASS}
// comment inside /* */ comment is ignoredTest Case: 3.7-4Expected Result: PASS
Regression Test:
tcltest::test 3.7-3 { // comment inside /* */ comment is ignored } { compile [saveas T373.java "class T373 {/* hello\n // */}"] } {PASS}
// comment inside // comment is ignoredTest Case: 3.7-5Expected Result: PASS
Regression Test:
tcltest::test 3.7-4 { // comment inside // comment is ignored } { compile [saveas T374.java "class T374 {// //\n}"] } {PASS}
/* */ comment inside // comment is ignoredTest Case: 3.7-6Expected Result: PASS
Regression Test:
tcltest::test 3.7-5 { /* */ comment inside // comment is ignored } { compile [saveas T375.java "class T375 {// /*\n//*/\n}"] } {PASS}
/* or // inside /* */ comment is ignoredTest Case: 3.7-7Expected Result: PASS
Regression Test:
tcltest::test 3.7-6 { /* or // inside /* */ comment is ignored } { compile [saveas T376.java "class T376 {/* comment /* // /* */}"] } {PASS}
/* or // inside /** */ comment is ignoredTest Case: 3.7-8Expected Result: PASS
Regression Test:
tcltest::test 3.7-7 { /* or // inside /** */ comment is ignored } { compile [saveas T377.java "class T377 {/** comment /* // /* */}"] } {PASS}
/**/ is a documentaiton commentTest Case: 3.7-9Expected Result: PASS
Regression Test:
tcltest::test 3.7-8 { /**/ is a documentaiton comment } { compile [saveas T378.java "class T378 {/**/}"] } {PASS}
// comment separates tokensTest Case: 3.7-10Expected Result: PASS
Regression Test:
tcltest::test 3.7-9 { // comment separates tokens } { compile [saveas T379.java "class T379 {int//\ni;}"] } {PASS}
/**/ comment separates tokensTest Case: 3.7-11Expected Result: PASS
Regression Test:
tcltest::test 3.7-10 { /**/ comment separates tokens } { compile [saveas T3710.java "class T3710 {int/**/i;}"] } {PASS}
// comment cannot appear in literalTest Case: 3.7-12Expected Result: FAIL
Regression Test:
tcltest::test 3.7-11 { // comment cannot appear in literal } { compile [saveas T3711.java "class T3711 {float f = 1.//\n0;}"] } {FAIL}
/**/ comment cannot appear in literalTest Case: 3.7-13Expected Result: FAIL
Regression Test:
tcltest::test 3.7-12 { /**/ comment cannot appear in literal } { compile [saveas T3712.java "class T3712 {float f = 1./**/0;}"] } {FAIL}
// comment cannot appear in literalTest Case: 3.7-14Expected Result: FAIL
Regression Test:
tcltest::test 3.7-13 { // comment cannot appear in literal } { compile [saveas T3713.java "class T3713 {char c = 'a//\n';}"] } {FAIL}
/**/ comment cannot appear in literalTest Case: 3.7-15Expected Result: FAIL
Regression Test:
tcltest::test 3.7-14 { /**/ comment cannot appear in literal } { compile [saveas T3714.java "class T3714 {char c = 'a/**/';}"] } {FAIL}
/* must have matching */Test Case: 3.7-16Expected Result: FAIL
Regression Test:
tcltest::test 3.7-15 { /* must have matching */ } { compile [saveas T3715.java "class T3715 {} /*"] } {FAIL}
// must have matching LineTerminatorTest Case: 3.7-17Expected Result: FAIL
Regression Test:
tcltest::test 3.7-16 { // must have matching LineTerminator } { compile [saveas T3716.java "class T3716 {} //"] } {FAIL}
/**/ comment can contain any characters, including \0, unterminated quotesTest Case: 3.7-18Expected Result: PASS
Regression Test:
tcltest::test 3.7-17 { /**/ comment can contain any characters, including \0, unterminated quotes } { empty_class T3717 "/*\0'\"*/" } {PASS}
/**/ comment can contain any characters, including \0, unterminated quotesTest Case: 3.7-19Expected Result: PASS
Regression Test:
tcltest::test 3.7-18 { /**/ comment can contain any characters, including \0, unterminated quotes } { empty_class T3718 {/*\u0000\u0027\u0022*/} } {PASS}
// comment can contain any characters, including \0, unterminated quotesTest Case: 3.7-20Expected Result: PASS
Regression Test:
tcltest::test 3.7-19 { // comment can contain any characters, including \0, unterminated quotes } { empty_class T3719 "//\0'\"" } {PASS}
// comment can contain any characters, including \0, unterminated quotesTest Case: 3.7-21Expected Result: PASS
Regression Test:
tcltest::test 3.7-20 { // comment can contain any characters, including \0, unterminated quotes } { empty_class T3720 {//\u0000\u0027\u0022} } {PASS}
/**/ comment can contain any characters, including ASCII SUBTest Case: 3.7-22Expected Result: PASS
Regression Test:
tcltest::test 3.7-21 { /**/ comment can contain any characters, including ASCII SUB } { empty_class T3721 "/*\x1a*/" } {PASS}
/**/ comment can contain any characters, including ASCII SUBTest Case: 3.7-23Expected Result: PASS
Regression Test:
tcltest::test 3.7-22 { /**/ comment can contain any characters, including ASCII SUB } { empty_class T3722 {/*\u001a*/} } {PASS}
// comment can contain any characters, including ASCII SUBTest Case: 3.7-24Expected Result: PASS
Regression Test:
tcltest::test 3.7-23 { // comment can contain any characters, including ASCII SUB } { empty_class T3723 "//\x1a" } {PASS}
// comment can contain any characters, including ASCII SUBTest Case: 3.7-25Expected Result: PASS
Regression Test:
tcltest::test 3.7-24 { // comment can contain any characters, including ASCII SUB } { empty_class T3724 {//\u001a} } {PASS}
comments may be unicodeExpected Result: PASS
Regression Test:
tcltest::test 3.7-25 { comments may be unicode } { empty_main T3725 { \u002f\u002f This is a comment\u000a int i; \u002f\u002a So's this \u002a\u002f i = 1; } } {PASS}
tests/jls/lexical-structure/identifiers
A keyword cannot be an identifierTest Case: 3.8-invalid-2Expected Result: FAIL
Regression Test:
tcltest::test 3.8-invalid-1 { A keyword cannot be an identifier } { identifier T38i1 int } {FAIL}
A keyword cannot be an identifierTest Case: 3.8-invalid-3Expected Result: FAIL
Regression Test:
tcltest::test 3.8-invalid-2 { A keyword cannot be an identifier } { identifier T38i2 {\u0069\u006e\u0074} } {FAIL}
A boolean literal cannot be an identifierTest Case: 3.8-invalid-4Expected Result: FAIL
Regression Test:
tcltest::test 3.8-invalid-3 { A boolean literal cannot be an identifier } { identifier T38i3 true } {FAIL}
A boolean literal cannot be an identifierTest Case: 3.8-invalid-5Expected Result: FAIL
Regression Test:
tcltest::test 3.8-invalid-4 { A boolean literal cannot be an identifier } { identifier T38i4 {\u0074\u0072\u0075\u0065} } {FAIL}
A null literal cannot be an identifierTest Case: 3.8-invalid-6Expected Result: FAIL
Regression Test:
tcltest::test 3.8-invalid-5 { A null literal cannot be an identifier } { identifier T38i5 null } {FAIL}
A unicode null literal cannot be an identifierTest Case: 3.8-invalid-7Expected Result: FAIL
Regression Test:
tcltest::test 3.8-invalid-6 { A unicode null literal cannot be an identifier } { identifier T38i6 {\u006e\u0075\u006c\u006c} } {FAIL}
The first character of an identifier must satisfy Character.isJavaIdentifierStartTest Case: 3.8-invalid-8Expected Result: FAIL
Regression Test:
tcltest::test 3.8-invalid-7 { The first character of an identifier must satisfy Character.isJavaIdentifierStart } { identifier T38i7 1 } {FAIL}
Trailing characters in an identifier must satisfy Character.isJavaIdentifierPartTest Case: 3.8-invalid-9Expected Result: FAIL
Regression Test:
tcltest::test 3.8-invalid-8 { Trailing characters in an identifier must satisfy Character.isJavaIdentifierPart } { identifier T38i8 i\\uffff } {FAIL}
Invalid, as \0 is not short for \u0000Test Case: 3.8-valid-1Expected Result: FAIL
Regression Test:
tcltest::test 3.8-invalid-9 { Invalid, as \0 is not short for \u0000 } { identifier T38i9 i\\0 } {FAIL}
example identifierTest Case: 3.8-valid-2Expected Result: PASS
Regression Test:
tcltest::test 3.8-valid-1 { example identifier } { identifier T38v1 String } {PASS}
example identifierTest Case: 3.8-valid-3Expected Result: PASS
Regression Test:
tcltest::test 3.8-valid-2 { example identifier } { identifier T38v2 i3 } {PASS}
example identifierTest Case: 3.8-valid-4Expected Result: PASS
Regression Test:
tcltest::test 3.8-valid-3 { example identifier } { identifier T38v3 MAX_VALUE } {PASS}
example identifierTest Case: 3.8-valid-5Expected Result: PASS
Regression Test:
tcltest::test 3.8-valid-4 { example identifier } { identifier T38v4 isLetterOrDigit } {PASS}
valid identifierTest Case: 3.8-valid-6Expected Result: PASS
Regression Test:
tcltest::test 3.8-valid-5 { valid identifier } { identifier T38v5 _ } {PASS}
valid identifier, although discouragedTest Case: 3.8-valid-7Expected Result: OK
Regression Test:
tcltest::test 3.8-valid-6 { valid identifier, although discouraged } { ok_pass_or_warn [identifier T38v6 \$] } {OK}
valid identifier, although discouragedTest Case: 3.8-valid-8Expected Result: OK
Regression Test:
tcltest::test 3.8-valid-7 { valid identifier, although discouraged } { ok_pass_or_warn [identifier T38v7 a_\$1] } {OK}
valid identifier, as \ufeff satisfies Character.isJavaIdentifierPartTest Case: 3.8-valid-9Expected Result: PASS
Regression Test:
tcltest::test 3.8-valid-8 { valid identifier, as \ufeff satisfies Character.isJavaIdentifierPart } { identifier T38v8 i\\ufeff } {PASS}
valid identifier, as \u0000 satisfies Character.isJavaIdentifierPartTest Case: 3.8-valid-10Expected Result: PASS
Regression Test:
tcltest::test 3.8-valid-9 { valid identifier, as \u0000 satisfies Character.isJavaIdentifierPart } { identifier T38v9 i\\u0000 } {PASS}
example of unique identifiersTest Case: 3.8-valid-11Expected Result: PASS
Regression Test:
tcltest::test 3.8-valid-10 { example of unique identifiers } { compile [saveas T38v10.java { class T38v10 { int \u0041; // LATIN CAPITAL A int \u0061; // LATIN SMALL A int \u0391; // GREEK CAPITAL ALPHA int \u0480; // CYRILLIC SMALL A } }] } {PASS}
example of unique identifiersTest Case: 3.8-ignorable-1Expected Result: PASS
Regression Test:
tcltest::test 3.8-valid-11 { example of unique identifiers } { compile [saveas T38v11.java { class T38v11 { int \u00c1; // LATIN CAPITAL A ACUTE int \u0041\u0301; // LATIN CAPITAL A, followed by NON-SPACING ACUTE } }] } {PASS}
JCL docs refer to 200a, but this is a typoTest Case: 3.8-ignorable-2Expected Result: FAIL
Regression Test:
tcltest::test 3.8-ignorable-1 { JCL docs refer to 200a, but this is a typo } { compile [saveas T38ignoreable1.java { class T38ignoreable1 { int i\u200a; } }] } {FAIL}
JCL docs refer to 200a, but real value is 202aExpected Result: PASS
Regression Test:
tcltest::test 3.8-ignorable-2 { JCL docs refer to 200a, but real value is 202a } { compile [saveas T38ignoreable2.java { class T38ignoreable2 { int i\u202a; } }] } {PASS}
tests/jls/lexical-structure/keywords
abstract is a keywordTest Case: 3.9-2Expected Result: FAIL
Regression Test:
tcltest::test 3.9-1 { abstract is a keyword } { keyword T391 abstract } {FAIL}
boolean is a keywordTest Case: 3.9-3Expected Result: FAIL
Regression Test:
tcltest::test 3.9-2 { boolean is a keyword } { keyword T392 boolean } {FAIL}
break is a keywordTest Case: 3.9-4Expected Result: FAIL
Regression Test:
tcltest::test 3.9-3 { break is a keyword } { keyword T393 break } {FAIL}
byte is a keywordTest Case: 3.9-5Expected Result: FAIL
Regression Test:
tcltest::test 3.9-4 { byte is a keyword } { keyword T394 byte } {FAIL}
case is a keywordTest Case: 3.9-6Expected Result: FAIL
Regression Test:
tcltest::test 3.9-5 { case is a keyword } { keyword T395 case } {FAIL}
catch is a keywordTest Case: 3.9-7Expected Result: FAIL
Regression Test:
tcltest::test 3.9-6 { catch is a keyword } { keyword T396 catch } {FAIL}
char is a keywordTest Case: 3.9-8Expected Result: FAIL
Regression Test:
tcltest::test 3.9-7 { char is a keyword } { keyword T397 char } {FAIL}
class is a keywordTest Case: 3.9-9Expected Result: FAIL
Regression Test:
tcltest::test 3.9-8 { class is a keyword } { keyword T398 class } {FAIL}
const is a keywordTest Case: 3.9-10Expected Result: FAIL
Regression Test:
tcltest::test 3.9-9 { const is a keyword } { keyword T399 const } {FAIL}
continue is a keywordTest Case: 3.9-11Expected Result: FAIL
Regression Test:
tcltest::test 3.9-10 { continue is a keyword } { keyword T3910 continue } {FAIL}
default is a keywordTest Case: 3.9-12Expected Result: FAIL
Regression Test:
tcltest::test 3.9-11 { default is a keyword } { keyword T3911 default } {FAIL}
do is a keywordTest Case: 3.9-13Expected Result: FAIL
Regression Test:
tcltest::test 3.9-12 { do is a keyword } { keyword T3912 do } {FAIL}
double is a keywordTest Case: 3.9-14Expected Result: FAIL
Regression Test:
tcltest::test 3.9-13 { double is a keyword } { keyword T3913 double } {FAIL}
else is a keywordTest Case: 3.9-15Expected Result: FAIL
Regression Test:
tcltest::test 3.9-14 { else is a keyword } { keyword T3914 else } {FAIL}
extends is a keywordTest Case: 3.9-16Expected Result: FAIL
Regression Test:
tcltest::test 3.9-15 { extends is a keyword } { keyword T3915 extends } {FAIL}
final is a keywordTest Case: 3.9-17Expected Result: FAIL
Regression Test:
tcltest::test 3.9-16 { final is a keyword } { keyword T3916 final } {FAIL}
finally is a keywordTest Case: 3.9-18Expected Result: FAIL
Regression Test:
tcltest::test 3.9-17 { finally is a keyword } { keyword T3917 finally } {FAIL}
float is a keywordTest Case: 3.9-19Expected Result: FAIL
Regression Test:
tcltest::test 3.9-18 { float is a keyword } { keyword T3918 float } {FAIL}
for is a keywordTest Case: 3.9-20Expected Result: FAIL
Regression Test:
tcltest::test 3.9-19 { for is a keyword } { keyword T3919 for } {FAIL}
goto is a keywordTest Case: 3.9-21Expected Result: FAIL
Regression Test:
tcltest::test 3.9-20 { goto is a keyword } { keyword T3920 goto } {FAIL}
if is a keywordTest Case: 3.9-22Expected Result: FAIL
Regression Test:
tcltest::test 3.9-21 { if is a keyword } { keyword T3921 if } {FAIL}
implements is a keywordTest Case: 3.9-23Expected Result: FAIL
Regression Test:
tcltest::test 3.9-22 { implements is a keyword } { keyword T3922 implements } {FAIL}
import is a keywordTest Case: 3.9-24Expected Result: FAIL
Regression Test:
tcltest::test 3.9-23 { import is a keyword } { keyword T3923 import } {FAIL}
instanceof is a keywordTest Case: 3.9-25Expected Result: FAIL
Regression Test:
tcltest::test 3.9-24 { instanceof is a keyword } { keyword T3924 instanceof } {FAIL}
int is a keywordTest Case: 3.9-26Expected Result: FAIL
Regression Test:
tcltest::test 3.9-25 { int is a keyword } { keyword T3925 int } {FAIL}
interface is a keywordTest Case: 3.9-27Expected Result: FAIL
Regression Test:
tcltest::test 3.9-26 { interface is a keyword } { keyword T3926 interface } {FAIL}
long is a keywordTest Case: 3.9-28Expected Result: FAIL
Regression Test:
tcltest::test 3.9-27 { long is a keyword } { keyword T3927 long } {FAIL}
native is a keywordTest Case: 3.9-29Expected Result: FAIL
Regression Test:
tcltest::test 3.9-28 { native is a keyword } { keyword T3928 native } {FAIL}
new is a keywordTest Case: 3.9-30Expected Result: FAIL
Regression Test:
tcltest::test 3.9-29 { new is a keyword } { keyword T3929 new } {FAIL}
package is a keywordTest Case: 3.9-31Expected Result: FAIL
Regression Test:
tcltest::test 3.9-30 { package is a keyword } { keyword T3930 package } {FAIL}
private is a keywordTest Case: 3.9-32Expected Result: FAIL
Regression Test:
tcltest::test 3.9-31 { private is a keyword } { keyword T3931 private } {FAIL}
protected is a keywordTest Case: 3.9-33Expected Result: FAIL
Regression Test:
tcltest::test 3.9-32 { protected is a keyword } { keyword T3932 protected } {FAIL}
public is a keywordTest Case: 3.9-34Expected Result: FAIL
Regression Test:
tcltest::test 3.9-33 { public is a keyword } { keyword T3933 public } {FAIL}
return is a keywordTest Case: 3.9-35Expected Result: FAIL
Regression Test:
tcltest::test 3.9-34 { return is a keyword } { keyword T3934 return } {FAIL}
short is a keywordTest Case: 3.9-36Expected Result: FAIL
Regression Test:
tcltest::test 3.9-35 { short is a keyword } { keyword T3935 short } {FAIL}
static is a keywordTest Case: 3.9-37Expected Result: FAIL
Regression Test:
tcltest::test 3.9-36 { static is a keyword } { keyword T3936 static } {FAIL}
strictfp is a keyword, it is new to version 2 of the JLS specTest Case: 3.9-38Expected Result: FAIL
Regression Test:
tcltest::test 3.9-37 { strictfp is a keyword, it is new to version 2 of the JLS spec } { keyword T3937 strictfp } {FAIL}
super is a keywordTest Case: 3.9-39Expected Result: FAIL
Regression Test:
tcltest::test 3.9-38 { super is a keyword } { keyword T3938 super } {FAIL}
switch is a keywordTest Case: 3.9-40Expected Result: FAIL
Regression Test:
tcltest::test 3.9-39 { switch is a keyword } { keyword T3939 switch } {FAIL}
synchronized is a keywordTest Case: 3.9-41Expected Result: FAIL
Regression Test:
tcltest::test 3.9-40 { synchronized is a keyword } { keyword T3940 synchronized } {FAIL}
this is a keywordTest Case: 3.9-42Expected Result: FAIL
Regression Test:
tcltest::test 3.9-41 { this is a keyword } { keyword T3941 this } {FAIL}
throw is a keywordTest Case: 3.9-43Expected Result: FAIL
Regression Test:
tcltest::test 3.9-42 { throw is a keyword } { keyword T3942 throw } {FAIL}
throws is a keywordTest Case: 3.9-44Expected Result: FAIL
Regression Test:
tcltest::test 3.9-43 { throws is a keyword } { keyword T3943 throws } {FAIL}
transient is a keywordTest Case: 3.9-45Expected Result: FAIL
Regression Test:
tcltest::test 3.9-44 { transient is a keyword } { keyword T3944 transient } {FAIL}
try is a keywordTest Case: 3.9-46Expected Result: FAIL
Regression Test:
tcltest::test 3.9-45 { try is a keyword } { keyword T3945 try } {FAIL}
void is a keywordTest Case: 3.9-47Expected Result: FAIL
Regression Test:
tcltest::test 3.9-46 { void is a keyword } { keyword T3946 void } {FAIL}
volatile is a keywordTest Case: 3.9-48Expected Result: FAIL
Regression Test:
tcltest::test 3.9-47 { volatile is a keyword } { keyword T3947 volatile } {FAIL}
while is a keywordTest Case: 3.9-valid-1Expected Result: FAIL
Regression Test:
tcltest::test 3.9-48 { while is a keyword } { keyword T3948 while } {FAIL}
asm is not a keywordTest Case: 3.9-valid-2Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-1 { asm is not a keyword } { keyword T39v1 asm } {PASS}
auto is not a keywordTest Case: 3.9-valid-3Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-2 { auto is not a keyword } { keyword T39v2 auto } {PASS}
bool is not a keywordTest Case: 3.9-valid-4Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-3 { bool is not a keyword } { keyword T39v3 bool } {PASS}
const_cast is not a keywordTest Case: 3.9-valid-5Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-4 { const_cast is not a keyword } { keyword T39v4 const_cast } {PASS}
delete is not a keywordTest Case: 3.9-valid-6Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-5 { delete is not a keyword } { keyword T39v5 delete } {PASS}
dynamic_cast is not a keywordTest Case: 3.9-valid-7Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-6 { dynamic_cast is not a keyword } { keyword T39v6 dynamic_cast } {PASS}
enum is not a keywordTest Case: 3.9-valid-8Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-7 { enum is not a keyword } { keyword T39v7 enum } {PASS}
explicit is not a keywordTest Case: 3.9-valid-9Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-8 { explicit is not a keyword } { keyword T39v8 explicit } {PASS}
extern is not a keywordTest Case: 3.9-valid-10Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-9 { extern is not a keyword } { keyword T39v9 extern } {PASS}
friend is not a keywordTest Case: 3.9-valid-11Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-10 { friend is not a keyword } { keyword T39v10 friend } {PASS}
inline is not a keywordTest Case: 3.9-valid-12Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-11 { inline is not a keyword } { keyword T39v11 inline } {PASS}
mutable is not a keywordTest Case: 3.9-valid-13Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-12 { mutable is not a keyword } { keyword T39v12 mutable } {PASS}
namespace is not a keywordTest Case: 3.9-valid-14Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-13 { namespace is not a keyword } { keyword T39v13 namespace } {PASS}
operator is not a keywordTest Case: 3.9-valid-15Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-14 { operator is not a keyword } { keyword T39v14 operator } {PASS}
register is not a keywordTest Case: 3.9-valid-16Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-15 { register is not a keyword } { keyword T39v15 register } {PASS}
reinterpret_cast is not a keywordTest Case: 3.9-valid-17Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-16 { reinterpret_cast is not a keyword } { keyword T39v16 reinterpret_cast } {PASS}
signed is not a keywordTest Case: 3.9-valid-18Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-17 { signed is not a keyword } { keyword T39v17 signed } {PASS}
sizeof is not a keywordTest Case: 3.9-valid-19Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-18 { sizeof is not a keyword } { keyword T39v18 sizeof } {PASS}
static_cast is not a keywordTest Case: 3.9-valid-20Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-19 { static_cast is not a keyword } { keyword T39v19 static_cast } {PASS}
struct is not a keywordTest Case: 3.9-valid-21Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-20 { struct is not a keyword } { keyword T39v20 struct } {PASS}
template is not a keywordTest Case: 3.9-valid-22Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-21 { template is not a keyword } { keyword T39v21 template } {PASS}
typedef is not a keywordTest Case: 3.9-valid-23Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-22 { typedef is not a keyword } { keyword T39v22 typedef } {PASS}
typeid is not a keywordTest Case: 3.9-valid-24Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-23 { typeid is not a keyword } { keyword T39v23 typeid } {PASS}
typename is not a keywordTest Case: 3.9-valid-25Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-24 { typename is not a keyword } { keyword T39v24 typename } {PASS}
union is not a keywordTest Case: 3.9-valid-26Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-25 { union is not a keyword } { keyword T39v25 union } {PASS}
unsigned is not a keywordTest Case: 3.9-valid-27Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-26 { unsigned is not a keyword } { keyword T39v26 unsigned } {PASS}
using is not a keywordTest Case: 3.9-valid-28Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-27 { using is not a keyword } { keyword T39v27 using } {PASS}
virtual is not a keywordTest Case: 3.9-valid-29Expected Result: PASS
Regression Test:
tcltest::test 3.9-valid-28 { virtual is not a keyword } { keyword T39v28 virtual } {PASS}
wchar_t is not a keywordExpected Result: PASS
Regression Test:
tcltest::test 3.9-valid-29 { wchar_t is not a keyword } { keyword T39v29 wchar_t } {PASS}
tests/jls/lexical-structure/literals/integer-literals
2147483648 may appear only as the operand of unary -Test Case: 3.10.1-invalid-2Expected Result: FAIL
Regression Test:
tcltest::test 3.10.1-invalid-1 { 2147483648 may appear only as the operand of unary - } { literal T3101i1 2147483648 } {FAIL}
decimal larger than 2147483648 is not an intTest Case: 3.10.1-invalid-3Expected Result: FAIL
Regression Test:
tcltest::test 3.10.1-invalid-2 { decimal larger than 2147483648 is not an int } { literal T3101i2 12345678901 } {FAIL}
octal larger than 037777777777 is not an intTest Case: 3.10.1-invalid-4Expected Result: FAIL
Regression Test:
tcltest::test 3.10.1-invalid-3 { octal larger than 037777777777 is not an int } { literal T3101i3 040000000000 } {FAIL}
hex larger than 0xffffffff is not an intTest Case: 3.10.1-invalid-5Expected Result: FAIL
Regression Test:
tcltest::test 3.10.1-invalid-4 { hex larger than 0xffffffff is not an int } { literal T3101i4 0x123456789 } {FAIL}
9223372036854775808L may appear only as the operand of unary -Test Case: 3.10.1-invalid-6Expected Result: FAIL
Regression Test:
tcltest::test 3.10.1-invalid-5 { 9223372036854775808L may appear only as the operand of unary - } { literal T3101i5 9223372036854775808L } {FAIL}
decimal larger than 9223372036854775808L is not an intTest Case: 3.10.1-invalid-7Expected Result: FAIL
Regression Test:
tcltest::test 3.10.1-invalid-6 { decimal larger than 9223372036854775808L is not an int } { literal T3101i6 12345678901234567890L } {FAIL}
octal larger than 01777777777777777777777L is not an intTest Case: 3.10.1-invalid-8Expected Result: FAIL
Regression Test:
tcltest::test 3.10.1-invalid-7 { octal larger than 01777777777777777777777L is not an int } { literal T3101i7 02000000000000000000000L } {FAIL}
hex larger than 0xffffffffffffffffL is not an intTest Case: 3.10.1-invalid-9Expected Result: FAIL
Regression Test:
tcltest::test 3.10.1-invalid-8 { hex larger than 0xffffffffffffffffL is not an int } { literal T3101i8 0x123456789abcdef01L } {FAIL}
octal cannot contain '9'Test Case: 3.10.1-invalid-10Expected Result: FAIL
Regression Test:
tcltest::test 3.10.1-invalid-9 { octal cannot contain '9' } { literal T3101i9 09 } {FAIL}
2147483648 may appear only as the operand of unary -Test Case: 3.10.1-invalid-11Expected Result: FAIL
Regression Test:
tcltest::test 3.10.1-invalid-10 { 2147483648 may appear only as the operand of unary - } { literal T3101i10 0-2147483648 } {FAIL}
9223372036854775808L may appear only as the operand of unary -Test Case: 3.10.1-invalid-12Expected Result: FAIL
Regression Test:
tcltest::test 3.10.1-invalid-11 { 9223372036854775808L may appear only as the operand of unary - } { literal T3101i11 0-9223372036854775808L } {FAIL}
0x must be followed by digitsTest Case: 3.10.1-invalid-13Expected Result: FAIL
Regression Test:
tcltest::test 3.10.1-invalid-12 { 0x must be followed by digits } { literal T3101i12 0x } {FAIL}
0x must be followed by digitsTest Case: 3.10.1-valid-1Expected Result: FAIL
Regression Test:
tcltest::test 3.10.1-invalid-13 { 0x must be followed by digits } { literal T3101i13 0xL } {FAIL}
example decimal int literalTest Case: 3.10.1-valid-2Expected Result: PASS
Regression Test:
tcltest::test 3.10.1-valid-1 { example decimal int literal } { literal T3101v1 0 } {PASS}
example octal int literalTest Case: 3.10.1-valid-3Expected Result: PASS
Regression Test:
tcltest::test 3.10.1-valid-2 { example octal int literal } { literal T3101v2 0372 } {PASS}
example hex int literalTest Case: 3.10.1-valid-4Expected Result: PASS
Regression Test:
tcltest::test 3.10.1-valid-3 { example hex int literal } { literal T3101v3 0xDadaCafe } {PASS}
example hex int literalTest Case: 3.10.1-valid-5Expected Result: PASS
Regression Test:
tcltest::test 3.10.1-valid-4 { example hex int literal } { literal T3101v4 0X00FF00FF } {PASS}
decimal 0, octal 00, and hex 0x0 are equalTest Case: 3.10.1-valid-6Expected Result: PASS
Regression Test:
tcltest::test 3.10.1-valid-5 { decimal 0, octal 00, and hex 0x0 are equal } { compile [saveas T3101v5.java { class T3101v5 { void foo(int i) { switch (i) { case 0: case ((0 == 00) ? 1 : 0): case ((0 == 0x0) ? 2 : 0): case ((00 == 0x0) ? 3 : 0): } } } }] } {PASS}
2147483648 is valid when negativeTest Case: 3.10.1-valid-7Expected Result: PASS
Regression Test:
tcltest::test 3.10.1-valid-6 { 2147483648 is valid when negative } { literal T3101v6 -2147483648 } {PASS}
example long literal, suffix l (ell) == LTest Case: 3.10.1-valid-8Expected Result: PASS
Regression Test:
tcltest::test 3.10.1-valid-7 { example long literal, suffix l (ell) == L } { literal T3101v7 0l } {PASS}
example long literalTest Case: 3.10.1-valid-9Expected Result: PASS
Regression Test:
tcltest::test 3.10.1-valid-8 { example long literal } { literal T3101v8 0777L } {PASS}
example long literalTest Case: 3.10.1-valid-10Expected Result: PASS
Regression Test:
tcltest::test 3.10.1-valid-9 { example long literal } { literal T3101v9 0X100000000L } {PASS}
example long literalTest Case: 3.10.1-valid-11Expected Result: PASS
Regression Test:
tcltest::test 3.10.1-valid-10 { example long literal } { literal T3101v10 2147483648L } {PASS}
example long literalTest Case: 3.10.1-valid-12Expected Result: PASS
Regression Test:
tcltest::test 3.10.1-valid-11 { example long literal } { literal T3101v11 0xC0B0L } {PASS}
9223372036854775807L is valid when negativeTest Case: 3.10.1-valid-13Expected Result: PASS
Regression Test:
tcltest::test 3.10.1-valid-12 { 9223372036854775807L is valid when negative } { literal T3101v12 -9223372036854775807L } {PASS}
An octal that fits in 32 bits is legal intTest Case: 3.10.1-valid-14Expected Result: PASS
Regression Test:
tcltest::test 3.10.1-valid-13 { An octal that fits in 32 bits is legal int } { literal T3101v13 0000000000000000000000000001 } {PASS}
A hex literal that fits in 64 bits is a legal longExpected Result: PASS
Regression Test:
tcltest::test 3.10.1-valid-14 { A hex literal that fits in 64 bits is a legal long } { literal T3101v14 0x000012345678CAFEBABEL } {PASS}
tests/jls/lexical-structure/literals/floating-point-literals
Whole or fractional part must have a digitTest Case: 3.10.2-invalid-2Expected Result: FAIL
Regression Test:
tcltest::test 3.10.2-invalid-1 { Whole or fractional part must have a digit } { literal T3102i1 .e2 } {FAIL}
Whole or fractional part must have a digitTest Case: 3.10.2-invalid-3Expected Result: FAIL
Regression Test:
tcltest::test 3.10.2-invalid-2 { Whole or fractional part must have a digit } { literal T3102i2 .F } {FAIL}
Invalid DigitsTest Case: 3.10.2-invalid-4Expected Result: FAIL
Regression Test:
tcltest::test 3.10.2-invalid-3 { Invalid Digits } { literal T3102i3 E.1e20 } {FAIL}
ExponentPart must include a SignedIntegerTest Case: 3.10.2-invalid-5Expected Result: FAIL
Regression Test:
tcltest::test 3.10.2-invalid-4 { ExponentPart must include a SignedInteger } { literal T3102i4 1.E } {FAIL}
ExponentPart must include a SignedIntegerTest Case: 3.10.2-invalid-6Expected Result: FAIL
Regression Test:
tcltest::test 3.10.2-invalid-5 { ExponentPart must include a SignedInteger } { literal T3102i5 1.e } {FAIL}
ExponentPart must include a SignedIntegerTest Case: 3.10.2-invalid-7Expected Result: FAIL
Regression Test:
tcltest::test 3.10.2-invalid-6 { ExponentPart must include a SignedInteger } { literal T3102i6 1.E+ } {FAIL}
ExponentPart must include a SignedIntegerTest Case: 3.10.2-invalid-8Expected Result: FAIL
Regression Test:
tcltest::test 3.10.2-invalid-7 { ExponentPart must include a SignedInteger } { literal T3102i7 1.E- } {FAIL}
ExponentPart must include a SignedIntegerTest Case: 3.10.2-invalid-9Expected Result: FAIL
Regression Test:
tcltest::test 3.10.2-invalid-8 { ExponentPart must include a SignedInteger } { literal T3102i8 .1eF } {FAIL}
ExponentPart must include a SignedIntegerTest Case: 3.10.2-invalid-10Expected Result: FAIL
Regression Test:
tcltest::test 3.10.2-invalid-9 { ExponentPart must include a SignedInteger } { literal T3102i9 .1e-D } {FAIL}
ExponentPart must include a SignedIntegerTest Case: 3.10.2-invalid-11Expected Result: FAIL
Regression Test:
tcltest::test 3.10.2-invalid-10 { ExponentPart must include a SignedInteger } { literal T3102i10 1e-d } {FAIL}
ExponentPart must include a SignedIntegerTest Case: 3.10.2-round-1Expected Result: FAIL
Regression Test:
tcltest::test 3.10.2-invalid-11 { ExponentPart must include a SignedInteger } { literal T3102i11 .1e+F } {FAIL}
It is an error for a floating-point literal to round to an infinityTest Case: 3.10.2-round-2Expected Result: FAIL
Regression Test:
tcltest::test 3.10.2-round-1 { It is an error for a floating-point literal to round to an infinity } { literal T3102r1 1e39f } {FAIL}
It is an error for a floating-point literal to round to an infinityTest Case: 3.10.2-round-3Expected Result: FAIL
Regression Test:
tcltest::test 3.10.2-round-2 { It is an error for a floating-point literal to round to an infinity } { literal T3102r2 -1e310 } {FAIL}
It is an error for a nonzero floating-point to round to zeroTest Case: 3.10.2-round-4Expected Result: FAIL
Regression Test:
tcltest::test 3.10.2-round-3 { It is an error for a nonzero floating-point to round to zero } { literal T3102r3 1e-47f } {FAIL}
It is an error for a nonzero floating-point to round to zeroTest Case: 3.10.2-round-5Expected Result: FAIL
Regression Test:
tcltest::test 3.10.2-round-4 { It is an error for a nonzero floating-point to round to zero } { literal T3102r4 -1e-326 } {FAIL}
It is an error for a floating-point literal to round to an infinityTest Case: 3.10.2-round-6Expected Result: FAIL
Regression Test:
tcltest::test 3.10.2-round-5 { It is an error for a floating-point literal to round to an infinity } { literal T3102r5 340282356779733661637539395458142568448f } {FAIL}
It is an error for a floating-point literal to round to an infinityTest Case: 3.10.2-round-7Expected Result: FAIL
Regression Test:
tcltest::test 3.10.2-round-6 { It is an error for a floating-point literal to round to an infinity } { literal T3102r6 179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792.0 } {FAIL}
It is an error for a nonzero floating-point to round to zeroTest Case: 3.10.2-round-8Expected Result: FAIL
Regression Test:
tcltest::test 3.10.2-round-7 { It is an error for a nonzero floating-point to round to zero } { literal T3102r7 0.000000000000000000000000000000000000000000000700649232162408535461864791644958065640130970938257885878534141944895541342930300743319094181060791015625f } {FAIL}
It is an error for a nonzero floating-point to round to zeroTest Case: 3.10.2-float-1Expected Result: FAIL
Regression Test:
tcltest::test 3.10.2-round-8 { It is an error for a nonzero floating-point to round to zero } { literal T3102r8 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024703282292062327208828439643411068618252990130716238221279284125033775363510437593264991818081799618989828234772285886546332835517796989819938739800539093906315035659515570226392290858392449105184435931802849936536152500319370457678249219365623669863658480757001585769269903706311928279558551332927834338409351978015531246597263579574622766465272827220056374006485499977096599470454020828166226237857393450736339007967761930577506740176324673600968951340535537458516661134223766678604162159680461914467291840300530057530849048765391711386591646239524912623653881879636239373280423891018672348497668235089863388587925628302755995657524455507255189313690836254779186948667994968324049705821028513185451396213837722826145437693412532098591327667236328125 } {FAIL}
example float literalTest Case: 3.10.2-float-2Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-float-1 { example float literal } { literal T3102f1 1e1f } {PASS}
example float literalTest Case: 3.10.2-float-3Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-float-2 { example float literal } { literal T3102f2 2.f } {PASS}
example float literalTest Case: 3.10.2-float-4Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-float-3 { example float literal } { literal T3102f3 1.e-1 } {PASS}
example float literalTest Case: 3.10.2-float-5Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-float-4 { example float literal } { literal T3102f4 .3F } {PASS}
example float literalTest Case: 3.10.2-float-6Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-float-5 { example float literal } { literal T3102f5 0f } {PASS}
example float literalTest Case: 3.10.2-float-7Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-float-6 { example float literal } { literal T3102f6 3.14f } {PASS}
example float literalTest Case: 3.10.2-float-8Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-float-7 { example float literal } { literal T3102f7 6.022137e+23f } {PASS}
largest finite float, by JLSTest Case: 3.10.2-float-9Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-float-8 { largest finite float, by JLS } { literal T3102f8 3.40282347e+38f } {PASS}
smallest finite floatTest Case: 3.10.2-float-10Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-float-9 { smallest finite float } { literal T3102f9 1.40239846e-45f } {PASS}
extra 0s don't affect floating point parsingTest Case: 3.10.2-float-11Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-float-10 { extra 0s don't affect floating point parsing } { literal T3102f10 000000000000000000000000000000000000000000000000000000000000000000000000.000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000e00000000000000000000000000000000050f } {PASS}
unicode 1e0FTest Case: 3.10.2-float-12Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-float-11 { unicode 1e0F } { literal T3102f11 {\u0031\u0065\u0030\u0046} } {PASS}
largest finite float, by roundingTest Case: 3.10.2-float-13Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-float-12 { largest finite float, by rounding } { constant_expression T3102f12 {340282356779733661637539395458142568447.99999f == Float.MAX_VALUE} } {PASS}
smallest finite float, by roundingTest Case: 3.10.2-double-1Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-float-13 { smallest finite float, by rounding } { literal T3102f13 0.00000000000000000000000000000000000000000000070064923216240853546186479164495806564013097093825788587853414194489554134293030074331909418106079101562500001f } {PASS}
example double literalTest Case: 3.10.2-double-2Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-double-1 { example double literal } { literal T3102d1 1E1D } {PASS}
example double literalTest Case: 3.10.2-double-3Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-double-2 { example double literal } { literal T3102d2 2. } {PASS}
example double literalTest Case: 3.10.2-double-4Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-double-3 { example double literal } { literal T3102d3 .3 } {PASS}
example double literalTest Case: 3.10.2-double-5Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-double-4 { example double literal } { literal T3102d4 0.0 } {PASS}
example double literalTest Case: 3.10.2-double-6Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-double-5 { example double literal } { literal T3102d5 3.14 } {PASS}
example double literalTest Case: 3.10.2-double-7Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-double-6 { example double literal } { literal T3102d6 1e-9d } {PASS}
example double literalTest Case: 3.10.2-double-8Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-double-7 { example double literal } { literal T3102d7 1e137 } {PASS}
largest finite double, by JLSTest Case: 3.10.2-double-9Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-double-8 { largest finite double, by JLS } { literal T3102d8 1.79769313486231570e+308 } {PASS}
smallest finite doubleTest Case: 3.10.2-double-10Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-double-9 { smallest finite double } { literal T3102d9 4.94065645841246544e-324 } {PASS}
the compiler should correctly round denormalized literalsTest Case: 3.10.2-double-11Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-double-10 { the compiler should correctly round denormalized literals } { constant_expression T3102d10 {.0000000000012345678901234567890e+10 == 1.2345678901234568e-2} } {PASS}
extra 0s don't affect floating point parsingTest Case: 3.10.2-double-12Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-double-11 { extra 0s don't affect floating point parsing } { literal T3102d11 000000000000000000000000000000000000000000000000000000000000000000000000.000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000e00000000000000000000000000000000050 } {PASS}
unicode escape the . in float 1.0Test Case: 3.10.2-double-13Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-double-12 { unicode escape the . in float 1.0 } { literal T3102d12 1\u002e0 } {PASS}
largest finite double, by roundingTest Case: 3.10.2-double-14Expected Result: PASS
Regression Test:
tcltest::test 3.10.2-double-13 { largest finite double, by rounding } { constant_expression T3102d13 {179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497791.999999 == Double.MAX_VALUE} } {PASS}
smallest finite double, by roundingExpected Result: PASS
Regression Test:
tcltest::test 3.10.2-double-14 { smallest finite double, by rounding } { literal T3102d14 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002470328229206232720882843964341106861825299013071623822127928412503377536351043759326499181808179961898982823477228588654633283551779698981993873980053909390631503565951557022639229085839244910518443593180284993653615250031937045767824921936562366986365848075700158576926990370631192827955855133292783433840935197801553124659726357957462276646527282722005637400648549997709659947045402082816622623785739345073633900796776193057750674017632467360096895134053553745851666113422376667860416215968046191446729184030053005753084904876539171138659164623952491262365388187963623937328042389101867234849766823508986338858792562830275599565752445550725518931369083625477918694866799496832404970582102851318545139621383772282614543769341253209859132766723632812500001 } {PASS}
tests/jls/lexical-structure/literals/character-literals
A SingleCharacter cannot be 'Test Case: 3.10.4-invalid-2Expected Result: FAIL
Regression Test:
tcltest::test 3.10.4-invalid-1 { A SingleCharacter cannot be ' } { literal T3104i1 ' } {FAIL}
A SingleCharacter cannot be 'Test Case: 3.10.4-invalid-3Expected Result: FAIL
Regression Test:
tcltest::test 3.10.4-invalid-2 { A SingleCharacter cannot be ' } { literal T3104i2 {\u0027} } {FAIL}
A SingleCharacter cannot be \Test Case: 3.10.4-invalid-4Expected Result: FAIL
Regression Test:
tcltest::test 3.10.4-invalid-3 { A SingleCharacter cannot be \ } { literal T3104i3 \\ } {FAIL}
A SingleCharacter cannot be \Test Case: 3.10.4-invalid-5Expected Result: FAIL
Regression Test:
tcltest::test 3.10.4-invalid-4 { A SingleCharacter cannot be \ } { literal T3104i4 {\u005c} } {FAIL}
A LineTerminator is not an InputCharacterTest Case: 3.10.4-invalid-6Expected Result: FAIL
Regression Test:
tcltest::test 3.10.4-invalid-5 { A LineTerminator is not an InputCharacter } { literal T3104i5 \r } {FAIL}
A LineTerminator is not an InputCharacterTest Case: 3.10.4-invalid-7Expected Result: FAIL
Regression Test:
tcltest::test 3.10.4-invalid-6 { A LineTerminator is not an InputCharacter } { literal T3104i6 \n } {FAIL}
A LineTerminator is not an InputCharacterTest Case: 3.10.4-invalid-8Expected Result: FAIL
Regression Test:
tcltest::test 3.10.4-invalid-7 { A LineTerminator is not an InputCharacter } { literal T3104i7 \r\n } {FAIL}
A LineTerminator is not an InputCharacterTest Case: 3.10.4-invalid-9Expected Result: FAIL
Regression Test:
tcltest::test 3.10.4-invalid-8 { A LineTerminator is not an InputCharacter } { literal T3104i8 {\u000d} } {FAIL}
A LineTerminator is not an InputCharacterTest Case: 3.10.4-invalid-10Expected Result: FAIL
Regression Test:
tcltest::test 3.10.4-invalid-9 { A LineTerminator is not an InputCharacter } { literal T3104i9 {\u000a} } {FAIL}
A LineTerminator is not an InputCharacterTest Case: 3.10.4-invalid-11Expected Result: FAIL
Regression Test:
tcltest::test 3.10.4-invalid-10 { A LineTerminator is not an InputCharacter } { literal T3104i10 {\u000d\u000a} } {FAIL}
' must be terminated with 'Test Case: 3.10.4-invalid-12Expected Result: FAIL
Regression Test:
tcltest::test 3.10.4-invalid-11 { ' must be terminated with ' } { literal T3104i11 AB } {FAIL}
empty character literal is not allowedTest Case: 3.10.4-invalid-13Expected Result: FAIL
Regression Test:
tcltest::test 3.10.4-invalid-12 { empty character literal is not allowed } { literal T3104i12 "" } {FAIL}
\r\n is two character literalsTest Case: 3.10.4-invalid-14Expected Result: FAIL
Regression Test:
tcltest::test 3.10.4-invalid-13 { \r\n is two character literals } { literal T3104i13 {\r\n} } {FAIL}
' must be terminated with 'Test Case: 3.10.4-valid-1Expected Result: FAIL
Regression Test:
tcltest::test 3.10.4-invalid-14 { ' must be terminated with ' } { compile [saveas T3104i14.java "class T3104i14.java {char c = ';}"] } {FAIL}
example character literalTest Case: 3.10.4-valid-2Expected Result: PASS
Regression Test:
tcltest::test 3.10.4-valid-1 { example character literal } { literal T3104v1 a } {PASS}
example character literalTest Case: 3.10.4-valid-3Expected Result: PASS
Regression Test:
tcltest::test 3.10.4-valid-2 { example character literal } { literal T3104v2 % } {PASS}
example character literalTest Case: 3.10.4-valid-4Expected Result: PASS
Regression Test:
tcltest::test 3.10.4-valid-3 { example character literal } { literal T3104v3 {\t} } {PASS}
example character literalTest Case: 3.10.4-valid-5Expected Result: PASS
Regression Test:
tcltest::test 3.10.4-valid-4 { example character literal } { literal T3104v4 {\\} } {PASS}
example character literalTest Case: 3.10.4-valid-6Expected Result: PASS
Regression Test:
tcltest::test 3.10.4-valid-5 { example character literal } { literal T3104v5 {\'} } {PASS}
example character literalTest Case: 3.10.4-valid-7Expected Result: PASS
Regression Test:
tcltest::test 3.10.4-valid-6 { example character literal } { literal T3104v6 {\u03a9} } {PASS}
example character literalTest Case: 3.10.4-valid-8Expected Result: PASS
Regression Test:
tcltest::test 3.10.4-valid-7 { example character literal } { literal T3104v7 {\uFFFF} } {PASS}
example character literalTest Case: 3.10.4-valid-9Expected Result: PASS
Regression Test:
tcltest::test 3.10.4-valid-8 { example character literal } { literal T3104v8 {\177} } {PASS}
example character literalTest Case: 3.10.4-valid-10Expected Result: PASS
Regression Test:
tcltest::test 3.10.4-valid-9 { example character literal } { literal T3104v9 {\r} } {PASS}
example character literalTest Case: 3.10.4-valid-11Expected Result: PASS
Regression Test:
tcltest::test 3.10.4-valid-10 { example character literal } { literal T3104v10 {\n} } {PASS}
valid character literalTest Case: 3.10.4-valid-12Expected Result: PASS
Regression Test:
tcltest::test 3.10.4-valid-11 { valid character literal } { literal T3104v11 {\"} } {PASS}
valid character literalTest Case: 3.10.4-valid-13Expected Result: PASS
Regression Test:
tcltest::test 3.10.4-valid-12 { valid character literal } { literal T3104v12 {"} } {PASS}
valid character literalTest Case: 3.10.4-valid-14Expected Result: PASS
Regression Test:
tcltest::test 3.10.4-valid-13 { valid character literal } { literal T3104v13 {\u001a} } {PASS}
valid character literalExpected Result: PASS
Regression Test:
tcltest::test 3.10.4-valid-14 { valid character literal } { literal T3104v14 \x1a } {PASS}
tests/jls/lexical-structure/literals/string-literals
A StringCharacter cannot be "Test Case: 3.10.5-invalid-2Expected Result: FAIL
Regression Test:
tcltest::test 3.10.5-invalid-1 { A StringCharacter cannot be " } { literal T3105i1 {"} } {FAIL}
A StringCharacter cannot be "Test Case: 3.10.5-invalid-3Expected Result: FAIL
Regression Test:
tcltest::test 3.10.5-invalid-2 { A StringCharacter cannot be " } { literal T3105i2 {\u0022} } {FAIL}
A StringCharacter cannot be \Test Case: 3.10.5-invalid-4Expected Result: FAIL
Regression Test:
tcltest::test 3.10.5-invalid-3 { A StringCharacter cannot be \ } { literal T3105i3 \\ } {FAIL}
A StringCharacter cannot be \Test Case: 3.10.5-invalid-5Expected Result: FAIL
Regression Test:
tcltest::test 3.10.5-invalid-4 { A StringCharacter cannot be \ } { literal T3105i4 {\u005c} } {FAIL}
A LineTerminator is not an InputCharacterTest Case: 3.10.5-invalid-6Expected Result: FAIL
Regression Test:
tcltest::test 3.10.5-invalid-5 { A LineTerminator is not an InputCharacter } { literal T3105i5 \r } {FAIL}
A LineTerminator is not an InputCharacterTest Case: 3.10.5-invalid-7Expected Result: FAIL
Regression Test:
tcltest::test 3.10.5-invalid-6 { A LineTerminator is not an InputCharacter } { literal T3105i6 \n } {FAIL}
A LineTerminator is not an InputCharacterTest Case: 3.10.5-invalid-8Expected Result: FAIL
Regression Test:
tcltest::test 3.10.5-invalid-7 { A LineTerminator is not an InputCharacter } { literal T3105i7 \r\n } {FAIL}
A LineTerminator is not an InputCharacterTest Case: 3.10.5-invalid-9Expected Result: FAIL
Regression Test:
tcltest::test 3.10.5-invalid-8 { A LineTerminator is not an InputCharacter } { literal T3105i8 {\u000d} } {FAIL}
A LineTerminator is not an InputCharacterTest Case: 3.10.5-invalid-10Expected Result: FAIL
Regression Test:
tcltest::test 3.10.5-invalid-9 { A LineTerminator is not an InputCharacter } { literal T3105i9 {\u000a} } {FAIL}
A LineTerminator is not an InputCharacterTest Case: 3.10.5-invalid-11Expected Result: FAIL
Regression Test:
tcltest::test 3.10.5-invalid-10 { A LineTerminator is not an InputCharacter } { literal T3105i10 {\u000d\u000a} } {FAIL}
" must be terminated with "Test Case: 3.10.5-valid-1Expected Result: FAIL
Regression Test:
tcltest::test 3.10.5-invalid-11 { " must be terminated with " } { compile [saveas T3105i11.java {class T3105i11 {String s = ";}}] } {FAIL}
example string literalTest Case: 3.10.5-valid-2Expected Result: PASS
Regression Test:
tcltest::test 3.10.5-valid-1 { example string literal } { literal T3105v1 "" } {PASS}
example string literalTest Case: 3.10.5-valid-3Expected Result: PASS
Regression Test:
tcltest::test 3.10.5-valid-2 { example string literal } { literal T3105v2 {This is a string} } {PASS}
example string literalTest Case: 3.10.5-valid-4Expected Result: PASS
Regression Test:
tcltest::test 3.10.5-valid-3 { example string literal } { literal T3105v3 {This is a " + "two-line string} } {PASS}
valid string literalTest Case: 3.10.5-valid-5Expected Result: PASS
Regression Test:
tcltest::test 3.10.5-valid-4 { valid string literal } { literal T3105v4 {\\} } {PASS}
valid string literalTest Case: 3.10.5-valid-6Expected Result: PASS
Regression Test:
tcltest::test 3.10.5-valid-5 { valid string literal } { literal T3105v5 {\'} } {PASS}
valid string literalTest Case: 3.10.5-valid-7Expected Result: PASS
Regression Test:
tcltest::test 3.10.5-valid-6 { valid string literal } { literal T3105v6 {\u03a9} } {PASS}
valid string literalTest Case: 3.10.5-valid-8Expected Result: PASS
Regression Test:
tcltest::test 3.10.5-valid-7 { valid string literal } { literal T3105v7 {\uFFFF} } {PASS}
valid string literalTest Case: 3.10.5-valid-9Expected Result: PASS
Regression Test:
tcltest::test 3.10.5-valid-8 { valid string literal } { literal T3105v8 {\177} } {PASS}
valid string literalTest Case: 3.10.5-valid-10Expected Result: PASS
Regression Test:
tcltest::test 3.10.5-valid-9 { valid string literal } { literal T3105v9 {\r} } {PASS}
valid string literalTest Case: 3.10.5-valid-11Expected Result: PASS
Regression Test:
tcltest::test 3.10.5-valid-10 { valid string literal } { literal T3105v10 {\n} } {PASS}
valid string literalTest Case: 3.10.5-valid-12Expected Result: PASS
Regression Test:
tcltest::test 3.10.5-valid-11 { valid string literal } { literal T3105v11 {\"} } {PASS}
valid string literalTest Case: 3.10.5-valid-13Expected Result: PASS
Regression Test:
tcltest::test 3.10.5-valid-12 { valid string literal } { literal T3105v12 ' } {PASS}
valid string literalTest Case: 3.10.5-valid-14Expected Result: PASS
Regression Test:
tcltest::test 3.10.5-valid-13 { valid string literal } { literal T3105v13 {\u001a} } {PASS}
valid string literalExpected Result: PASS
Regression Test:
tcltest::test 3.10.5-valid-14 { valid string literal } { literal T3105v14 \x1a } {PASS}
tests/jls/lexical-structure/literals/escape-sequences
\a (Alert, Ctrl-G) is not an escape sequenceTest Case: 3.10.7-invalid-2Expected Result: FAIL
Regression Test:
tcltest::test 3.10.7-invalid-1 { \a (Alert, Ctrl-G) is not an escape sequence } { sequence T3107i1 {\a} } {FAIL}
\v (Vertical tab, Ctrl-K) is not an escape sequenceTest Case: 3.10.7-invalid-3Expected Result: FAIL
Regression Test:
tcltest::test 3.10.7-invalid-2 { \v (Vertical tab, Ctrl-K) is not an escape sequence } { sequence T3107i2 {\v} } {FAIL}
\x (hex sequence) is not an escape sequenceTest Case: 3.10.7-invalid-4Expected Result: FAIL
Regression Test:
tcltest::test 3.10.7-invalid-3 { \x (hex sequence) is not an escape sequence } { sequence T3107i3 {\x0} } {FAIL}
\LineTerminator is not a valid line continuationTest Case: 3.10.7-invalid-5Expected Result: FAIL
Regression Test:
tcltest::test 3.10.7-invalid-4 { \LineTerminator is not a valid line continuation } { sequence T3107i4 a\\\n } {FAIL}
\u is not an escape sequence, since unicode is already expandedTest Case: 3.10.7-invalid-6Expected Result: FAIL
Regression Test:
tcltest::test 3.10.7-invalid-5 { \u is not an escape sequence, since unicode is already expanded } { sequence T3107i5 {\u005cu} } {FAIL}
octal escape sequences are limited at 0377Test Case: 3.10.7-invalid-7Expected Result: FAIL
Regression Test:
tcltest::test 3.10.7-invalid-6 { octal escape sequences are limited at 0377 } { sequence T3107i6 {\400} } {FAIL}
escape sequences are case-sensitiveTest Case: 3.10.7-invalid-8Expected Result: FAIL
Regression Test:
tcltest::test 3.10.7-invalid-7 { escape sequences are case-sensitive } { sequence T3107i7 {\N} } {FAIL}
escape sequences only occur within character and string literalsTest Case: 3.10.7-valid-1Expected Result: FAIL
Regression Test:
tcltest::test 3.10.7-invalid-8 { escape sequences only occur within character and string literals } { compile [saveas T3107i8.java "class T3107i8 { \\t }"] } {FAIL}
\b (Backspace, Ctrl-H, \u0008) is an escape sequenceTest Case: 3.10.7-valid-2Expected Result: PASS
Regression Test:
tcltest::test 3.10.7-valid-1 { \b (Backspace, Ctrl-H, \u0008) is an escape sequence } { sequence T3107v1 {\b} } {PASS}
\t (Tab, Ctrl-I, \u0009) is an escape sequenceTest Case: 3.10.7-valid-3Expected Result: PASS
Regression Test:
tcltest::test 3.10.7-valid-2 { \t (Tab, Ctrl-I, \u0009) is an escape sequence } { sequence T3107v2 {\t} } {PASS}
\n (Linefeed, Ctrl-J, \u000a) is an escape sequenceTest Case: 3.10.7-valid-4Expected Result: PASS
Regression Test:
tcltest::test 3.10.7-valid-3 { \n (Linefeed, Ctrl-J, \u000a) is an escape sequence } { sequence T3107v3 {\n} } {PASS}
\f (Formfeed, Ctrl-L, \u000c) is an escape sequenceTest Case: 3.10.7-valid-5Expected Result: PASS
Regression Test:
tcltest::test 3.10.7-valid-4 { \f (Formfeed, Ctrl-L, \u000c) is an escape sequence } { sequence T3107v4 {\f} } {PASS}
\r (Carriage Return, Ctrl-M, \u000d) is an escape sequenceTest Case: 3.10.7-valid-6Expected Result: PASS
Regression Test:
tcltest::test 3.10.7-valid-5 { \r (Carriage Return, Ctrl-M, \u000d) is an escape sequence } { sequence T3107v5 {\r} } {PASS}
\" (\u0022) is an escape sequenceTest Case: 3.10.7-valid-7Expected Result: PASS
Regression Test:
tcltest::test 3.10.7-valid-6 { \" (\u0022) is an escape sequence } { sequence T3107v6 {\"} } {PASS}
\' (\u0027) is an escape sequenceTest Case: 3.10.7-valid-8Expected Result: PASS
Regression Test:
tcltest::test 3.10.7-valid-7 { \' (\u0027) is an escape sequence } { sequence T3107v7 {\'} } {PASS}
\\ (\u005c) is an escape sequenceTest Case: 3.10.7-valid-9Expected Result: PASS
Regression Test:
tcltest::test 3.10.7-valid-8 { \\ (\u005c) is an escape sequence } { sequence T3107v8 {\\} } {PASS}
octal sequences can have one digitTest Case: 3.10.7-valid-10Expected Result: PASS
Regression Test:
tcltest::test 3.10.7-valid-9 { octal sequences can have one digit } { sequence T3107v9 {\5} } {PASS}
octal sequences can have two digitsTest Case: 3.10.7-valid-11Expected Result: PASS
Regression Test:
tcltest::test 3.10.7-valid-10 { octal sequences can have two digits } { sequence T3107v10 {\40} } {PASS}
octal sequences can have three digits, if the first is < 4Test Case: 3.10.7-valid-12Expected Result: PASS
Regression Test:
tcltest::test 3.10.7-valid-11 { octal sequences can have three digits, if the first is < 4 } { sequence T3107v11 {\012} } {PASS}
escape sequences may be written in unicodeTest Case: 3.10.7-valid-13Expected Result: PASS
Regression Test:
tcltest::test 3.10.7-valid-12 { escape sequences may be written in unicode } { sequence T3107v12 {\u005c\u005c} } {PASS}
an octal sequence with the first digit >= 4 has at most two digitsTest Case: 3.10.7-valid-14Expected Result: PASS
Regression Test:
tcltest::test 3.10.7-valid-13 { an octal sequence with the first digit >= 4 has at most two digits } { compile [saveas T3107v13.java { class T3107v13 { void foo(int i) { switch (i) { case 0: case (("\477" == "'7") ? 1 : 0): } } } }] } {PASS}
escape sequences represent characters with identical valueTest Case: 3.10.7-valid-15Expected Result: PASS
Regression Test:
tcltest::test 3.10.7-valid-14 { escape sequences represent characters with identical value } { compile [saveas T3107v14.java { class T3107v14 { void foo(int i) { switch (i) { case 0: case (('\t' == 9) ? 1 : 0): case (('\t' == '\011') ? 2 : 0): } } } }] } {PASS}
escape sequences represent the same character in a StringTest Case: 3.10.7-valid-16Expected Result: PASS
Regression Test:
tcltest::test 3.10.7-valid-15 { escape sequences represent the same character in a String } { compile [saveas T3107v15.java { class T3107v15 { void foo(int i) { switch (i) { case 0: case (("\b" == "\u0008") ? 1 : 0): case (("\10" == "\u0008") ? 2 : 0): } } } }] } {PASS}
escape sequences only occur within character and string literalsExpected Result: PASS
Regression Test:
tcltest::test 3.10.7-valid-16 { escape sequences only occur within character and string literals } { compile [saveas T3107v16.java { class T3107v16 { // Comment not ended here: \n int i = } }] } {PASS}
tests/jls/types-values-and-variables/variables/final-variables
final variable must be definitly assignedTest Case: 4.5.4-2Expected Result: FAIL
Regression Test:
tcltest::test 4.5.4-1 { final variable must be definitly assigned } { compile [saveas T4541.java { class T4541 { final int val; } }] } {FAIL}
final variable must be definitly assignedTest Case: 4.5.4-3Expected Result: PASS
Regression Test:
tcltest::test 4.5.4-2 { final variable must be definitly assigned } { compile [saveas T4542.java { class T4542 { final int val = 0; } }] } {PASS}
final variable must be definitly assignedTest Case: 4.5.4-4Expected Result: PASS
Regression Test:
tcltest::test 4.5.4-3 { final variable must be definitly assigned } { compile [saveas T4543.java { class T4543 { final int val; T4543() { val = 0; } } }] } {PASS}
final variable can only be assigned to onceTest Case: 4.5.4-5Expected Result: FAIL
Regression Test:
tcltest::test 4.5.4-4 { final variable can only be assigned to once } { compile [saveas T4544.java { class T4544 { final int val = 0; T4544() { val = 1; } } }] } {FAIL}
final variable must be assigned before it can be usedTest Case: 4.5.4-6Expected Result: FAIL
Regression Test:
tcltest::test 4.5.4-5 { final variable must be assigned before it can be used } { compile [saveas T4545.java { class T4545 { final int val; T4545() { int tmp = val; } } }] } {FAIL}
blank final variable must be assigned in every constructorTest Case: 4.5.4-7Expected Result: FAIL
Regression Test:
tcltest::test 4.5.4-6 { blank final variable must be assigned in every constructor } { compile [saveas T4546.java { class T4546 { final int val; T4546() { val = 0; } T4546(int foo) { } } }] } {FAIL}
a final variable can reference an Object, the reference can not change but the object being referenced can changeTest Case: 4.5.4-8Expected Result: PASS
Regression Test:
tcltest::test 4.5.4-7 { a final variable can reference an Object, the reference can not change but the object being referenced can change } { compile [saveas T4547.java { class T4547 { final StringBuffer sbuf = new StringBuffer(); void append() { sbuf.append("nuggy"); } } }] } {PASS}
a final variable can reference an array, the elements of the array can be modifiedExpected Result: PASS
Regression Test:
tcltest::test 4.5.4-8 { a final variable can reference an array, the elements of the array can be modified } { compile [saveas T4548.java { class T4548 { final Object[] objarr = {new Object(), new Object()}; void swap() { Object tmp = objarr[0]; objarr[0] = objarr[1]; objarr[1] = tmp; } } }] } {PASS}
tests/jls/conversions-and-promotions/kinds-of-conversion/identity-conversions
boolean identity conversionTest Case: 5.1.1-primitive-2Expected Result: PASS
Regression Test:
tcltest::test 5.1.1-primitive-1 { boolean identity conversion } { empty_class T511p1 { boolean b1 = (boolean) true; boolean b2 = (boolean) b1; boolean b3 = (boolean) (false != false); boolean b4 = (boolean) Boolean.TRUE.booleanValue(); } } {PASS}
byte identity conversionTest Case: 5.1.1-primitive-3Expected Result: PASS
Regression Test:
tcltest::test 5.1.1-primitive-2 { byte identity conversion } { empty_class T511p2 { static final byte b1 = 1; byte b2 = (byte) b1; byte b3 = (byte) (new Byte(Byte.MAX_VALUE).byteValue()); } } {PASS}
short identity conversionTest Case: 5.1.1-primitive-4Expected Result: PASS
Regression Test:
tcltest::test 5.1.1-primitive-3 { short identity conversion } { empty_class T511p3 { static final short s1 = 1; short s2 = (short) s1; short s3 = (short) (new Short(Short.MAX_VALUE).shortValue()); } } {PASS}
char identity conversionTest Case: 5.1.1-primitive-5Expected Result: PASS
Regression Test:
tcltest::test 5.1.1-primitive-4 { char identity conversion } { empty_class T511p4 { char c1 = (char) '1'; char c2 = (char) c1; char c3 = (char) (new Character(Character.MAX_VALUE).charValue()); } } {PASS}
int identity conversionTest Case: 5.1.1-primitive-6Expected Result: PASS
Regression Test:
tcltest::test 5.1.1-primitive-5 { int identity conversion } { empty_class T511p5 { int i1 = (int) 1; int i2 = (int) i1; int i3 = (int) (1 + 2); int i4 = (int) (new Integer(Integer.MAX_VALUE).intValue()); } } {PASS}
long identity conversionTest Case: 5.1.1-primitive-7Expected Result: PASS
Regression Test:
tcltest::test 5.1.1-primitive-6 { long identity conversion } { empty_class T511p6 { long l1 = (long) 1L; long l2 = (long) l1; long l3 = (long) (1L + 2L); long l4 = (long) (new Long(Long.MAX_VALUE).longValue()); } } {PASS}
float identity conversionTest Case: 5.1.1-primitive-8Expected Result: PASS
Regression Test:
tcltest::test 5.1.1-primitive-7 { float identity conversion } { empty_class T511p7 { float f1 = (float) 1.0f; float f2 = (float) f1; float f3 = (float) (1f + 2f); float f4 = (float) (new Float(Float.MAX_VALUE).floatValue()); } } {PASS}
double identity conversionTest Case: 5.1.1-reference-1Expected Result: PASS
Regression Test:
tcltest::test 5.1.1-primitive-8 { double identity conversion } { empty_class T511p8 { double d1 = (double) 1.0; double d2 = (double) d1; double d3 = (double) (1.0 + 2.0); double d4 = (double) (new Double(Double.MAX_VALUE).doubleValue()); } } {PASS}
reference identity conversion: ObjectTest Case: 5.1.1-reference-2Expected Result: PASS
Regression Test:
tcltest::test 5.1.1-reference-1 { reference identity conversion: Object } { empty_class T511r1 { Object o1 = (Object) new Object(); Object o2 = (Object) null; Object o3 = (Object) o1; Object o4 = (Object) o2; Object foo() { return new Object(); } Object o5 = (Object) foo(); } } {PASS}
reference identity conversion: StringTest Case: 5.1.1-reference-3Expected Result: PASS
Regression Test:
tcltest::test 5.1.1-reference-2 { reference identity conversion: String } { empty_class T511r2 { String s1 = (String) ""; String s2 = (String) null; String s3 = (String) s1; String s4 = (String) s2; String s5 = (String) ("1" + "2"); String s6 = (String) "1".concat("2"); } } {PASS}
reference identity conversion: this classTest Case: 5.1.1-reference-4Expected Result: PASS
Regression Test:
tcltest::test 5.1.1-reference-3 { reference identity conversion: this class } { empty_class T511r3 { T511r3 t1 = (T511r3) new T511r3(); T511r3 t2 = (T511r3) null; T511r3 t3 = (T511r3) t1; T511r3 t4 = (T511r3) t2; } } {PASS}
reference identity conversion: primitive arrayTest Case: 5.1.1-reference-5Expected Result: PASS
Regression Test:
tcltest::test 5.1.1-reference-4 { reference identity conversion: primitive array } { empty_class T511r4 { int[] ia1 = {1, 2}; int[] ia2 = (int[]) null; int[] ia3 = (int[]) ia1; int[] ia4 = (int[]) ia2; int[] foo() { return new int[0]; } int[] ia5 = (int[]) foo(); } } {PASS}
reference identity conversion: Object arrayTest Case: 5.1.1-null-1Expected Result: PASS
Regression Test:
tcltest::test 5.1.1-reference-5 { reference identity conversion: Object array } { empty_class T511r5 { Object[] oa1 = {new Object[1]}; Object[] oa2 = (Object[]) null; Object[] oa3 = (Object[]) oa1; Object[] oa4 = (Object[]) oa2; Object[] foo() { return new Object[0]; } Object[] oa5 = (Object[]) foo(); } } {PASS}
there is no such thing as null identity conversionExpected Result: FAIL
Regression Test:
tcltest::test 5.1.1-null-1 { there is no such thing as null identity conversion } { empty_class T511n1 { Object n = (null) null; } } {FAIL}
tests/jls/conversions-and-promotions/kinds-of-conversion/widening-primitive-conversions
int to float conversion may lose precisionTest Case: 5.1.2-itf-2Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-itf-1 { int to float conversion may lose precision } { constant_expression T512itf1 {1.23456792e8f == (float)123456789} } {PASS}
int to float conversion rounds down to nearest if remainder < .5Test Case: 5.1.2-itf-3Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-itf-2 { int to float conversion rounds down to nearest if remainder < .5} { constant_expression T512itf2 {(float)0x7fffff3f == (float)0x7fffff00} } {PASS}
int to float conversion rounds up to nearest if remainder > .5Test Case: 5.1.2-itf-4Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-itf-3 { int to float conversion rounds up to nearest if remainder > .5} { constant_expression T512itf3 {(float)0x70ffffc1 == (float)0x71000000} } {PASS}
int to float conversion rounds to least significant bit 0 if remainder = .5Test Case: 5.1.2-itf-5Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-itf-4 { int to float conversion rounds to least significant bit 0 if remainder = .5} { constant_expression T512itf4 {(float)0x7fffff40 == (float)0x7fffff00} } {PASS}
int to float conversion rounds to least significant bit 0 if remainder = .5Test Case: 5.1.2-itf-6Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-itf-5 { int to float conversion rounds to least significant bit 0 if remainder = .5} { constant_expression T512itf5 {(float)0x70ffffc0 == (float)0x71000000} } {PASS}
int to float boundary caseTest Case: 5.1.2-itf-7Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-itf-6 { int to float boundary case } { constant_expression T512itf6 {(float)Integer.MAX_VALUE == 2.14748365E9f} } {PASS}
int to float boundary caseTest Case: 5.1.2-itf-8Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-itf-7 { int to float boundary case } { constant_expression T512itf7 {(float)0 == 0f} {1/(float)0 == Float.POSITIVE_INFINITY} } {PASS}
int to float boundary caseTest Case: 5.1.2-itd-1Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-itf-8 { int to float boundary case } { constant_expression T512itf8 {(float)Integer.MIN_VALUE == -2.14748365E9f} } {PASS}
int to double conversion never loses precisionTest Case: 5.1.2-itd-2Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-itd-1 { int to double conversion never loses precision } { constant_expression T512itd1 {123456789.0 == (double)123456789} } {PASS}
int to double boundary caseTest Case: 5.1.2-itd-3Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-itd-2 { int to double boundary case } { constant_expression T512itd2 {(double)Integer.MAX_VALUE == 2.147483647E9} } {PASS}
int to double boundary caseTest Case: 5.1.2-itd-4Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-itd-3 { int to double boundary case } { constant_expression T512itd3 {(double)0 == 0.0} {1/(double)0 == Double.POSITIVE_INFINITY} } {PASS}
int to double boundary caseTest Case: 5.1.2-ltf-1Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-itd-4 { int to double boundary case } { constant_expression T512itd4 {(double)Integer.MIN_VALUE == -2.147483648e9} } {PASS}
long to float conversion may lose precisionTest Case: 5.1.2-ltf-2Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-ltf-1 { long to float conversion may lose precision } { constant_expression T512ltf1 {1.23456792e8f == (float)123456789L} } {PASS}
long to float conversion rounds down to nearest if remainder < .5Test Case: 5.1.2-ltf-3Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-ltf-2 { long to float conversion rounds down to nearest if remainder < .5} { constant_expression T512ltf2 {(float)0x7fffff3fL == (float)0x7fffff00L} } {PASS}
long to float conversion rounds up to nearest if remainder > .5Test Case: 5.1.2-ltf-4Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-ltf-3 { long to float conversion rounds up to nearest if remainder > .5} { constant_expression T512ltf3 {(float)0x7fffffc1L == (float)0x80000000L} } {PASS}
long to float conversion rounds to least significant bit 0 if remainder = .5Test Case: 5.1.2-ltf-5Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-ltf-4 { long to float conversion rounds to least significant bit 0 if remainder = .5} { constant_expression T512ltf4 {(float)0x7fffff40L == (float)0x7fffff00L} } {PASS}
long to float conversion rounds to least significant bit 0 if remainder = .5Test Case: 5.1.2-ltf-6Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-ltf-5 { long to float conversion rounds to least significant bit 0 if remainder = .5} { constant_expression T512ltf5 {(float)0x7fffffc0L == (float)0x80000000L} } {PASS}
long to float conversion rounds down to nearest if remainder < .5Test Case: 5.1.2-ltf-7Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-ltf-6 { long to float conversion rounds down to nearest if remainder < .5} { constant_expression T512ltf6 {(float)0xffffff7ffffffbfL == (float)0xffffff000000000L} } {PASS}
long to float conversion rounds down to nearest if remainder < .5Test Case: 5.1.2-ltd-1Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-ltf-7 { long to float conversion rounds down to nearest if remainder < .5} { constant_expression T512ltf7 {(float)0xffffff7ffffffffL == (float)0xffffff000000000L} } {PASS}
long to double conversion may lose precisionTest Case: 5.1.2-ltd-2Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-ltd-1 { long to double conversion may lose precision } { constant_expression T512ltd1 {0x123456789abcde0L == (double)0x123456789abcde7L} } {PASS}
long to double conversion rounds down to nearest if remainder < .5Test Case: 5.1.2-ltd-3Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-ltd-2 { long to double conversion rounds down to nearest if remainder < .5} { constant_expression T512ltd2 {(double)0xffffff7ffffffbfL == 0xffffff7ffffff80L} } {PASS}
long to double conversion rounds up to nearest if remainder > .5Test Case: 5.1.2-ltd-4Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-ltd-3 { long to double conversion rounds up to nearest if remainder > .5} { constant_expression T512ltd3 {(double)0xffffff7ffffffc1L == 0xffffff800000000L} } {PASS}
long to double conversion rounds to least significant bit 0 if remainder = .5Test Case: 5.1.2-ltd-5Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-ltd-4 { long to double conversion rounds to least significant bit 0 if remainder = .5} { constant_expression T512ltd4 {(double)0xffffff7ffffff40L == 0xffffff7ffffff00L} } {PASS}
long to double conversion rounds to least significant bit 0 if remainder = .5Test Case: 5.1.2-ftd-1Expected Result: PASS
Regression Test:
tcltest::test 5.1.2-ltd-5 { long to double conversion rounds to least significant bit 0 if remainder = .5} { constant_expression T512ltd5 {(double)0xffffff7ffffffc0L == 0xffffff800000000L} } {PASS}
float to double conversion never loses precisionExpected Result: PASS
Regression Test:
tcltest::test 5.1.2-ftd-1 { float to double conversion never loses precision } { constant_expression T512ftd1 {(double)1234567.75f == 1234567.75} } {PASS}
tests/jls/conversions-and-promotions/kinds-of-conversion/narrowing-primitive-conversions
narrowing from float NaN to int produces 0Test Case: 5.1.3-nan-2Expected Result: PASS
Regression Test:
tcltest::test 5.1.3-nan-1 { narrowing from float NaN to int produces 0 } { constant_expression T513nan1 {(int) Float.NaN == 0} {(int) -Float.NaN == 0} } {PASS}
narrowing from double NaN to int produces 0Test Case: 5.1.3-nan-3Expected Result: PASS
Regression Test:
tcltest::test 5.1.3-nan-2 { narrowing from double NaN to int produces 0 } { constant_expression T513nan2 {(int) Double.NaN == 0} {(int) -Double.NaN == 0} } {PASS}
narrowing from float NaN to long produces 0Test Case: 5.1.3-nan-4Expected Result: PASS
Regression Test:
tcltest::test 5.1.3-nan-3 { narrowing from float NaN to long produces 0 } { constant_expression T513nan3 {(long) Float.NaN == 0L} {(long) -Float.NaN == 0L} } {PASS}
narrowing from double NaN to long produces 0Test Case: 5.1.3-nan-5Expected Result: PASS
Regression Test:
tcltest::test 5.1.3-nan-4 { narrowing from double NaN to long produces 0 } { constant_expression T513nan4 {(long) Double.NaN == 0L} {(long) -Double.NaN == 0L} } {PASS}
narrowing from double NaN to float produces NaNTest Case: 5.1.3-dtf-1Expected Result: PASS
Regression Test:
tcltest::test 5.1.3-nan-5 { narrowing from double NaN to float produces NaN } { constant_expression T513nan5 {(float) Double.NaN != (float) Double.NaN} } {PASS}
narrowing from double to float can overflowTest Case: 5.1.3-dtf-2Expected Result: PASS
Regression Test:
tcltest::test 5.1.3-dtf-1 { narrowing from double to float can overflow } { constant_expression T513dtf1 {(float) 1e100 == Float.POSITIVE_INFINITY} } {PASS}
narrowing from double to float can underflowTest Case: 5.1.3-dtf-3Expected Result: PASS
Regression Test:
tcltest::test 5.1.3-dtf-2 { narrowing from double to float can underflow } { constant_expression T513dtf2 {(float) 1e-100 == 0.0f} } {PASS}
narrowing from double to float rounds down if remainder < .5Test Case: 5.1.3-dtf-4Expected Result: PASS
Regression Test:
tcltest::test 5.1.3-dtf-3 { narrowing from double to float rounds down if remainder < .5 } { constant_expression T513dtf3 {(float)(double)0x8000ff7ffffL == (float)0x8000ff00000L} } {PASS}
narrowing from double to float rounds up if remainder > .5Test Case: 5.1.3-dtf-5Expected Result: PASS
Regression Test:
tcltest::test 5.1.3-dtf-4 { narrowing from double to float rounds up if remainder > .5 } { constant_expression T513dtf4 {(float)(double)0x8000ff80001L == (float)0x80010000000L} } {PASS}
narrowing from double to float rounds to lsb 0 if remainder == .5Test Case: 5.1.3-dtf-6Expected Result: PASS
Regression Test:
tcltest::test 5.1.3-dtf-5 { narrowing from double to float rounds to lsb 0 if remainder == .5 } { constant_expression T513dtf5 {(float)(double)0x8000ff80000L == (float)0x80010000000L} } {PASS}
narrowing from double to float rounds to lsb 0 if remainder == .5Test Case: 5.1.3-dtf-7Expected Result: PASS
Regression Test:
tcltest::test 5.1.3-dtf-6 { narrowing from double to float rounds to lsb 0 if remainder == .5 } { constant_expression T513dtf6 {(float)(double)0x8000f080000L == (float)0x8000f000000L} } {PASS}
narrowing from double to denorm float rounds to nearestExpected Result: PASS
Regression Test:
tcltest::test 5.1.3-dtf-7 { narrowing from double to denorm float rounds to nearest } { constant_expression T513dtf7 {(float)5.877475257357598E-39 == 5.877475e-39f} {(float)5.8774752573576E-39 == 5.877476e-39f} {(float)5.87747595800683E-39 == 5.877476e-39f} {(float)5.877476658656061E-39 == 5.877476e-39f} {(float)5.877476658656063E-39 == 5.877477e-39f} } {PASS}
tests/jls/conversions-and-promotions/assignment-conversion
Assignment conversion may narrow if constant expression is representable in new typeTest Case: 5.2-narrow-2Expected Result: PASS
Regression Test:
tcltest::test 5.2-narrow-1 { Assignment conversion may narrow if constant expression is representable in new type } { empty_main T52n1 { final int i = 1; byte b = i; } } {PASS}
Assignment conversion may narrow if constant expression is representable in new typeTest Case: 5.2-narrow-3Expected Result: PASS
Regression Test:
tcltest::test 5.2-narrow-2 { Assignment conversion may narrow if constant expression is representable in new type } { empty_main T52n2 { final int i = 1; char c = i; } } {PASS}
Assignment conversion may narrow if constant expression is representable in new typeTest Case: 5.2-narrow-4Expected Result: PASS
Regression Test:
tcltest::test 5.2-narrow-3 { Assignment conversion may narrow if constant expression is representable in new type } { empty_main T52n3 { final int i = 1; short s = i; } } {PASS}
Assignment conversion may narrow if constant expression is representable in new typeTest Case: 5.2-narrow-5Expected Result: PASS
Regression Test:
tcltest::test 5.2-narrow-4 { Assignment conversion may narrow if constant expression is representable in new type } { empty_main T52n4 { final short s = 1; byte b = s; } } {PASS}
Assignment conversion may narrow if constant expression is representable in new typeTest Case: 5.2-narrow-6Expected Result: PASS
Regression Test:
tcltest::test 5.2-narrow-5 { Assignment conversion may narrow if constant expression is representable in new type } { empty_main T52n5 { final short s = 1; char c = s; } } {PASS}
Assignment conversion may narrow if constant expression is representable in new typeTest Case: 5.2-narrow-7Expected Result: PASS
Regression Test:
tcltest::test 5.2-narrow-6 { Assignment conversion may narrow if constant expression is representable in new type } { empty_main T52n6 { final byte b = 1; char c = b; } } {PASS}
Assignment conversion may narrow if constant expression is representable in new typeTest Case: 5.2-narrow-8Expected Result: PASS
Regression Test:
tcltest::test 5.2-narrow-7 { Assignment conversion may narrow if constant expression is representable in new type } { empty_main T52n7 { final char c = 1; byte b = c; } } {PASS}
Assignment conversion may narrow if constant expression is representable in new typeExpected Result: PASS
Regression Test:
tcltest::test 5.2-narrow-8 { Assignment conversion may narrow if constant expression is representable in new type } { empty_main T52n8 { final short s = 1; char c = s; } } {PASS}
tests/jls/names/scope-of-a-declaration
symbol used in field initialization must be defined before it can be usedTest Case: 6.3-2Expected Result: FAIL
Regression Test:
tcltest::test 6.3-1 { symbol used in field initialization must be defined before it can be used } { compile [saveas IllegalForwardReference.java { public class IllegalForwardReference { int a = b; int b = 0; } }] } {FAIL}
forward reference to a field outside of an initializer is legalTest Case: 6.3-3Expected Result: PASS
Regression Test:
tcltest::test 6.3-2 { forward reference to a field outside of an initializer is legal } { compile [saveas LegalForwardReference.java { public class LegalForwardReference { void foo() { a = 1; } int a; } }] } {PASS}
use of a class before it is defined is legalTest Case: 6.3-4Expected Result: PASS
Regression Test:
tcltest::test 6.3-3 { use of a class before it is defined is legal } { compile [saveas UseOfTypeBeforeDeclaration.java { public class UseOfTypeBeforeDeclaration { Object o = new UseOfTypeBeforeDeclaration_Type(); } class UseOfTypeBeforeDeclaration_Type { Object o = new UseOfTypeBeforeDeclaration(); } }] } {PASS}
the scope of a class includes every known member of the package, so we should be able to make a forward refExpected Result: PASS
Regression Test:
tcltest::test 6.3-4 { the scope of a class includes every known member of the package, so we should be able to make a forward ref } { saveas GlobalOne.java { public class GlobalOne { void foo() { Object o = new GlobalTwo(); } } } saveas GlobalTwo.java { public class GlobalTwo { void foo() { Object o = new GlobalOne(); } } } compile GlobalOne.java GlobalTwo.java } {PASS}
tests/jls/names/members-and-inheritance/members-of-a-class-type
interface member reference can not be ambiguousTest Case: 6.4.2-2Expected Result: FAIL
Regression Test:
tcltest::test 6.4.2-1 { interface member reference can not be ambiguous } { saveas AmbiguousInterfaceMember.java { interface One { int VAL = 1; } interface Two { int VAL = 2; } class AmbiguousInterfaceMember implements One, Two { int i = VAL; } } compile AmbiguousInterfaceMember.java } {FAIL}
a qualified reference is not ambiguousExpected Result: PASS
Regression Test:
tcltest::test 6.4.2-2 { a qualified reference is not ambiguous } { saveas QualifiedInterfaceMember.java { interface One { int VAL = 1; } interface Two { int VAL = 2; } class QualifiedInterfaceMember implements One, Two { int i = One.VAL; } } compile QualifiedInterfaceMember.java } {PASS}
tests/jls/names/members-and-inheritance/members-of-an-interface-type
interface member reference can not be ambiguousTest Case: 6.4.3-2Expected Result: FAIL
Regression Test:
tcltest::test 6.4.3-1 { interface member reference can not be ambiguous } { saveas AmbiguousExtendedInterfaceMember.java { interface One { int VAL = 1; } interface Two { int VAL = 2; } interface AmbiguousExtendedInterfaceMember extends One, Two { int i = VAL; } } compile AmbiguousExtendedInterfaceMember.java } {FAIL}
a qualified reference is not ambiguousExpected Result: PASS
Regression Test:
tcltest::test 6.4.3-2 { a qualified reference is not ambiguous } { saveas QualifiedExtendedInterfaceMember.java { interface One { int VAL = 1; } interface Two { int VAL = 2; } interface QualifiedExtendedInterfaceMember extends One, Two { int i = Two.VAL; } } compile QualifiedExtendedInterfaceMember.java } {PASS}
tests/jls/names/members-and-inheritance/members-of-an-array-type
An array object should be able to access methods defined in the java.lang.Object classTest Case: 6.4.4-2Expected Result: PASS
Regression Test:
tcltest::test 6.4.4-1 { An array object should be able to access methods defined in the java.lang.Object class } { compile [saveas ArrayIsObject.java { public class ArrayIsObject { public static void main(String[] args) { int len = args.length; System.out.println(len); Class c = args.getClass(); System.out.println(c); String s = args.toString(); System.out.println(s); } } }] } {PASS}
the length member of an array is an intTest Case: 6.4.4-3Expected Result: PASS
Regression Test:
tcltest::test 6.4.4-2 { the length member of an array is an int } { compile [saveas ArrayLengthIsInt.java { public class ArrayLengthIsInt { void foo() { int[] foo = new int[3]; int val = foo.length; } } }] } {PASS}
compile error on attempt to change array length memberExpected Result: FAIL
Regression Test:
tcltest::test 6.4.4-3 { compile error on attempt to change array length member } { compile [saveas ArrayLengthIsFinal.java { public class ArrayLengthIsFinal { void foo() { int[] foo = new int[3]; foo.length = 4; } } }] } {FAIL}
tests/jls/names/access-control/determining-accessibility
A class declared public is accessible from outside the packageTest Case: 6.6.1-2Expected Result: PASS
Regression Test:
tcltest::test 6.6.1-1 {A class declared public is accessible from outside the package} { saveas AccessPublicClassInPackage.java { public class AccessPublicClassInPackage { pkg.PublicClass ref; } } saveas pkg/PublicClass.java { package pkg; public class PublicClass {} } compile AccessPublicClassInPackage.java pkg/PublicClass.java } {PASS}
A class declared public is accessible from outside the package when the .java source is loaded from the CLASSPATHTest Case: 6.6.1-3Expected Result: PASS
Regression Test:
tcltest::test 6.6.1-2 {A class declared public is accessible from outside the package when the .java source is loaded from the CLASSPATH} { delete pkg/PublicClass.class saveas AccessPublicClassInPackage.java { public class AccessPublicClassInPackage { pkg.PublicClass ref; } } compile -classpath . AccessPublicClassInPackage.java } {PASS}
An class declared public is accessible from outside the package when the .class file is loaded from the CLASSPATHTest Case: 6.6.1-4Expected Result: PASS PASS
Regression Test:
tcltest::test 6.6.1-3 {An class declared public is accessible from outside the package when the .class file is loaded from the CLASSPATH} { saveas AccessPublicClassInPackage.java { public class AccessPublicClassInPackage { pkg.PublicClass ref; } } saveas pkg/PublicClass.java { package pkg; public class PublicClass {} } list [compile pkg/PublicClass.java] [compile -classpath . AccessPublicClassInPackage.java] } {PASS PASS}
An interface declared public is accessible from outside the packageTest Case: 6.6.1-5Expected Result: PASS
Regression Test:
tcltest::test 6.6.1-4 {An interface declared public is accessible from outside the package} { saveas AccessPublicInterfaceInPackage.java { public class AccessPublicInterfaceInPackage { pkg.PublicInterface ref; } } saveas pkg/PublicInterface.java { package pkg; public interface PublicInterface {} } compile AccessPublicInterfaceInPackage.java pkg/PublicInterface.java } {PASS}
An interface declared public is accessible from outside the package when the .java source is loaded from the CLASSPATHTest Case: 6.6.1-6Expected Result: PASS
Regression Test:
tcltest::test 6.6.1-5 {An interface declared public is accessible from outside the package when the .java source is loaded from the CLASSPATH} { delete pkg/PublicInterface.class compile -classpath . AccessPublicInterfaceInPackage.java } {PASS}
An interface declared public is accessible from outside the package when the .class file is loaded from the CLASSPATHTest Case: 6.6.1-7Expected Result: PASS PASS
Regression Test:
tcltest::test 6.6.1-6 {An interface declared public is accessible from outside the package when the .class file is loaded from the CLASSPATH} { delete pkg/PublicInterface.class list [compile pkg/PublicInterface.java] [compile -classpath . AccessPublicInterfaceInPackage.java] } {PASS PASS}
Access a public class from inside the packageTest Case: 6.6.1-8Expected Result: PASS
Regression Test:
tcltest::test 6.6.1-7 {Access a public class from inside the package} { saveas pkg/AccessPublicClass.java { package pkg; public class AccessPublicClass { PublicClass ref; } } compile pkg/AccessPublicClass.java pkg/PublicClass.java } {PASS}
A class declared with default access is inaccessible from outside the packageTest Case: 6.6.1-9Expected Result: FAIL
Regression Test:
tcltest::test 6.6.1-8 {A class declared with default access is inaccessible from outside the package} { saveas AccessDefaultClassInPackage.java { public class AccessDefaultClassInPackage { pkg.DefaultClass ref; } } saveas pkg/DefaultClass.java { package pkg; class DefaultClass {} } compile AccessDefaultClassInPackage.java pkg/DefaultClass.java } {FAIL}
A class declared with default access is inaccessible from outside the package when the .java source is loaded from the CLASSPATHTest Case: 6.6.1-10Expected Result: FAIL
Regression Test:
tcltest::test 6.6.1-9 {A class declared with default access is inaccessible from outside the package when the .java source is loaded from the CLASSPATH} { delete pkg/DefaultClass.class compile -classpath . AccessDefaultClassInPackage.java } {FAIL}
A class declared with default access is inaccessible from outside the package when the .class file is loaded from the CLASSPATHTest Case: 6.6.1-11Expected Result: PASS FAIL
Regression Test:
tcltest::test 6.6.1-10 {A class declared with default access is inaccessible from outside the package when the .class file is loaded from the CLASSPATH} { delete pkg/DefaultClass.class list [compile pkg/DefaultClass.java] [compile -classpath . AccessDefaultClassInPackage.java] } {PASS FAIL}
An interface declared with default access is inaccessible from outside the packageTest Case: 6.6.1-12Expected Result: FAIL
Regression Test:
tcltest::test 6.6.1-11 {An interface declared with default access is inaccessible from outside the package} { saveas AccessDefaultInterfaceInPackage.java { public class AccessDefaultInterfaceInPackage { pkg.DefaultInterface ref; } } saveas pkg/DefaultInterface.java { package pkg; interface DefaultInterface {} } compile AccessDefaultInterfaceInPackage.java pkg/DefaultInterface.java } {FAIL}
An interface declared with default access is inaccessible from outside the package when the .java source is loaded from the CLASSPATHTest Case: 6.6.1-13Expected Result: FAIL
Regression Test:
tcltest::test 6.6.1-12 {An interface declared with default access is inaccessible from outside the package when the .java source is loaded from the CLASSPATH} { delete pkg/DefaultInterface.class compile -classpath . AccessDefaultInterfaceInPackage.java } {FAIL}
An interface declared with default access is inaccessible from outside the package when the .class file is loaded from the CLASSPATHTest Case: 6.6.1-14Expected Result: PASS FAIL
Regression Test:
tcltest::test 6.6.1-13 {An interface declared with default access is inaccessible from outside the package when the .class file is loaded from the CLASSPATH} { delete pkg/DefaultInterface.class list [compile pkg/DefaultInterface.java] [compile -classpath . AccessDefaultInterfaceInPackage.java] } {PASS FAIL}
Access a default class from inside the packageExpected Result: PASS
Regression Test:
tcltest::test 6.6.1-14 {Access a default class from inside the package} { saveas pkg/AccessDefaultClass.java { package pkg; public class AccessDefaultClass { DefaultClass ref; } } compile pkg/AccessDefaultClass.java pkg/DefaultClass.java } {PASS}
tests/jls/packages/compilation-units
A compilation unit may be emptyTest Case: 7.3-2Expected Result: PASS
Regression Test:
tcltest::test 7.3-1 { A compilation unit may be empty } { compile [saveas T731.java {}] } {PASS}
A compilation unit may contain only a package statementTest Case: 7.3-3Expected Result: PASS
Regression Test:
tcltest::test 7.3-2 { A compilation unit may contain only a package statement } { compile [saveas test/T732.java {package test;}] } {PASS}
A compilation unit may contain only import statementsTest Case: 7.3-4Expected Result: PASS
Regression Test:
tcltest::test 7.3-3 { A compilation unit may contain only import statements } { compile [saveas T733.java {import java.io.*;}] } {PASS}
A compilation unit may contain only a type declarationTest Case: 7.3-5Expected Result: PASS
Regression Test:
tcltest::test 7.3-4 { A compilation unit may contain only a type declaration } { compile [saveas T734.java {class T734 {}}] } {PASS}
Type declarations are optional in compilation unitsTest Case: 7.3-6Expected Result: PASS
Regression Test:
tcltest::test 7.3-5 { Type declarations are optional in compilation units } { compile [saveas test/T735.java {package test; import java.io.*;}] } {PASS}
Package declarations are optional in compilation unitsTest Case: 7.3-7Expected Result: PASS
Regression Test:
tcltest::test 7.3-6 { Package declarations are optional in compilation units } { compile [saveas T736.java {import java.io.*; class T736 {}}] } {PASS}
Import declarations are optional in compilation unitsTest Case: 7.3-8Expected Result: PASS
Regression Test:
tcltest::test 7.3-7 { Import declarations are optional in compilation units } { compile [saveas test/T737.java {package test; class T737 {}}] } {PASS}
Compilation units may contain package, import, and type-declarationsTest Case: 7.3-9Expected Result: PASS
Regression Test:
tcltest::test 7.3-8 { Compilation units may contain package, import, and type-declarations } { compile [saveas test/T738.java {package test; import java.io.*; class T738 {}}] } {PASS}
package must come before importTest Case: 7.3-10Expected Result: FAIL
Regression Test:
tcltest::test 7.3-9 { package must come before import } { compile [saveas test/T739.java {import java.io.*; package test;}] } {FAIL}
package must come before type-declarationsTest Case: 7.3-11Expected Result: FAIL
Regression Test:
tcltest::test 7.3-10 { package must come before type-declarations } { compile [saveas test/T7310.java {class T7310 {} package test;}] } {FAIL}
import must come before type-declarationsTest Case: 7.3-12Expected Result: FAIL
Regression Test:
tcltest::test 7.3-11 { import must come before type-declarations } { compile [saveas T7311.java {class T7311 {} import java.io.*;}] } {FAIL}
import must come before type-declarations, in this case, the extra ;Test Case: 7.3-13Expected Result: FAIL
Regression Test:
tcltest::test 7.3-12 { import must come before type-declarations, in this case, the extra ; } { compile [saveas test/T7312.java {package test;; import java.io.*;}] } {FAIL}
Every compilation unit implicitly imports every public type from java.langExpected Result: PASS
Regression Test:
tcltest::test 7.3-13 { Every compilation unit implicitly imports every public type from java.lang } { compile [saveas test/T7313.java { package test; class T7313 { Object o; String s; Integer i; } }] } {PASS}
tests/jls/packages/package-declarations/named-packages
compiler should not generate error when compiling a class with a package statement that defines a package that can not be located on the CLASSPATH.Expected Result: PASS
Regression Test:
tcltest::test 7.4.1-1 {compiler should not generate error when compiling a class with a package statement that defines a package that can not be located on the CLASSPATH.} { compile [saveas ClassInNewPackage.java { package some_package_that_is_not_known_at_compile_time; public class ClassInNewPackage {} }] } {PASS}
tests/jls/packages/package-declarations/unnamed-packages
Create a public class in the default packageTest Case: 7.4.2-2Expected Result: PASS
Regression Test:
tcltest::test 7.4.2-1 {Create a public class in the default package} { saveas ClassInDefaultPackage.java { public class ClassInDefaultPackage {} class ClassInDefaultPackage_Test extends ClassInDefaultPackage {} } compile ClassInDefaultPackage.java } {PASS}
Extend a class in the default package with another class in default packageExpected Result: PASS
Regression Test:
tcltest::test 7.4.2-2 {Extend a class in the default package with another class in default package} { saveas ExtendClassInDefaultPackage.java { class ExtendClassInDefaultPackage extends ClassInDefaultPackage {} } compile ClassInDefaultPackage.java ExtendClassInDefaultPackage.java } {PASS}
tests/jls/packages/import-declarations/single-type-import-declaration
Doing an import of a class that does not exist should failTest Case: 7.5.1-2Expected Result: FAIL
Regression Test:
tcltest::test 7.5.1-1 {Doing an import of a class that does not exist should fail} { compile [saveas FailImportDoesNotExist.java { package foo; import a_class_that_does_not_exist; public class FailImportDoesNotExist extends Object; }] } {FAIL}
Extend a public class in the default package with a class in another packageTest Case: 7.5.1-3Expected Result: PASS
Regression Test:
tcltest::test 7.5.1-2 {Extend a public class in the default package with a class in another package} { saveas ClassInDefaultPackage.java { public class ClassInDefaultPackage {} class ClassInDefaultPackage_Test extends ClassInDefaultPackage {} } saveas ClassInDefaultPackage_ImportFromGlobal.java { package foo; import ClassInDefaultPackage; public class ClassInDefaultPackage_ImportFromGlobal extends ClassInDefaultPackage {} } compile ClassInDefaultPackage.java ClassInDefaultPackage_ImportFromGlobal.java } {PASS}
Importing a non public class from the global package should failExpected Result: FAIL
Regression Test:
tcltest::test 7.5.1-3 {Importing a non public class from the global package should fail} { saveas ClassInDefaultPackage_FailImportFromGlobal.java { package foo; import ClassInDefaultPackage_Test; public class ClassInDefaultPackage_FailImportFromGlobal extends ClassInDefaultPackage_Test {} } compile ClassInDefaultPackage.java ClassInDefaultPackage_FailImportFromGlobal.java } {FAIL}
tests/jls/packages/import-declarations/type-import-on-demand-declaration
import *; is not a valid import statementExpected Result: FAIL
Regression Test:
tcltest::test 7.5.2-1 {import *; is not a valid import statement} { compile [saveas ImportAllFromGlobal.java { package foo; import *; public class ImportAllFromGlobal {} }] } {FAIL}
tests/jls/packages/top-level-type-declarations
; is a valid top-level TypeDeclarationTest Case: 7.6-syntax-2Expected Result: PASS
Regression Test:
tcltest::test 7.6-syntax-1 { ; is a valid top-level TypeDeclaration } { compile [saveas T76syntax1.java {;}] } {PASS}
top-level TypeDeclarationTest Case: 7.6-syntax-3Expected Result: PASS
Regression Test:
tcltest::test 7.6-syntax-2 { top-level TypeDeclaration } { compile [saveas T76syntax2.java { class T76syntax2 {} }] } {PASS}
top-level TypeDeclarationTest Case: 7.6-scope-1Expected Result: PASS
Regression Test:
tcltest::test 7.6-syntax-3 { top-level TypeDeclaration } { compile [saveas T76syntax3.java { interface T76syntax3 {} }] } {PASS}
TypeDeclaration within a package must have a unique IdentifierTest Case: 7.6-scope-2Expected Result: FAIL
Regression Test:
tcltest::test 7.6-scope-1 { TypeDeclaration within a package must have a unique Identifier } { compile [saveas T76scope1.java { class Point {} interface Point {} }] } {FAIL}
TypeDeclaration cannot conflict with single-type-importsTest Case: 7.6-scope-3Expected Result: FAIL
Regression Test:
tcltest::test 7.6-scope-2 { TypeDeclaration cannot conflict with single-type-imports } { compile [saveas T76scope2.java { import java.util.Vector; class Vector {} }] } {FAIL}
TypeDeclaration may shadow types in general importsTest Case: 7.6-scope-4Expected Result: PASS
Regression Test:
tcltest::test 7.6-scope-3 { TypeDeclaration may shadow types in general imports } { compile [saveas T76scope3.java { import java.util.*; class Vector {} }] } {PASS}
TypeDeclaration may have forward references within a compilation unitTest Case: 7.6-name-1Expected Result: PASS
Regression Test:
tcltest::test 7.6-scope-4 { TypeDeclaration may have forward references within a compilation unit } { compile [saveas T76scope4.java { class first { second a; } class second { first b; } }] } {PASS}
Test fully qualified toplevel type nameTest Case: 7.6-name-2Expected Result: PASS
Regression Test:
tcltest::test 7.6-name-1 { Test fully qualified toplevel type name } { compile [saveas one/pclass.java { package one; public class pclass {} }] [saveas numbertest.java { class pclasstest extends one.pclass {} }] } {PASS}
Test fully qualified toplevel type nameTest Case: 7.6-name-3Expected Result: PASS
Regression Test:
tcltest::test 7.6-name-2 { Test fully qualified toplevel type name } { compile [saveas one/pinterface.java { package one; public interface pinterface {} }] [saveas pinterfacetest.java { interface pinterfacetest extends one.pinterface {} }] } {PASS}
TypeDeclaration need not be related to the file name if class is not publicTest Case: 7.6-optional-restrictions-1Expected Result: PASS
Regression Test:
tcltest::test 7.6-name-3 { TypeDeclaration need not be related to the file name if class is not public } { compile [saveas 76name3.java { class Unrelated {} }] } {PASS}
Multiple classes may reside within a compilation unit, if secondary classes are not public and not referenced in other filesTest Case: 7.6-modifiers-1Expected Result: PASS
Regression Test:
tcltest::test 7.6-optional-restrictions-1 { Multiple classes may reside within a compilation unit, if secondary classes are not public and not referenced in other files } { saveas one.java { class one { three three; } class three extends two {} } saveas two.java { class two extends one {} } compile two.java } {PASS}
Top-level types may not be staticTest Case: 7.6-modifiers-2Expected Result: FAIL
Regression Test:
tcltest::test 7.6-modifiers-1 { Top-level types may not be static } { compile [saveas T76modifiers1.java {static class T76modifiers1.java {}}] } {FAIL}
Top-level types may not be protectedTest Case: 7.6-modifiers-3Expected Result: FAIL
Regression Test:
tcltest::test 7.6-modifiers-2 { Top-level types may not be protected } { compile [saveas T76modifiers2.java {protected class T76modifiers2 {}}] } {FAIL}
Top-level types may not be privateExpected Result: FAIL
Regression Test:
tcltest::test 7.6-modifiers-3 { Top-level types may not be private } { compile [saveas T76modifiers3.java {private class T76modifiers3 {}}] } {FAIL}
tests/jls/classes/class-declaration/class-modifiers
public is valid ClassModifierTest Case: 8.1.1-valid-modifier-2Expected Result: PASS
Regression Test:
tcltest::test 8.1.1-valid-modifier-1 { public is valid ClassModifier } { compile [saveas T811vm1.java { public class T811vm1 {} }] } {PASS}
abstract is valid ClassModifierTest Case: 8.1.1-valid-modifier-3Expected Result: PASS
Regression Test:
tcltest::test 8.1.1-valid-modifier-2 { abstract is valid ClassModifier } { compile [saveas T811vm2.java { abstract class T811vm2 {} }] } {PASS}
final is valid ClassModifierTest Case: 8.1.1-valid-modifier-4Expected Result: PASS
Regression Test:
tcltest::test 8.1.1-valid-modifier-3 { final is valid ClassModifier } { compile [saveas T811vm3.java { final class T811vm3 {} }] } {PASS}
strictfp is valid ClassModifierTest Case: 8.1.1-duplicate-modifier-1Expected Result: PASS
Regression Test:
tcltest::test 8.1.1-valid-modifier-4 { strictfp is valid ClassModifier } { compile [saveas T811vm4.java { strictfp class T811vm4 {} }] } {PASS}
compile time error to specify a class modifier twiceTest Case: 8.1.1-duplicate-modifier-2Expected Result: FAIL
Regression Test:
tcltest::test 8.1.1-duplicate-modifier-1 { compile time error to specify a class modifier twice } { compile [saveas T811dm1.java { public public class T811dm1 {} }] } {FAIL}
compile time error to specify a class modifier twiceTest Case: 8.1.1-duplicate-modifier-3Expected Result: FAIL
Regression Test:
tcltest::test 8.1.1-duplicate-modifier-2 { compile time error to specify a class modifier twice } { compile [saveas T811dm2.java { abstract abstract class T811dm2 {} }] } {FAIL}
compile time error to specify a class modifier twiceTest Case: 8.1.1-duplicate-modifier-4Expected Result: FAIL
Regression Test:
tcltest::test 8.1.1-duplicate-modifier-3 { compile time error to specify a class modifier twice } { compile [saveas T811dm3.java { final final class T811dm3 {} }] } {FAIL}
compile time error to specify a class modifier twiceExpected Result: FAIL
Regression Test:
tcltest::test 8.1.1-duplicate-modifier-4 { compile time error to specify a class modifier twice } { compile [saveas T811dm4.java { strictfp strictfp class T811dm4 {} }] } {FAIL}
tests/jls/classes/class-declaration/class-modifiers/abstract-classes
declare an abstract classTest Case: 8.1.1.1-2Expected Result: PASS
Regression Test:
tcltest::test 8.1.1.1-1 { declare an abstract class } { compile [saveas AbstractClass.java "public abstract class AbstractClass {}"] } {PASS}
Compile time error on attempt to create an instance of an abstract classTest Case: 8.1.1.1-3Expected Result: FAIL
Regression Test:
tcltest::test 8.1.1.1-2 { Compile time error on attempt to create an instance of an abstract class } { saveas AbstractClass_CreateInstanceError.java { public class AbstractClass_CreateInstanceError { Object o = new AbstractClass(); } } compile AbstractClass.java AbstractClass_CreateInstanceError.java } {FAIL}
declare an abstract class with an abstract methodTest Case: 8.1.1.1-4Expected Result: PASS
Regression Test:
tcltest::test 8.1.1.1-3 { declare an abstract class with an abstract method } { compile [saveas AbstractMethodAbstractClass.java { public abstract class AbstractMethodAbstractClass { abstract void foo(); } }] } {PASS}
a non-abstract class can not have an abstract methodTest Case: 8.1.1.1-5Expected Result: FAIL
Regression Test:
tcltest::test 8.1.1.1-4 { a non-abstract class can not have an abstract method } { compile [saveas AbstractMethodNonAbstractClass.java { public class AbstractMethodNonAbstractClass { abstract void foo(); } }] } {FAIL}
An attempt to inherit from an abstract superclass containing an abstract method without implementing the abstract method or declaring the subclass abstract should generate a compile time errorTest Case: 8.1.1.1-6Expected Result: FAIL
Regression Test:
tcltest::test 8.1.1.1-5 { An attempt to inherit from an abstract superclass containing an abstract method without implementing the abstract method or declaring the subclass abstract should generate a compile time error } { saveas InheritAbstractClassError.java { abstract class InheritAbstractClassError_Superclass { abstract void foo(); } public class InheritAbstractClassError extends InheritAbstractClassError_Superclass {} } compile InheritAbstractClassError.java } {FAIL}
An attempt to inherit from an abstract superclass that extends another class that has an abstract method without implementing the abstract method or declaring the subclass abstract should generate a compile time errorTest Case: 8.1.1.1-7Expected Result: FAIL
Regression Test:
tcltest::test 8.1.1.1-6 { An attempt to inherit from an abstract superclass that extends another class that has an abstract method without implementing the abstract method or declaring the subclass abstract should generate a compile time error } { saveas DoubleInheritAbstractClassError.java { abstract class DoubleInheritAbstractClassError_Superclass1 { abstract void foo(); } abstract class DoubleInheritAbstractClassError_Superclass2 extends DoubleInheritAbstractClassError_Superclass1 {} public class DoubleInheritAbstractClassError extends DoubleInheritAbstractClassError_Superclass2 {} } compile DoubleInheritAbstractClassError.java } {FAIL}
inherit from an abstract class with an abstract method, the subclass must be marked as abstractTest Case: 8.1.1.1-8Expected Result: PASS
Regression Test:
tcltest::test 8.1.1.1-7 { inherit from an abstract class with an abstract method, the subclass must be marked as abstract } { saveas InheritAbstractClass.java { abstract class InheritAbstractClass_Superclass { abstract void foo(); } public abstract class InheritAbstractClass extends InheritAbstractClass_Superclass {} } compile InheritAbstractClass.java } {PASS}
Compile time error on attempt to create an instance of an abstract class that inherits from and abstract classTest Case: 8.1.1.1-9Expected Result: FAIL
Regression Test:
tcltest::test 8.1.1.1-8 { Compile time error on attempt to create an instance of an abstract class that inherits from and abstract class } { saveas InheritAbstractClass_CreateInstanceError.java { public class InheritAbstractClass_CreateInstanceError { Object o = new InheritAbstractClass(); } } compile InheritAbstractClass.java InheritAbstractClass_CreateInstanceError.java } {FAIL}
It should be possible to inherit from an abstract class that defines no abstract methods, the subclass does not need to be abstractTest Case: 8.1.1.1-10Expected Result: PASS
Regression Test:
tcltest::test 8.1.1.1-9 { It should be possible to inherit from an abstract class that defines no abstract methods, the subclass does not need to be abstract } { compile [saveas InheritEmptyAbstractClass.java { abstract class InheritEmptyAbstractClass_Superclass {} public class InheritEmptyAbstractClass extends InheritEmptyAbstractClass_Superclass {} }] } {PASS}
Inherit from an abstract class with no methods that also inherits from an abstract class with no methods, subclass does not need to be abstractTest Case: 8.1.1.1-11Expected Result: PASS
Regression Test:
tcltest::test 8.1.1.1-10 { Inherit from an abstract class with no methods that also inherits from an abstract class with no methods, subclass does not need to be abstract } { saveas DoubleInheritEmptyAbstractClass.java { abstract class DoubleInheritEmptyAbstractClass_Superclass1 {} abstract class DoubleInheritEmptyAbstractClass_Superclass2 extends DoubleInheritEmptyAbstractClass_Superclass1 {} public class DoubleInheritEmptyAbstractClass extends DoubleInheritEmptyAbstractClass_Superclass2 {} } compile DoubleInheritEmptyAbstractClass.java } {PASS}
Implement an abstract method inherited from an abstract superclassTest Case: 8.1.1.1-12Expected Result: PASS
Regression Test:
tcltest::test 8.1.1.1-11 { Implement an abstract method inherited from an abstract superclass } { saveas ImplementInheritedAbstractMethod.java { abstract class ImplementInheritedAbstractMethod_Superclass1 { abstract void foo(); } abstract class ImplementInheritedAbstractMethod_Superclass2 extends ImplementInheritedAbstractMethod_Superclass1 {} public class ImplementInheritedAbstractMethod extends ImplementInheritedAbstractMethod_Superclass2 { void foo() {} } } compile ImplementInheritedAbstractMethod.java } {PASS}
A compile time error should be generated in the case that an abstract class has two methods with the same signature but different return types, this would create an abstract class that could not be sub-classedExpected Result: FAIL
Regression Test:
tcltest::test 8.1.1.1-12 { A compile time error should be generated in the case that an abstract class has two methods with the same signature but different return types, this would create an abstract class that could not be sub-classed } { saveas InterfaceSignatureConflict.java { interface InterfaceSignatureConflict_Inter { void foo(); } public abstract class InterfaceSignatureConflict implements InterfaceSignatureConflict_Inter { public abstract int foo(); } } compile InterfaceSignatureConflict.java } {FAIL}
tests/jls/classes/class-declaration/class-modifiers/final-classes
a final class cannot also be declared abstractTest Case: 8.1.1.2-invalid-subclass-1Expected Result: FAIL
Regression Test:
tcltest::test 8.1.1.2-conflicting-modifier-1 { a final class cannot also be declared abstract } { compile [saveas T8112cm1.java { final abstract class T8112cm1 {} }] } {FAIL}
A compile-time error occurs if the name of a final class appears in the extends clause of another class declarationTest Case: 8.1.1.2-invalid-subclass-2Expected Result: FAIL
Regression Test:
tcltest::test 8.1.1.2-invalid-subclass-1 { A compile-time error occurs if the name of a final class appears in the extends clause of another class declaration } { compile [saveas T8112is1.java { final class T8112is1_super {} class T8112is1 extends T8112is1_super {} }] } {FAIL}
A final class can not be extended via an anymous innerclassExpected Result: FAIL
Regression Test:
tcltest::test 8.1.1.2-invalid-subclass-2 { A final class can not be extended via an anymous innerclass } { compile [saveas T8112is2.java { final class T8112is2 { Object o = new T8112is2() {}; } }] } {FAIL}
tests/jls/classes/class-declaration/superclasses-and-subclasses
Circular dependencies are illegalTest Case: 8.1.3-circular-2Expected Result: FAIL
Regression Test:
tcltest::test 8.1.3-circular-1 { Circular dependencies are illegal } { compile [saveas T813c1.java { class T813c1 implements T813c1.Inner { interface Inner {} } }] } {FAIL}
Circular dependencies are illegalTest Case: 8.1.3-circular-3Expected Result: FAIL
Regression Test:
tcltest::test 8.1.3-circular-2 { Circular dependencies are illegal } { compile [saveas T813c2.java { class T813c2 extends T813c2.Inner { class Inner {} } }] } {FAIL}
Circular dependencies are illegalTest Case: 8.1.3-circular-4Expected Result: FAIL
Regression Test:
tcltest::test 8.1.3-circular-3 { Circular dependencies are illegal } { compile [saveas T813c3.java { class T813c3 extends T813c3 {} }] } {FAIL}
Circular dependencies are illegalTest Case: 8.1.3-circular-5Expected Result: FAIL
Regression Test:
tcltest::test 8.1.3-circular-4 { Circular dependencies are illegal } { compile [saveas T813c4.java { class T813c4_1 extends T813c4_2 {} class T813c4_2 extends T813c4_1 {} }] } {FAIL}
Circular dependencies are illegalExpected Result: FAIL
Regression Test:
tcltest::test 8.1.3-circular-5 { Circular dependencies are illegal } { compile [saveas T813c5.java { class T813c5_1 implements T813c5_2.Inner2 { interface Inner1 {} } class T813c5_2 { interface Inner2 extends T813c5_1.Inner1 {} } }] } {FAIL}
tests/jls/classes/class-members
members declared public are accessible in a subclassTest Case: 8.2-accessibility-inherited-member-2Expected Result: PASS
Regression Test:
tcltest::test 8.2-accessibility-inherited-member-1 { members declared public are accessible in a subclass } { saveas T82aim1.java { class T82aim1 { public int foo; } class T82aim1_Test extends T82aim1 { void bar() { foo = 0; } } } compile T82aim1.java } {PASS}
members declared public are accessible in a subclassTest Case: 8.2-accessibility-inherited-member-3Expected Result: PASS
Regression Test:
tcltest::test 8.2-accessibility-inherited-member-2 { members declared public are accessible in a subclass } { saveas T82aim2.java { class T82aim2 { public void foo() {} } class T82aim2_Test extends T82aim2 { void bar() { foo(); } } } compile T82aim2.java } {PASS}
members declared protected are accessible in a subclassTest Case: 8.2-accessibility-inherited-member-4Expected Result: PASS
Regression Test:
tcltest::test 8.2-accessibility-inherited-member-3 { members declared protected are accessible in a subclass } { saveas T82aim3.java { class T82aim3 { protected int foo; } class T82aim3_Test extends T82aim3 { void bar() { foo = 0; } } } compile T82aim3.java } {PASS}
members declared protected are accessible in a subclassTest Case: 8.2-accessibility-inherited-member-5Expected Result: PASS
Regression Test:
tcltest::test 8.2-accessibility-inherited-member-4 { members declared protected are accessible in a subclass } { saveas T82aim4.java { class T82aim4 { protected void foo() {} } class T82aim4_Test extends T82aim4 { void bar() { foo(); } } } compile T82aim4.java } {PASS}
members declared private are not accessible in a subclassTest Case: 8.2-accessibility-inherited-member-6Expected Result: FAIL
Regression Test:
tcltest::test 8.2-accessibility-inherited-member-5 { members declared private are not accessible in a subclass } { saveas T82aim5.java { class T82aim5 { private int foo; } class T82aim5_Test extends T82aim5 { void bar() { foo = 0; } } } compile T82aim5.java } {FAIL}
members declared private are not accessible in a subclassTest Case: 8.2-accessibility-inherited-member-7Expected Result: FAIL
Regression Test:
tcltest::test 8.2-accessibility-inherited-member-6 { members declared private are not accessible in a subclass } { saveas T82aim6.java { class T82aim6 { private void foo() {} } class T82aim6_Test extends T82aim6 { void bar() { foo(); } } } compile T82aim6.java } {FAIL}
members with default protection are accessible in a subclassTest Case: 8.2-accessibility-inherited-member-8Expected Result: PASS
Regression Test:
tcltest::test 8.2-accessibility-inherited-member-7 { members with default protection are accessible in a subclass } { saveas T82aim7.java { class T82aim7 { int foo; } class T82aim7_Test extends T82aim7 { void bar() { foo = 0; } } } compile T82aim7.java } {PASS}
members with default protection are accessible in a subclassTest Case: 8.2-constructor-not-inherited-1Expected Result: PASS
Regression Test:
tcltest::test 8.2-accessibility-inherited-member-8 { members with default protection are accessible in a subclass } { saveas T82aim8.java { class T82aim8 { void foo() {} } class T82aim8_Test extends T82aim8 { void bar() { foo(); } } } compile T82aim8.java } {PASS}
A constructor is not a class member and is therefore not inheritedExpected Result: FAIL
Regression Test:
tcltest::test 8.2-constructor-not-inherited-1 { A constructor is not a class member and is therefore not inherited } { saveas T82cni1.java { class T82cni1 { public T82cni1() {} public T82cni1(int value) {} } class T82cni1_Test extends T82cni1 { Object o = new T82cni1_Test(0); } } compile T82cni1.java } {FAIL}
tests/jls/classes/method-declarations/method-body
{} is a valid method bodyTest Case: 8.4.5-2Expected Result: PASS
Regression Test:
tcltest::test 8.4.5-1 { {} is a valid method body} { compile [saveas EmptyBlockMethodBody.java { public class EmptyBlockMethodBody { public void foo() {} } }] } {PASS}
only a native or abstract method can have no method bodyTest Case: 8.4.5-3Expected Result: FAIL
Regression Test:
tcltest::test 8.4.5-2 { only a native or abstract method can have no method body } { compile [saveas InvalidEmptyMethodBody.java { public class InvalidEmptyMethodBody { public void foo() ; } }] } {FAIL}
a native method does not have a bodyTest Case: 8.4.5-4Expected Result: PASS
Regression Test:
tcltest::test 8.4.5-3 { a native method does not have a body } { compile [saveas EmptyNativeMethodBody.java { public class EmptyNativeMethodBody { public native void foo(); } }] } {PASS}
a native method can not have a bodyTest Case: 8.4.5-5Expected Result: FAIL
Regression Test:
tcltest::test 8.4.5-4 { a native method can not have a body } { compile [saveas InvalidNativeMethodBody.java { public class InvalidNativeMethodBody { public native void foo() {} } }] } {FAIL}
an abstract method does not have a bodyTest Case: 8.4.5-6Expected Result: PASS
Regression Test:
tcltest::test 8.4.5-5 { an abstract method does not have a body } { compile [saveas EmptyAbstractMethodBody.java { public abstract class EmptyAbstractMethodBody { public abstract void foo(); } }] } {PASS}
an abstract method can not have a bodyTest Case: 8.4.5-7Expected Result: FAIL
Regression Test:
tcltest::test 8.4.5-6 { an abstract method can not have a body } { compile [saveas InvalidAbstractMethodBody.java { public abstract class InvalidAbstractMethodBody { public abstract void foo() {} } }] } {FAIL}
non void method without a return is invalidTest Case: 8.4.5-8Expected Result: FAIL
Regression Test:
tcltest::test 8.4.5-7 { non void method without a return is invalid } { compile [saveas NoReturnInNonVoid.java { public class NoReturnInNonVoid { public boolean foo() {} } }] } {FAIL}
a void method with a non expression return is validTest Case: 8.4.5-9Expected Result: PASS
Regression Test:
tcltest::test 8.4.5-8 { a void method with a non expression return is valid } { compile [saveas NoExpressionReturnInVoid.java { public class NoExpressionReturnInVoid { public void foo() { return; } } }] } {PASS}
a return with no expression in a non void method is invalidTest Case: 8.4.5-10Expected Result: FAIL
Regression Test:
tcltest::test 8.4.5-9 { a return with no expression in a non void method is invalid } { compile [saveas ConflictingReturnInNonVoid.java { public class ConflictingReturnInNonVoid { public boolean foo() { int i = 0; if (i == 1) { return true; } else { return; } } } }] } {FAIL}
a return with an expression in a void method is invalidTest Case: 8.4.5-11Expected Result: FAIL
Regression Test:
tcltest::test 8.4.5-10 { a return with an expression in a void method is invalid } { compile [saveas ConflictingReturnInVoid.java { public class ConflictingReturnInVoid { public void foo() { int i = 0; if (i == 1) { return true; } else { return; } } } }] } {FAIL}
a method with an exceptional exit does not require a return ?Expected Result: PASS
Regression Test:
tcltest::test 8.4.5-11 { a method with an exceptional exit does not require a return ? } { compile [saveas ExceptionalReturnInNonVoid.java { public class ExceptionalReturnInNonVoid { public boolean foo() { throw new RuntimeException("foo()"); } } }] } {PASS}
tests/jls/classes/member-type-declarations/access-modifiers
public is a valid ClassModifier for a member classTest Case: 8.5.1-valid-modifier-2Expected Result: PASS
Regression Test:
tcltest::test 8.5.1-valid-modifier-1 { public is a valid ClassModifier for a member class } { empty_class T851vm1 { public class Inner {} } } {PASS}
protected is a valid ClassModifier for a member classTest Case: 8.5.1-valid-modifier-3Expected Result: PASS
Regression Test:
tcltest::test 8.5.1-valid-modifier-2 { protected is a valid ClassModifier for a member class } { empty_class T851vm2 { protected class Inner {} } } {PASS}
private is a valid ClassModifier for a member classTest Case: 8.5.1-valid-modifier-4Expected Result: PASS
Regression Test:
tcltest::test 8.5.1-valid-modifier-3 { private is a valid ClassModifier for a member class } { empty_class T851vm3 { protected class Inner {} } } {PASS}
static is a valid ClassModifier for a member classTest Case: 8.5.1-valid-modifier-5Expected Result: PASS
Regression Test:
tcltest::test 8.5.1-valid-modifier-4 { static is a valid ClassModifier for a member class } { empty_class T851vm4 { static class Member {} } } {PASS}
strictfp is a valid ClassModifier for a member classTest Case: 8.5.1-duplicate-modifier-1Expected Result: PASS
Regression Test:
tcltest::test 8.5.1-valid-modifier-5 { strictfp is a valid ClassModifier for a member class } { empty_class T851vm5 { strictfp class Member {} } } {PASS}
compile time error to specify a class modifier twiceTest Case: 8.5.1-duplicate-modifier-2Expected Result: FAIL
Regression Test:
tcltest::test 8.5.1-duplicate-modifier-1 { compile time error to specify a class modifier twice } { empty_class T851dm1 { static static class Member {} } } {FAIL}
compile time error to specify a class modifier twiceTest Case: 8.5.1-duplicate-modifier-3Expected Result: FAIL
Regression Test:
tcltest::test 8.5.1-duplicate-modifier-2 { compile time error to specify a class modifier twice } { empty_class T851dm2 { protected protected class Inner {} } } {FAIL}
compile time error to specify a class modifier twiceTest Case: 8.5.1-conflicting-modifier-1Expected Result: FAIL
Regression Test:
tcltest::test 8.5.1-duplicate-modifier-3 { compile time error to specify a class modifier twice } { empty_class T851dm3 { private private class Inner {} } } {FAIL}
conflicting modifiers must generate a compile time errorTest Case: 8.5.1-conflicting-modifier-2Expected Result: FAIL
Regression Test:
tcltest::test 8.5.1-conflicting-modifier-1 { conflicting modifiers must generate a compile time error } { empty_class T851cm1 { public private class Inner {} } } {FAIL}
conflicting modifiers must generate a compile time errorTest Case: 8.5.1-conflicting-modifier-3Expected Result: FAIL
Regression Test:
tcltest::test 8.5.1-conflicting-modifier-2 { conflicting modifiers must generate a compile time error } { empty_class T851cm2 { public protected class Inner {} } } {FAIL}
conflicting modifiers must generate a compile time errorTest Case: 8.5.1-conflicting-modifier-4Expected Result: FAIL
Regression Test:
tcltest::test 8.5.1-conflicting-modifier-3 { conflicting modifiers must generate a compile time error } { empty_class T851cm3 { protected public class Inner {} } } {FAIL}
conflicting modifiers must generate a compile time errorTest Case: 8.5.1-conflicting-modifier-5Expected Result: FAIL
Regression Test:
tcltest::test 8.5.1-conflicting-modifier-4 { conflicting modifiers must generate a compile time error } { empty_class T851cm4 { protected private class Inner {} } } {FAIL}
conflicting modifiers must generate a compile time errorTest Case: 8.5.1-conflicting-modifier-6Expected Result: FAIL
Regression Test:
tcltest::test 8.5.1-conflicting-modifier-5 { conflicting modifiers must generate a compile time error } { empty_class T851cm5 { private public class Inner {} } } {FAIL}
conflicting modifiers must generate a compile time errorExpected Result: FAIL
Regression Test:
tcltest::test 8.5.1-conflicting-modifier-6 { conflicting modifiers must generate a compile time error } { empty_class T851cm6 { private protected class Inner {} } } {FAIL}
tests/jls/classes/member-type-declarations/static-member-type-declarations
a member type with the static modifier may use static members of the enclosing classTest Case: 8.5.2-static-member-usage-2Expected Result: PASS
Regression Test:
tcltest::test 8.5.2-static-member-usage-1 { a member type with the static modifier may use static members of the enclosing class } { empty_class T852smu1 { static int foo; static class T852smu1_Test { T852smu1_Test() { foo = 0; } } } } {PASS}
a member type with the static modifier may use static members of the enclosing classTest Case: 8.5.2-non-static-member-usage-1Expected Result: PASS
Regression Test:
tcltest::test 8.5.2-static-member-usage-2 { a member type with the static modifier may use static members of the enclosing class } { empty_class T852smu2 { static void foo() {} static class T852smu2_Test { T852smu2_Test() { foo(); } } } } {PASS}
It is a compile-time error if a static class contains a usage of a non-static member of the enclosing classTest Case: 8.5.2-non-static-member-usage-2Expected Result: FAIL
Regression Test:
tcltest::test 8.5.2-non-static-member-usage-1 { It is a compile-time error if a static class contains a usage of a non-static member of the enclosing class } { empty_class T852nsmu1 { int foo; static class T852nsmu1_Test { T852nsmu1_Test() { foo = 0; } } } } {FAIL}
It is a compile-time error if a static class contains a usage of a non-static member of the enclosing classTest Case: 8.5.2-accessible-static-member-usage-1Expected Result: FAIL
Regression Test:
tcltest::test 8.5.2-non-static-member-usage-2 { It is a compile-time error if a static class contains a usage of a non-static member of the enclosing class } { empty_class T852nsmu2 { void foo() {} static class T852nsmu2_Test { T852nsmu2_Test() { foo(); } } } } {FAIL}
a member type with the static modifer may access private static members of the enclosing classTest Case: 8.5.2-accessible-static-member-usage-2Expected Result: PASS
Regression Test:
tcltest::test 8.5.2-accessible-static-member-usage-1 { a member type with the static modifer may access private static members of the enclosing class } { empty_class T852asmu1 { private static int foo; static class T852asmu1_Test { T852asmu1_Test() { foo = 0; } } } } {PASS}
a member type with the static modifer may access private static members of the enclosing classTest Case: 8.5.2-inherited-non-static-member-usage-1Expected Result: PASS
Regression Test:
tcltest::test 8.5.2-accessible-static-member-usage-2 { a member type with the static modifer may access private static members of the enclosing class } { empty_class T852asmu2 { private static void foo() {} static class T852asmu2_Test { T852asmu2_Test() { foo(); } } } } {PASS}
a static member type may use non-static members of a superclass that happens to be the enclosing classTest Case: 8.5.2-inherited-non-static-member-usage-2Expected Result: PASS
Regression Test:
tcltest::test 8.5.2-inherited-non-static-member-usage-1 { a static member type may use non-static members of a superclass that happens to be the enclosing class } { empty_class T852insmu1 { int foo; static class T852insmu1_Test extends T852insmu1 { T852insmu1_Test() { foo = 0; } } } } {PASS}
a static member type may use non-static members of a superclass that happens to be the enclosing classTest Case: 8.5.2-accessible-inherited-non-static-member-usage-1Expected Result: PASS
Regression Test:
tcltest::test 8.5.2-inherited-non-static-member-usage-2 { a static member type may use non-static members of a superclass that happens to be the enclosing class } { empty_class T852insmu2 { void foo() {} static class T852insmu2_Test extends T852insmu2 { T852insmu2_Test() { foo(); } } } } {PASS}
a static member type may use private non-static members of a superclass that happens to be the enclosing classTest Case: 8.5.2-accessible-inherited-non-static-member-usage-2Expected Result: PASS
Regression Test:
tcltest::test 8.5.2-accessible-inherited-non-static-member-usage-1 { a static member type may use private non-static members of a superclass that happens to be the enclosing class } { empty_class T852ainsmu1 { private int foo; static class T852ainsmu1_Test extends T852ainsmu1 { T852ainsmu1_Test() { foo = 0; } } } } {PASS}
a static member type may use private non-static members of a superclass that happens to be the enclosing classExpected Result: PASS
Regression Test:
tcltest::test 8.5.2-accessible-inherited-non-static-member-usage-2 { a static member type may use private non-static members of a superclass that happens to be the enclosing class } { empty_class T852ainsmu2 { private void foo() {} static class T852ainsmu2_Test extends T852ainsmu2 { T852ainsmu2_Test() { foo(); } } } } {PASS}
tests/jls/classes/constructor-declarations
SimpleTypeName in the ConstructorDeclarator must be the simple name of the class that contains the constructor declarationTest Case: 8.8-simpletypename-2Expected Result: PASS
Regression Test:
tcltest::test 8.8-simpletypename-1 { SimpleTypeName in the ConstructorDeclarator must be the simple name of the class that contains the constructor declaration } { empty_class T88stn1 "T88stn1() {}" } {PASS}
SimpleTypeName in the ConstructorDeclarator must be the simple name of the class that contains the constructor declarationTest Case: 8.8-example-1Expected Result: FAIL
Regression Test:
tcltest::test 8.8-simpletypename-2 { SimpleTypeName in the ConstructorDeclarator must be the simple name of the class that contains the constructor declaration } { empty_class T88stn2 "not_ctor() {}" } {FAIL}
JLS exampleExpected Result: PASS
Regression Test:
tcltest::test 8.8-example-1 { JLS example } { empty_class Point { int x, y; Point(int x, int y) { this.x = x; this.y = y; } } } {PASS}
tests/jls/classes/constructor-declarations/formal-parameters
See 8.4.1Test Case: 8.8.1-formal-parameters-2Expected Result: PASS
Regression Test:
tcltest::test 8.8.1-formal-parameters-1 { See 8.4.1 } { empty_class T881fp1 "T881fp1() {}" } {PASS}
See 8.4.1Test Case: 8.8.1-formal-parameters-3Expected Result: PASS
Regression Test:
tcltest::test 8.8.1-formal-parameters-2 { See 8.4.1 } { empty_class T881fp2 "T881fp2(int i) {}" } {PASS}
See 8.4.1Test Case: 8.8.1-formal-parameters-4Expected Result: PASS
Regression Test:
tcltest::test 8.8.1-formal-parameters-3 { See 8.4.1 } { empty_class T881fp3 "T881fp3(int i, Object j) {}" } {PASS}
See 8.4.1Test Case: 8.8.1-formal-parameters-5Expected Result: PASS
Regression Test:
tcltest::test 8.8.1-formal-parameters-4 { See 8.4.1 } { empty_class T881fp4 "T881fp4(int i, final Object j) {}" } {PASS}
See 8.4.1Test Case: 8.8.1-formal-parameters-6Expected Result: PASS
Regression Test:
tcltest::test 8.8.1-formal-parameters-5 { See 8.4.1 } { empty_class T881fp5 {T881fp5(int[] arr, Object j) {}} } {PASS}
See 8.4.1Test Case: 8.8.1-invalid-formal-parameters-1Expected Result: PASS
Regression Test:
tcltest::test 8.8.1-formal-parameters-6 { See 8.4.1 } { empty_class T881fp6 {T881fp6(final int[] arr) {}} } {PASS}
See 8.4.1Test Case: 8.8.1-invalid-formal-parameters-2Expected Result: FAIL
Regression Test:
tcltest::test 8.8.1-invalid-formal-parameters-1 { See 8.4.1 } { empty_class T881ifp1 "T881ifp1(int i, ) {}" } {FAIL}
See 8.4.1Test Case: 8.8.1-invalid-formal-parameters-3Expected Result: FAIL
Regression Test:
tcltest::test 8.8.1-invalid-formal-parameters-2 { See 8.4.1 } { empty_class T881ifp2 "T881ifp2(int i, foo) {}" } {FAIL}
See 8.4.1Test Case: 8.8.1-invalid-formal-parameters-4Expected Result: FAIL
Regression Test:
tcltest::test 8.8.1-invalid-formal-parameters-3 { See 8.4.1 } { empty_class T881ifp3 "T881ifp3(int i, int) {}" } {FAIL}
See 8.4.1Expected Result: FAIL
Regression Test:
tcltest::test 8.8.1-invalid-formal-parameters-4 { See 8.4.1 } { empty_class T881ifp4 "T881ifp4(int i, final int) {}" } {FAIL}
tests/jls/classes/constructor-declarations/constructor-signature
The signature of a constructor consists of the number and types of formal parameters to the constructorTest Case: 8.8.2-invalid-signature-1Expected Result: PASS
Regression Test:
tcltest::test 8.8.2-signature-1 { The signature of a constructor consists of the number and types of formal parameters to the constructor } { empty_class T882s1 { T882s1() {} T882s1(int i) {} T882s1(Object o) {} } } {PASS}
A class may not declare two constructors with the same signature, or a compile-time error occursExpected Result: FAIL
Regression Test:
tcltest::test 8.8.2-invalid-signature-1 { A class may not declare two constructors with the same signature, or a compile-time error occurs } { empty_class T882is1 { T882is1(int i) {} T882is1(int j) {} } } {FAIL}
tests/jls/classes/constructor-declarations/constructor-modifiers
ConstructorModifier can be public, protected, or privateTest Case: 8.8.3-modifiers-2Expected Result: PASS
Regression Test:
tcltest::test 8.8.3-modifiers-1 { ConstructorModifier can be public, protected, or private } { empty_class T883m1 "public T883m1() {}" } {PASS}
ConstructorModifier can be public, protected, or privateTest Case: 8.8.3-modifiers-3Expected Result: PASS
Regression Test:
tcltest::test 8.8.3-modifiers-2 { ConstructorModifier can be public, protected, or private } { empty_class T883m2 "protected T883m2() {}" } {PASS}
ConstructorModifier can be public, protected, or privateTest Case: 8.8.3-duplicate-modifiers-1Expected Result: PASS
Regression Test:
tcltest::test 8.8.3-modifiers-3 { ConstructorModifier can be public, protected, or private } { empty_class T883m3 "private T883m3() {}" } {PASS}
A compile-time error occurs if the same modifier appears more than once in a constructor declarationTest Case: 8.8.3-duplicate-modifiers-2Expected Result: FAIL
Regression Test:
tcltest::test 8.8.3-duplicate-modifiers-1 { A compile-time error occurs if the same modifier appears more than once in a constructor declaration } { empty_class T883dm1 "public public T883dm1() {}" } {FAIL}
A compile-time error occurs if the same modifier appears more than once in a constructor declarationTest Case: 8.8.3-duplicate-modifiers-3Expected Result: FAIL
Regression Test:
tcltest::test 8.8.3-duplicate-modifiers-2 { A compile-time error occurs if the same modifier appears more than once in a constructor declaration } { empty_class T883dm2 "protected protected T883dm2() {}" } {FAIL}
A compile-time error occurs if the same modifier appears more than once in a constructor declarationTest Case: 8.8.3-multiple-modifiers-1Expected Result: FAIL
Regression Test:
tcltest::test 8.8.3-duplicate-modifiers-3 { A compile-time error occurs if the same modifier appears more than once in a constructor declaration } { empty_class T883dm3 "private private T883dm3() {}" } {FAIL}
A compile-time error occurs if a constructor declaration has more than one of public, protected, and privateTest Case: 8.8.3-multiple-modifiers-2Expected Result: FAIL
Regression Test:
tcltest::test 8.8.3-multiple-modifiers-1 { A compile-time error occurs if a constructor declaration has more than one of public, protected, and private } { empty_class T883mm1 "public protected T883mm1() {}" } {FAIL}
A compile-time error occurs if a constructor declaration has more than one of public, protected, and privateTest Case: 8.8.3-multiple-modifiers-3Expected Result: FAIL
Regression Test:
tcltest::test 8.8.3-multiple-modifiers-2 { A compile-time error occurs if a constructor declaration has more than one of public, protected, and private } { empty_class T883mm2 "public private T883mm2() {}" } {FAIL}
A compile-time error occurs if a constructor declaration has more than one of public, protected, and privateTest Case: 8.8.3-multiple-modifiers-4Expected Result: FAIL
Regression Test:
tcltest::test 8.8.3-multiple-modifiers-3 { A compile-time error occurs if a constructor declaration has more than one of public, protected, and private } { empty_class T883mm3 "protected public T883mm3() {}" } {FAIL}
A compile-time error occurs if a constructor declaration has more than one of public, protected, and privateTest Case: 8.8.3-multiple-modifiers-5Expected Result: FAIL
Regression Test:
tcltest::test 8.8.3-multiple-modifiers-4 { A compile-time error occurs if a constructor declaration has more than one of public, protected, and private } { empty_class T883mm4 "protected private T883mm4() {}" } {FAIL}
A compile-time error occurs if a constructor declaration has more than one of public, protected, and privateTest Case: 8.8.3-multiple-modifiers-6Expected Result: FAIL
Regression Test:
tcltest::test 8.8.3-multiple-modifiers-5 { A compile-time error occurs if a constructor declaration has more than one of public, protected, and private } { empty_class T883mm5 "private public T883mm5() {}" } {FAIL}
A compile-time error occurs if a constructor declaration has more than one of public, protected, and privateTest Case: 8.8.3-invalid-modifiers-1Expected Result: FAIL
Regression Test:
tcltest::test 8.8.3-multiple-modifiers-6 { A compile-time error occurs if a constructor declaration has more than one of public, protected, and private } { empty_class T883mm6 "private protected T883mm6() {}" } {FAIL}
A constructor cannot be abstract, static, final, native, strictfp, or synchronizedTest Case: 8.8.3-invalid-modifiers-2Expected Result: FAIL
Regression Test:
tcltest::test 8.8.3-invalid-modifiers-1 { A constructor cannot be abstract, static, final, native, strictfp, or synchronized } { empty_class T883im1 "abstract T883im1() {}" } {FAIL}
A constructor cannot be abstract, static, final, native, strictfp, or synchronizedTest Case: 8.8.3-invalid-modifiers-3Expected Result: FAIL
Regression Test:
tcltest::test 8.8.3-invalid-modifiers-2 { A constructor cannot be abstract, static, final, native, strictfp, or synchronized } { empty_class T883im2 "static T883im2() {}" } {FAIL}
A constructor cannot be abstract, static, final, native, strictfp, or synchronizedTest Case: 8.8.3-invalid-modifiers-4Expected Result: FAIL
Regression Test:
tcltest::test 8.8.3-invalid-modifiers-3 { A constructor cannot be abstract, static, final, native, strictfp, or synchronized } { empty_class T883im3 "final T883im3() {}" } {FAIL}
A constructor cannot be abstract, static, final, native, strictfp, or synchronizedTest Case: 8.8.3-invalid-modifiers-5Expected Result: FAIL
Regression Test:
tcltest::test 8.8.3-invalid-modifiers-4 { A constructor cannot be abstract, static, final, native, strictfp, or synchronized } { empty_class T883im4 "native T883im4() {}" } {FAIL}
A constructor cannot be abstract, static, final, native, strictfp, or synchronizedTest Case: 8.8.3-invalid-modifiers-6Expected Result: FAIL
Regression Test:
tcltest::test 8.8.3-invalid-modifiers-5 { A constructor cannot be abstract, static, final, native, strictfp, or synchronized } { empty_class T883im5 "strictfp T883im5() {}" } {FAIL}
A constructor cannot be abstract, static, final, native, strictfp, or synchronizedExpected Result: FAIL
Regression Test:
tcltest::test 8.8.3-invalid-modifiers-6 { A constructor cannot be abstract, static, final, native, strictfp, or synchronized } { empty_class T883im6 "synchronized T883im6() {}" } {FAIL}
tests/jls/classes/constructor-declarations/constructor-body
A return statement may be used in the body of a constructor if it does not include an expressionTest Case: 8.8.5-return-statement-2Expected Result: PASS
Regression Test:
tcltest::test 8.8.5-return-statement-1 { A return statement may be used in the body of a constructor if it does not include an expression } { empty_class T885rs1 "T885rs1() { return; }" } {PASS}
A return statement may be used in the body of a constructor if it does not include an expressionTest Case: 8.8.5-example-1Expected Result: FAIL
Regression Test:
tcltest::test 8.8.5-return-statement-2 { A return statement may be used in the body of a constructor if it does not include an expression } { empty_class T885rs2 "T885rs2() { return 1; }" } {FAIL}
JLS exampleExpected Result: PASS
Regression Test:
tcltest::test 8.8.5-example-1 { JLS example } { saveas Point.java { class Point { int x, y; Point(int x, int y) { this.x = x; this.y = y; } } class ColoredPoint extends Point { static final int WHITE = 0, BLACK = 1; int color; ColoredPoint(int x, int y) { this(x, y, WHITE); } ColoredPoint(int x, int y, int color) { super(x, y); this.color = color; } } } compile Point.java } {PASS}
tests/jls/classes/constructor-declarations/constructor-body/explicit-constructor-invocations
An ExplicitConstructorInvocation must appear before the optional BlockStatementsTest Case: 8.8.5.1-before-block-statements-this-2Expected Result: PASS
Regression Test:
tcltest::test 8.8.5.1-before-block-statements-this-1 { An ExplicitConstructorInvocation must appear before the optional BlockStatements } { empty_class T8851bbst1 { T8851bbst1() {} T8851bbst1(int i) { this(); {} } } } {PASS}
An ExplicitConstructorInvocation must appear before the optional BlockStatementsTest Case: 8.8.5.1-before-block-statements-this-3Expected Result: FAIL
Regression Test:
tcltest::test 8.8.5.1-before-block-statements-this-2 { An ExplicitConstructorInvocation must appear before the optional BlockStatements } { empty_class T8851bbst2 { T8851bbst2() {} T8851bbst2(int i) { {} this(); } } } {FAIL}
An ExplicitConstructorInvocation must appear before the optional BlockStatementsTest Case: 8.8.5.1-before-block-statements-super-1Expected Result: FAIL
Regression Test:
tcltest::test 8.8.5.1-before-block-statements-this-3 { An ExplicitConstructorInvocation must appear before the optional BlockStatements } { empty_class T8851bbst3 { T8851bbst3() {} T8851bbst3(int i) { ; this(); } } } {FAIL}
An ExplicitConstructorInvocation must appear before the optional BlockStatementsTest Case: 8.8.5.1-before-block-statements-super-2Expected Result: PASS
Regression Test:
tcltest::test 8.8.5.1-before-block-statements-super-1 { An ExplicitConstructorInvocation must appear before the optional BlockStatements } { empty_class T8851bbss1 { T8851bbss1(int i) { super(); {} } } } {PASS}
An ExplicitConstructorInvocation must appear before the optional BlockStatementsTest Case: 8.8.5.1-before-block-statements-super-3Expected Result: FAIL
Regression Test:
tcltest::test 8.8.5.1-before-block-statements-super-2 { An ExplicitConstructorInvocation must appear before the optional BlockStatements } { empty_class T8851bbss2 { T8851bbss2(int i) { {} super(); } } } {FAIL}
An ExplicitConstructorInvocation must appear before the optional BlockStatementsTest Case: 8.8.5.1-multiple-this-invocations-1Expected Result: FAIL
Regression Test:
tcltest::test 8.8.5.1-before-block-statements-super-3 { An ExplicitConstructorInvocation must appear before the optional BlockStatements } { empty_class T8851bbss3 { T8851bbss3(int i) { ; super(); } } } {FAIL}
It is a compile-time error for a constructor to invoke itselfTest Case: 8.8.5.1-multiple-this-invocations-2Expected Result: FAIL
Regression Test:
tcltest::test 8.8.5.1-multiple-this-invocations-1 { It is a compile-time error for a constructor to invoke itself } { empty_class T8851mti1 { T8851mti1() { this(); } } } {FAIL}
It is a compile-time error for a constructor to indirectly invoke itself through a series of one or more explicit constructor invocations involving thisTest Case: 8.8.5.1-multiple-this-invocations-3Expected Result: FAIL
Regression Test:
tcltest::test 8.8.5.1-multiple-this-invocations-2 { It is a compile-time error for a constructor to indirectly invoke itself through a series of one or more explicit constructor invocations involving this } { empty_class T8851mti2 { T8851mti2() { this(0); } T8851mti2(int i) { this(); } } } {FAIL}
It is a compile-time error for a constructor to indirectly invoke itself through a series of one or more explicit constructor invocations involving thisTest Case: 8.8.5.1-accessible-implicit-super-invocation-1Expected Result: FAIL
Regression Test:
tcltest::test 8.8.5.1-multiple-this-invocations-3 { It is a compile-time error for a constructor to indirectly invoke itself through a series of one or more explicit constructor invocations involving this } { empty_class T8851mti3 { T8851mti3() { this(0); } T8851mti3(int i) { this("noggy"); } T8851mti3(String s) { this(true); } T8851mti3(boolean state) { this(); } } } {FAIL}
If a constructor body does not begin with an explicit constructor invocation, then the constructor body is implicitly assumed by the compiler to begin with a superclass constructor invocationTest Case: 8.8.5.1-accessible-implicit-super-invocation-2Expected Result: PASS
Regression Test:
tcltest::test 8.8.5.1-accessible-implicit-super-invocation-1 { If a constructor body does not begin with an explicit constructor invocation, then the constructor body is implicitly assumed by the compiler to begin with a superclass constructor invocation } { empty_class T8851aisi1 { T8851aisi1(int i) {} } } {PASS}
An implicit constructor for an inner class can gain access to a private constructor in the enclosing classTest Case: 8.8.5.1-accessible-implicit-super-invocation-3Expected Result: PASS
Regression Test:
tcltest::test 8.8.5.1-accessible-implicit-super-invocation-2 { An implicit constructor for an inner class can gain access to a private constructor in the enclosing class } { empty_class T8851aisi2 { private T8851aisi2() {} static class T8851aisi2_Inner extends T8851aisi2 { T8851aisi2_Inner() {} } } } {PASS}
An implicit constructor for an inner class can gain access to a private constructor in the enclosing classTest Case: 8.8.5.1-accessible-explicit-super-invocation-1Expected Result: PASS
Regression Test:
tcltest::test 8.8.5.1-accessible-implicit-super-invocation-3 { An implicit constructor for an inner class can gain access to a private constructor in the enclosing class } { empty_class T8851aisi3 { private T8851aisi3() {} class T8851aisi3_Inner extends T8851aisi3 { T8851aisi3_Inner() {} } } } {PASS}
explicit superclass constructor invocationTest Case: 8.8.5.1-accessible-explicit-super-invocation-2Expected Result: PASS
Regression Test:
tcltest::test 8.8.5.1-accessible-explicit-super-invocation-1 { explicit superclass constructor invocation } { empty_class T8851aesi1 { T8851aesi1(int i) { super(); } } } {PASS}
An explicit constructor for an inner class can gain access to a private constructor in the enclosing classTest Case: 8.8.5.1-accessible-explicit-super-invocation-3Expected Result: PASS
Regression Test:
tcltest::test 8.8.5.1-accessible-explicit-super-invocation-2 { An explicit constructor for an inner class can gain access to a private constructor in the enclosing class } { empty_class T8851aesi2 { private T8851aesi2() {} static class T8851aesi2_Inner extends T8851aesi2 { T8851aesi2_Inner() { super(); } } } } {PASS}
An explicit constructor for an inner class can gain access to a private constructor in the enclosing classTest Case: 8.8.5.1-accessible-explicit-super-invocation-args-1Expected Result: PASS
Regression Test:
tcltest::test 8.8.5.1-accessible-explicit-super-invocation-3 { An explicit constructor for an inner class can gain access to a private constructor in the enclosing class } { empty_class T8851aesi3 { private T8851aesi3() {} class T8851aesi3_Inner extends T8851aesi3 { T8851aesi3_Inner() { super(); } } } } {PASS}
explicit superclass constructor invocationTest Case: 8.8.5.1-accessible-explicit-super-invocation-args-2Expected Result: PASS
Regression Test:
tcltest::test 8.8.5.1-accessible-explicit-super-invocation-args-1 { explicit superclass constructor invocation } { saveas T8851aesia1.java { class T8851aesia1_super { T8851aesia1_super(int i) {} } class T8851aesia1 extends T8851aesia1_super { T8851aesia1() { super(1); } } } compile T8851aesia1.java } {PASS}
explicit superclass constructor invocationTest Case: 8.8.5.1-accessible-explicit-super-invocation-args-3Expected Result: PASS
Regression Test:
tcltest::test 8.8.5.1-accessible-explicit-super-invocation-args-2 { explicit superclass constructor invocation } { saveas T8851aesia2.java { class T8851aesia2_super { T8851aesia2_super(Object o) {} } class T8851aesia2 extends T8851aesia2_super { T8851aesia2() { super(null); } } } compile T8851aesia2.java } {PASS}
a private constructor in an enclosing class is accessibleTest Case: 8.8.5.1-accessible-explicit-super-invocation-args-4Expected Result: PASS
Regression Test:
tcltest::test 8.8.5.1-accessible-explicit-super-invocation-args-3 { a private constructor in an enclosing class is accessible } { saveas T8851aesia3.java { class T8851aesia3_super { private T8851aesia3_super(int i) {} static class T8851aesia3 extends T8851aesia3_super { T8851aesia3() { super(1); } } } } compile T8851aesia3.java } {PASS}
a private constructor in an enclosing class is accessibleTest Case: 8.8.5.1-accessible-explicit-super-invocation-args-5Expected Result: PASS
Regression Test:
tcltest::test 8.8.5.1-accessible-explicit-super-invocation-args-4 { a private constructor in an enclosing class is accessible } { saveas T8851aesia4.java { class T8851aesia4_super { private T8851aesia4_super(Object o) {} static class T8851aesia4 extends T8851aesia4_super { T8851aesia4() { super(null); } } } } compile T8851aesia4.java } {PASS}
pass lots of types to multiple accessible constructorsTest Case: 8.8.5.1-inaccessible-implicit-super-invocation-1Expected Result: PASS
Regression Test:
tcltest::test 8.8.5.1-accessible-explicit-super-invocation-args-5 { pass lots of types to multiple accessible constructors } { saveas T8851aesia5.java { class T8851aesia5_super { private T8851aesia5_super(Object o) {} private T8851aesia5_super(String s) {} private T8851aesia5_super(boolean state) {} private T8851aesia5_super(int i) {} private T8851aesia5_super(long l) {} private T8851aesia5_super(String s, char c) {} private T8851aesia5_super(double d, short s) {} private T8851aesia5_super(byte b, float f) {} static class T8851aesia5_o extends T8851aesia5_super { T8851aesia5_o() { super( new Object() ); } } static class T8851aesia5_s extends T8851aesia5_super { T8851aesia5_s() { super("hello"); } } class T8851aesia5_b extends T8851aesia5_super { T8851aesia5_b() { super(true); } } class T8851aesia5_i extends T8851aesia5_super { T8851aesia5_i() { super(1); } } Object l_obj = new T8851aesia5_super(0L) { void foo() {} }; Object sb_obj = new T8851aesia5_super("hello", 'b') { void foo() {} }; Object bf_obj = new T8851aesia5_super((byte) 2, 1.0F) { void foo() {} }; } } compile T8851aesia5.java } {PASS}
A private constructor is not accessible in a subclassTest Case: 8.8.5.1-inaccessible-explicit-super-invocation-1Expected Result: FAIL
Regression Test:
tcltest::test 8.8.5.1-inaccessible-implicit-super-invocation-1 { A private constructor is not accessible in a subclass } { saveas T8851iisi1.java { class T8851iisi1_super { private T8851iisi1_super() {} } class T8851iisi1 extends T8851iisi1_super { T8851iisi1() {} } } compile T8851iisi1.java } {FAIL}
A private constructor is not accessible in a subclassTest Case: 8.8.5.1-inaccessible-explicit-super-invocation-args-1Expected Result: FAIL
Regression Test:
tcltest::test 8.8.5.1-inaccessible-explicit-super-invocation-1 { A private constructor is not accessible in a subclass } { saveas T8851iesi1.java { class T8851iesi1_super { private T8851iesi1_super() {} } class T8851iesi1 extends T8851iesi1_super { T8851iesi1() { super(); } } } compile T8851iesi1.java } {FAIL}
A private constructor is not accessible in a subclassTest Case: 8.8.5.1-inaccessible-explicit-super-invocation-args-2Expected Result: FAIL
Regression Test:
tcltest::test 8.8.5.1-inaccessible-explicit-super-invocation-args-1 { A private constructor is not accessible in a subclass } { saveas T8851iesia1.java { class T8851iesia1_super { private T8851iesia1_super(int i) {} } class T8851iesia1 extends T8851iesia1_super { T8851iesia1() { super(1); } } } compile T8851iesia1.java } {FAIL}
A private constructor is not accessible in a subclassTest Case: 8.8.5.1-alternate-constructor-invocation-1Expected Result: FAIL
Regression Test:
tcltest::test 8.8.5.1-inaccessible-explicit-super-invocation-args-2 { A private constructor is not accessible in a subclass } { saveas T8851iesia2.java { class T8851iesia2_super { private T8851iesia2_super(Object o) {} } class T8851iesia2 extends T8851iesia2_super { T8851iesia2() { super(null); } } } compile T8851iesia2.java } {FAIL}
An alternate constructor invocation invokes a constructor of the same classTest Case: 8.8.5.1-alternate-constructor-invocation-2Expected Result: PASS
Regression Test:
tcltest::test 8.8.5.1-alternate-constructor-invocation-1 { An alternate constructor invocation invokes a constructor of the same class } { empty_class T8851aci1 { T8851aci1() { this(0); } T8851aci1(int i) {} } } {PASS}
An alternate constructor invocation can invoke a chain of constructors in the same classTest Case: 8.8.5.1-alternate-constructor-invocation-3Expected Result: PASS
Regression Test:
tcltest::test 8.8.5.1-alternate-constructor-invocation-2 { An alternate constructor invocation can invoke a chain of constructors in the same class } { empty_class T8851aci2 { T8851aci2() { this(0); } T8851aci2(int i) { this("noggy"); } T8851aci2(String s) { this(true); } T8851aci2(boolean state) { } } } {PASS}
An alternate constructor must existExpected Result: FAIL
Regression Test:
tcltest::test 8.8.5.1-alternate-constructor-invocation-3 { An alternate constructor must exist } { empty_class T8851aci3 { T8851aci3(int i) { this(); } } } {FAIL}
tests/jls/classes/constructor-declarations/constructor-overloading
An overloaded constructor is resolved at compiler time as described in 15.9.3Expected Result: PASS
Regression Test:
tcltest::test 8.8.6-overloaded-1 { An overloaded constructor is resolved at compiler time as described in 15.9.3 } { empty_class T886o1 { T886o1(Object o) {} T886o1(String s) {} void foo() { Object obj = new T886o1(""); } } } {PASS}
tests/jls/classes/constructor-declarations/default-constructor
If a class contains no constructor declarations, then a default constructor that takes no parameters is automatically providedTest Case: 8.8.7-default-2Expected Result: PASS
Regression Test:
tcltest::test 8.8.7-default-1 { If a class contains no constructor declarations, then a default constructor that takes no parameters is automatically provided } { empty_class T887d1 { Object o = new T887d1(); } } {PASS}
If a class contains no constructor declarations, then a default constructor that takes no parameters is automatically providedTest Case: 8.8.7-throws-1Expected Result: PASS
Regression Test:
tcltest::test 8.8.7-default-2 { If a class contains no constructor declarations, then a default constructor that takes no parameters is automatically provided } { saveas T887d2.java { class T887d2_super {} class T887d2_subclass extends T887d2_super {} class T887d2 { Object o = new T887d2_subclass(); } } compile T887d2.java } {PASS}
A default constructor has no throws clauseTest Case: 8.8.7-inaccessible-default-constructor-toplevel-1Expected Result: FAIL
Regression Test:
tcltest::test 8.8.7-throws-1 { A default constructor has no throws clause } { saveas T887t1.java { class T887t1_super { T887t1_super() throws Exception { throw new Exception(); } } class T887t1_subclass extends T887t1_super {} } compile T887t1.java } {FAIL}
A private constructor is not accessible in a subclassTest Case: 8.8.7-inaccessible-default-constructor-toplevel-2Expected Result: FAIL
Regression Test:
tcltest::test 8.8.7-inaccessible-default-constructor-toplevel-1 { A private constructor is not accessible in a subclass } { saveas T887idct1.java { class T887idct1_super { private T887idct1_super() {} } class T887idct1_subclass extends T887idct1_super {} } compile T887idct1.java } {FAIL}
A constructor with default accessibility in some other package is not accessible in a subclassTest Case: 8.8.7-accessible-default-constructor-inner-1Expected Result: FAIL
Regression Test:
tcltest::test 8.8.7-inaccessible-default-constructor-toplevel-2 { A constructor with default accessibility in some other package is not accessible in a subclass } { saveas T887idct2_super.java { package T887idct2_pkg; public class T887idct2_super { T887idct2_super() {} } } saveas T887idct2.java { import T887idct2_pkg.T887idct2_super; class T887idct2_subclass extends T887idct2_super {} } compile T887idct2_super.java T887idct2.java } {FAIL}
A constructor with private accessibility can be accessed from an inner class defined inside the same classTest Case: 8.8.7-accessible-default-constructor-inner-2Expected Result: PASS
Regression Test:
tcltest::test 8.8.7-accessible-default-constructor-inner-1 { A constructor with private accessibility can be accessed from an inner class defined inside the same class } { empty_class T887adci1 { private T887adci1() {} static class T887adci1_inner extends T887adci1 {} } } {PASS}
A constructor with private accessibility can be accessed from an inner class defined inside the same classTest Case: 8.8.7-accessible-default-constructor-inner-3Expected Result: PASS
Regression Test:
tcltest::test 8.8.7-accessible-default-constructor-inner-2 { A constructor with private accessibility can be accessed from an inner class defined inside the same class } { empty_class T887adci2 { private T887adci2() {} class T887adci2_inner extends T887adci2 {} } } {PASS}
A constructor with private accessibility can be accessed from an inner class defined inside the same classExpected Result: PASS
Regression Test:
tcltest::test 8.8.7-accessible-default-constructor-inner-3 { A constructor with private accessibility can be accessed from an inner class defined inside the same class } { empty_class T887adci3 { private T887adci3() {} Object o = new T887adci3() { void f() {} }; } } {PASS}
tests/jls/interfaces/interface-declarations/interface-modifiers
should generate error on synchronized interfaceTest Case: 9.1.1-2Expected Result: FAIL
Regression Test:
tcltest::test 9.1.1-1 {should generate error on synchronized interface} { compile [saveas SynchronizedInterface.java "synchronized interface SynchronizedInterface {}"] } {FAIL}
adding the public keyword to an interface declared as public triggers a bug in the javac shipped with jdk 1.1Test Case: 9.1.1-3Expected Result: FAIL
Regression Test:
tcltest::test 9.1.1-2 {adding the public keyword to an interface declared as public triggers a bug in the javac shipped with jdk 1.1} { compile [saveas PublicSynchronizedInterface.java "public synchronized interface PublicSynchronizedInterface {}"] } {FAIL}
the modifier public can be redundantly specifiedTest Case: 9.1.1-4Expected Result: PASS
Regression Test:
tcltest::test 9.1.1-3 {the modifier public can be redundantly specified} { compile [saveas PublicInterface.java "public interface PublicInterface {}"] } {PASS}
should generate an error if a modifier is given more than onceTest Case: 9.1.1-5Expected Result: FAIL
Regression Test:
tcltest::test 9.1.1-4 {should generate an error if a modifier is given more than once} { compile [saveas PublicPublicInterface.java "public public interface PublicPublicInterface {}"] } {FAIL}
The access modifier protected pertains only to member interfacesTest Case: 9.1.1-6Expected Result: FAIL
Regression Test:
tcltest::test 9.1.1-5 {The access modifier protected pertains only to member interfaces} { compile [saveas ProtectedInterface.java "protected interface ProtectedInterface {}"] } {FAIL}
The access modifier private pertains only to member interfacesTest Case: 9.1.1-7Expected Result: FAIL
Regression Test:
tcltest::test 9.1.1-6 {The access modifier private pertains only to member interfaces} { compile [saveas PrivateInterface.java "private interface PrivateInterface {}"] } {FAIL}
The access modifier static pertains only to member interfacesExpected Result: FAIL
Regression Test:
tcltest::test 9.1.1-7 {The access modifier static pertains only to member interfaces} { compile [saveas StaticInterface.java "static interface StaticInterface {}"] } {FAIL}
tests/jls/interfaces/interface-declarations/interface-modifiers/abstract-interfaces
The compiler may generate a warning when abstract modifier is applied to an implicitly abstract interfaceTest Case: 9.1.1.1-2Expected Result: OK
Regression Test:
tcltest::test 9.1.1.1-1 { The compiler may generate a warning when abstract modifier is applied to an implicitly abstract interface } { saveas AbstractInterface.java "abstract interface AbstractInterface {}" ok_pass_or_warn [compile AbstractInterface.java] } {OK}
The compiler may generate a warning when abstract modifier is applied to an implicitly abstract inner interfaceTest Case: 9.1.1.1-3Expected Result: OK
Regression Test:
tcltest::test 9.1.1.1-2 { The compiler may generate a warning when abstract modifier is applied to an implicitly abstract inner interface } { saveas AbstractInnerInterface.java { public class AbstractInnerInterface { abstract interface Inter {} } } ok_pass_or_warn [compile AbstractInnerInterface.java] } {OK}
The compiler may generate a warning when abstract modifier is applied to an implicitly abstract inner interface that is defined inside another interfaceExpected Result: OK
Regression Test:
tcltest::test 9.1.1.1-3 { The compiler may generate a warning when abstract modifier is applied to an implicitly abstract inner interface that is defined inside another interface } { saveas AbstractInnerInterface_InInnerface.java { public interface AbstractInnerInterface_InInnerface { abstract interface Inter {} } } ok_pass_or_warn [compile AbstractInnerInterface_InInnerface.java] } {OK}
tests/jls/arrays/array-initializers
array initializer may be emptyTest Case: 10.6-syntax-2Expected Result: PASS
Regression Test:
tcltest::test 10.6-syntax-1 { array initializer may be empty } { empty_main T106s1 { int[] ia = {}; } } {PASS}
array initializer may contain initializersTest Case: 10.6-syntax-3Expected Result: PASS
Regression Test:
tcltest::test 10.6-syntax-2 { array initializer may contain initializers } { empty_main T106s2 { int[] ia = { 1 }; } } {PASS}
array initializer may contain initializersTest Case: 10.6-syntax-4Expected Result: PASS
Regression Test:
tcltest::test 10.6-syntax-3 { array initializer may contain initializers } { empty_main T106s3 { int[] ia = { 1, 2 }; } } {PASS}
array initializer may contain concluding commaTest Case: 10.6-syntax-5Expected Result: PASS
Regression Test:
tcltest::test 10.6-syntax-4 { array initializer may contain concluding comma } { empty_main T106s4 { int[] ia = { , }; } } {PASS}
array initializer may contain concluding commaTest Case: 10.6-syntax-6Expected Result: PASS
Regression Test:
tcltest::test 10.6-syntax-5 { array initializer may contain concluding comma } { empty_main T106s5 { int[] ia = { 1, }; } } {PASS}
array initializers may nestTest Case: 10.6-type-1Expected Result: PASS
Regression Test:
tcltest::test 10.6-syntax-6 { array initializers may nest } { empty_main T106i6 { int[][] iaa = { {1}, {2} }; } } {PASS}
expressions in array initializer must be assignment compatible with array typeTest Case: 10.6-type-2Expected Result: PASS
Regression Test:
tcltest::test 10.6-type-1 { expressions in array initializer must be assignment compatible with array type } { empty_main T106t1 { short s = 1; int[] ia = { s, '1' }; } } {PASS}
expressions in array initializer must be assignment compatible with array typeTest Case: 10.6-type-3Expected Result: FAIL
Regression Test:
tcltest::test 10.6-type-2 { expressions in array initializer must be assignment compatible with array type } { empty_main T106t2 { int[] ia = { 1L }; } } {FAIL}
expressions in array initializer must be assignment compatible with array typeTest Case: 10.6-type-4Expected Result: FAIL
Regression Test:
tcltest::test 10.6-type-3 { expressions in array initializer must be assignment compatible with array type } { empty_main T106t3 { int[] ia = { new Object() }; } } {FAIL}
expressions in array initializer must be assignment compatible with array typeTest Case: 10.6-type-5Expected Result: FAIL
Regression Test:
tcltest::test 10.6-type-4 { expressions in array initializer must be assignment compatible with array type } { empty_main T106t4 { int[] ia = { null }; } } {FAIL}
expressions in array initializer must be assignment compatible with array typeTest Case: 10.6-type-6Expected Result: FAIL
Regression Test:
tcltest::test 10.6-type-5 { expressions in array initializer must be assignment compatible with array type } { empty_main T106t5 { int[] ia = { System.out.println() }; } } {FAIL}
expressions in array initializer must be assignment compatible with array typeTest Case: 10.6-type-7Expected Result: FAIL
Regression Test:
tcltest::test 10.6-type-6 { expressions in array initializer must be assignment compatible with array type } { empty_main T106t6 { Object[] oa = { 1 }; } } {FAIL}
expressions in array initializer must be assignment compatible with array typeTest Case: 10.6-type-8Expected Result: PASS
Regression Test:
tcltest::test 10.6-type-7 { expressions in array initializer must be assignment compatible with array type } { empty_main T106t7 { Object[] oa = { new Object() }; } } {PASS}
expressions in array initializer must be assignment compatible with array typeTest Case: 10.6-type-9Expected Result: PASS
Regression Test:
tcltest::test 10.6-type-8 { expressions in array initializer must be assignment compatible with array type } { empty_main T106t8 { Object[] oa = { null }; } } {PASS}
expressions in array initializer must be assignment compatible with array typeTest Case: 10.6-type-10Expected Result: FAIL
Regression Test:
tcltest::test 10.6-type-9 { expressions in array initializer must be assignment compatible with array type } { empty_main T106t9 { Object[] oa = { System.out.println() }; } } {FAIL}
expressions in array initializer must be assignment compatible with array typeTest Case: 10.6-type-11Expected Result: PASS
Regression Test:
tcltest::test 10.6-type-10 { expressions in array initializer must be assignment compatible with array type } { empty_main T106t10 { int[][] iaa = { {1} }; } } {PASS}
expressions in array initializer must be assignment compatible with array typeTest Case: 10.6-type-12Expected Result: FAIL
Regression Test:
tcltest::test 10.6-type-11 { expressions in array initializer must be assignment compatible with array type } { empty_main T106t11 { int[][] iaa = { 1 }; } } {FAIL}
expressions in array initializer must be assignment compatible with array typeTest Case: 10.6-type-13Expected Result: FAIL
Regression Test:
tcltest::test 10.6-type-12 { expressions in array initializer must be assignment compatible with array type } { empty_main T106t12 { int[][] iaa = { { {1} } }; } } {FAIL}
expressions in array initializer must be assignment compatible with array typeExpected Result: PASS
Regression Test:
tcltest::test 10.6-type-13 { expressions in array initializer must be assignment compatible with array type } { empty_main T106t13 { int[][] iaa = { {1, 2}, null }; } } {PASS}
tests/jls/blocks-and-statements/labeled-statements
The scope of a label is its contained statementTest Case: 14.7-shadow-1Expected Result: PASS
Regression Test:
tcltest::test 14.7-scope-1 { The scope of a label is its contained statement } { empty_main T147scope1 { int i, j; label: i = 1; label: j = 1; } } {PASS}
Labels cannot shadow another label in the same enclosing method, constructor, or initializerTest Case: 14.7-shadow-2Expected Result: FAIL
Regression Test:
tcltest::test 14.7-shadow-1 { Labels cannot shadow another label in the same enclosing method, constructor, or initializer } { empty_main T147shadow1 { int i; test: { test: i = 1; } } } {FAIL}
Labels cannot shadow another label in the same enclosing method, constructor, or initializerTest Case: 14.7-shadow-3Expected Result: FAIL
Regression Test:
tcltest::test 14.7-shadow-2 { Labels cannot shadow another label in the same enclosing method, constructor, or initializer } { empty_main T147shadow2 { int i; test: test: i = 1; } } {FAIL}
Labels cannot shadow another label in the same immediately enclosing method, constructor, or initializer. Here, the two labels are in different immediately enclosing methods.Test Case: 14.7-same-1Expected Result: PASS
Regression Test:
tcltest::test 14.7-shadow-3 { Labels cannot shadow another label in the same immediately enclosing method, constructor, or initializer. Here, the two labels are in different immediately enclosing methods.} { empty_main T147shadow3 { test: new Object() { void foo() { int i; test: i = 1; } }; } } {PASS}
Labels can share same identifier as packageTest Case: 14.7-same-2Expected Result: PASS
Regression Test:
tcltest::test 14.7-same-1 { Labels can share same identifier as package } { compile [saveas test/T147same1.java { package test; class T147same1 { void foo() { int i; test: i = 1; new test.T147same1(); } } }] } {PASS}
Labels can share same identifier as classTest Case: 14.7-same-3Expected Result: PASS
Regression Test:
tcltest::test 14.7-same-2 { Labels can share same identifier as class } { empty_main T147same2 { int i; T147same2: i = 1; new T147same2(); } } {PASS}
Labels can share same identifier as interfaceTest Case: 14.7-same-4Expected Result: PASS
Regression Test:
tcltest::test 14.7-same-3 { Labels can share same identifier as interface } { empty_main T147same3 { int i; Cloneable: i = 1; new Cloneable() {}; } } {PASS}
Labels can share same identifier as methodTest Case: 14.7-same-5Expected Result: PASS
Regression Test:
tcltest::test 14.7-same-4 { Labels can share same identifier as method } { empty_class T147same4 { void test() {} void foo() { int i; test: i = 1; test(); } } } {PASS}
Labels can share same identifier as fieldTest Case: 14.7-same-6Expected Result: PASS
Regression Test:
tcltest::test 14.7-same-5 { Labels can share same identifier as field } { empty_class T147same5 { int test; void foo() { int i; test: i = 1; test = 1; } } } {PASS}
Labels can share same identifier as parameterTest Case: 14.7-same-7Expected Result: PASS
Regression Test:
tcltest::test 14.7-same-6 { Labels can share same identifier as parameter } { empty_class T147same6 { void foo(String[] args) { int i; args: i = 1; i = args.length; } } } {PASS}
Labels can share same identifier as local variableTest Case: 14.7-enclosed-1Expected Result: PASS
Regression Test:
tcltest::test 14.7-same-7 { Labels can share same identifier as local variable } { empty_main T147same7 { int test, i; test: i = 1; test = 1; } } {PASS}
Labels must have an enclosed statementTest Case: 14.7-enclosed-2Expected Result: FAIL
Regression Test:
tcltest::test 14.7-enclosed-1 { Labels must have an enclosed statement } { empty_main T147enclosed1 { test: } } {FAIL}
Labels must have an enclosed statementTest Case: 14.7-enclosed-3Expected Result: FAIL
Regression Test:
tcltest::test 14.7-enclosed-2 { Labels must have an enclosed statement } { empty_main T147enclosed2 { test: int i; } } {FAIL}
Labels must have an enclosed statementTest Case: 14.7-enclosed-4Expected Result: FAIL
Regression Test:
tcltest::test 14.7-enclosed-3 { Labels must have an enclosed statement } { empty_main T147enclosed3 { test: class foo() {} } } {FAIL}
Labels must have an enclosed statementTest Case: 14.7-enclosed-5Expected Result: PASS
Regression Test:
tcltest::test 14.7-enclosed-4 { Labels must have an enclosed statement } { empty_main T147enclosed4 { test: {} } } {PASS}
Labels must have an enclosed statementTest Case: 14.7-ident-1Expected Result: PASS
Regression Test:
tcltest::test 14.7-enclosed-5 { Labels must have an enclosed statement } { empty_main T147enclosed5 { test: ; } } {PASS}
Labels must be identifiersTest Case: 14.7-ident-2Expected Result: FAIL
Regression Test:
tcltest::test 14.7-ident-1 { Labels must be identifiers } { empty_main T147ident1 { int i; 1: i = 1; } } {FAIL}
Labels must be identifiersTest Case: 14.7-ident-3Expected Result: FAIL
Regression Test:
tcltest::test 14.7-ident-2 { Labels must be identifiers } { empty_main T147ident2 { int i; "label": i = 1; } } {FAIL}
Labels must be identifiersTest Case: 14.7-ident-4Expected Result: FAIL
Regression Test:
tcltest::test 14.7-ident-3 { Labels must be identifiers } { empty_main T147ident3 { int i; (label): i = 1; } } {FAIL}
Labels must be identifiersTest Case: 14.7-ident-5Expected Result: FAIL
Regression Test:
tcltest::test 14.7-ident-4 { Labels must be identifiers } { empty_main T147ident4 { int i; label.a: i = 1; } } {FAIL}
Labels must be identifiersTest Case: 14.7-ident-6Expected Result: FAIL
Regression Test:
tcltest::test 14.7-ident-5 { Labels must be identifiers } { empty_main T147ident5 { int i; int: i = 1; } } {FAIL}
Labels must be identifiers, including unicodeExpected Result: PASS
Regression Test:
tcltest::test 14.7-ident-6 { Labels must be identifiers, including unicode } { empty_main T147ident6 { int i; \u0061\u003a break a; b: break \u0062; } } {PASS}
tests/jls/blocks-and-statements/switch-statement
SwitchStatement must have () around ExpressionTest Case: 14.10-invalid-syntax-2Expected Result: FAIL
Regression Test:
tcltest::test 14.10-invalid-syntax-1 { SwitchStatement must have () around Expression } { compile [saveas T1410is1.java { class T1410is1 { void foo(int i) { switch i { default: } } } }] } {FAIL}
SwitchBlock must have {} around statementsTest Case: 14.10-invalid-syntax-3Expected Result: FAIL
Regression Test:
tcltest::test 14.10-invalid-syntax-2 { SwitchBlock must have {} around statements } { compile [saveas T1410is2.java { class T1410is2 { void foo(int i) { switch (i) default: } } }] } {FAIL}
SwitchBlockStatementGroup must begin with a SwitchLabelTest Case: 14.10-invalid-syntax-4Expected Result: FAIL
Regression Test:
tcltest::test 14.10-invalid-syntax-3 { SwitchBlockStatementGroup must begin with a SwitchLabel} { compile [saveas T1410is3.java { class T1410is3 { void foo(int i) { switch (i) { i = 0; } } } }] } {FAIL}
Duff's device is not validTest Case: 14.10-valid-1Expected Result: FAIL
Regression Test:
tcltest::test 14.10-invalid-syntax-4 { Duff's device is not valid } { compile [saveas T1410is4.java { class T1410is4 { void foo(int n) { int q = (n+7)/8; switch (n%8) { case 0: do { foo(); // Great C hack, Tom, case 7: foo(); // but it's not valid here. case 6: foo(); case 5: foo(); case 4: foo(); case 3: foo(); case 2: foo(); case 1: foo(); } while (--q >= 0); } } } }] } {FAIL}
SwitchBlockStatementGroups and SwitchLabels are optional inside a SwitchBlockTest Case: 14.10-valid-2Expected Result: PASS
Regression Test:
tcltest::test 14.10-valid-1 { SwitchBlockStatementGroups and SwitchLabels are optional inside a SwitchBlock } { switch_labels T1410v1 int {} } {PASS}
default SwitchLabel by itself is acceptableTest Case: 14.10-invalid-type-1Expected Result: PASS
Regression Test:
tcltest::test 14.10-valid-2 { default SwitchLabel by itself is acceptable } { switch_labels T1410v2 int {default:} } {PASS}
Expression type must be char, byte, short, or intTest Case: 14.10-invalid-type-2Expected Result: FAIL
Regression Test:
tcltest::test 14.10-invalid-type-1 { Expression type must be char, byte, short, or int } { switch_labels T1410it1 boolean } {FAIL}
Expression type must be char, byte, short, or intTest Case: 14.10-invalid-type-3Expected Result: FAIL
Regression Test:
tcltest::test 14.10-invalid-type-2 { Expression type must be char, byte, short, or int } { switch_labels T1410it2 float } {FAIL}
Expression type must be char, byte, short, or intTest Case: 14.10-invalid-type-4Expected Result: FAIL
Regression Test:
tcltest::test 14.10-invalid-type-3 { Expression type must be char, byte, short, or int } { switch_labels T1410it3 double } {FAIL}
Expression type must be char, byte, short, or intTest Case: 14.10-invalid-type-5Expected Result: FAIL
Regression Test:
tcltest::test 14.10-invalid-type-4 { Expression type must be char, byte, short, or int } { switch_labels T1410it4 long } {FAIL}
Expression type must be char, byte, short, or intTest Case: 14.10-invalid-type-6Expected Result: FAIL
Regression Test:
tcltest::test 14.10-invalid-type-5 { Expression type must be char, byte, short, or int } { switch_labels T1410it5 Object } {FAIL}
Expression type must be char, byte, short, or intTest Case: 14.10-valid-type-1Expected Result: FAIL
Regression Test:
tcltest::test 14.10-invalid-type-6 { Expression type must be char, byte, short, or int } { switch_labels T1410it6 String } {FAIL}
Expression type must be char, byte, short, or intTest Case: 14.10-valid-type-2Expected Result: PASS
Regression Test:
tcltest::test 14.10-valid-type-1 { Expression type must be char, byte, short, or int } { switch_labels T1410vt1 char } {PASS}
Expression type must be char, byte, short, or intTest Case: 14.10-valid-type-3Expected Result: PASS
Regression Test:
tcltest::test 14.10-valid-type-2 { Expression type must be char, byte, short, or int } { switch_labels T1410vt2 byte } {PASS}
Expression type must be char, byte, short, or intTest Case: 14.10-valid-type-4Expected Result: PASS
Regression Test:
tcltest::test 14.10-valid-type-3 { Expression type must be char, byte, short, or int } { switch_labels T1410vt3 short } {PASS}
Expression type must be char, byte, short, or intTest Case: 14.10-switchlabel-1Expected Result: PASS
Regression Test:
tcltest::test 14.10-valid-type-4 { Expression type must be char, byte, short, or int } { switch_labels T1410vt4 int } {PASS}
case label must have a ConstantExpressionTest Case: 14.10-switchlabel-2Expected Result: PASS
Regression Test:
tcltest::test 14.10-switchlabel-1 { case label must have a ConstantExpression } { switch_labels T1410sl1 int {case 0: case 1:} } {PASS}
case label must have a ConstantExpression, i++ is not a constant expression as defined by 15.28Test Case: 14.10-switchlabel-3Expected Result: FAIL
Regression Test:
tcltest::test 14.10-switchlabel-2 { case label must have a ConstantExpression, i++ is not a constant expression as defined by 15.28} { switch_labels T1410sl2 int {case (i++):} } {FAIL}
case label must have a ConstantExpression, i++ is not a constant expression as defined by 15.28Test Case: 14.10-assignable-1Expected Result: PASS
Regression Test:
tcltest::test 14.10-switchlabel-3 { case label must have a ConstantExpression, i++ is not a constant expression as defined by 15.28} { switch_labels T1410sl3 int {case 0: case (2-1): case (3-1): default:} } {PASS}
ConstantExpression must be assignable to ExpressionTest Case: 14.10-assignable-2Expected Result: PASS
Regression Test:
tcltest::test 14.10-assignable-1 { ConstantExpression must be assignable to Expression } { switch_labels T1410a1 int {case 0:} } {PASS}
ConstantExpression must be assignable to ExpressionTest Case: 14.10-assignable-3Expected Result: FAIL
Regression Test:
tcltest::test 14.10-assignable-2 { ConstantExpression must be assignable to Expression } { switch_labels T1410a2 int {case 0L:} } {FAIL}
ConstantExpression must be assignable to ExpressionTest Case: 14.10-assignable-4Expected Result: FAIL
Regression Test:
tcltest::test 14.10-assignable-3 { ConstantExpression must be assignable to Expression } { switch_labels T1410a3 int {case 0.0D:} } {FAIL}
ConstantExpression must be assignable to ExpressionTest Case: 14.10-assignable-5Expected Result: FAIL
Regression Test:
tcltest::test 14.10-assignable-4 { ConstantExpression must be assignable to Expression } { switch_labels T1410a4 int {case true:} } {FAIL}
ConstantExpression must be assignable to ExpressionTest Case: 14.10-assignable-6Expected Result: FAIL
Regression Test:
tcltest::test 14.10-assignable-5 { ConstantExpression must be assignable to Expression } { switch_labels T1410a5 byte {case 128:} } {FAIL}
ConstantExpression must be assignable to ExpressionTest Case: 14.10-assignable-7Expected Result: PASS
Regression Test:
tcltest::test 14.10-assignable-6 { ConstantExpression must be assignable to Expression } { switch_labels T1410a6 byte {case 127:} } {PASS}
ConstantExpression must be assignable to ExpressionTest Case: 14.10-assignable-8Expected Result: FAIL
Regression Test:
tcltest::test 14.10-assignable-7 { ConstantExpression must be assignable to Expression } { switch_labels T1410a7 int {case null:} } {FAIL}
ConstantExpression must be assignable to ExpressionTest Case: 14.10-assignable-9Expected Result: PASS
Regression Test:
tcltest::test 14.10-assignable-8 { ConstantExpression must be assignable to Expression } { switch_labels T1410a8 byte {case (short) 1:} } {PASS}
ConstantExpression must be assignable to ExpressionTest Case: 14.10-assignable-10Expected Result: PASS
Regression Test:
tcltest::test 14.10-assignable-9 { ConstantExpression must be assignable to Expression } { switch_labels T1410a9 byte {case '1':} } {PASS}
ConstantExpression must be assignable to ExpressionTest Case: 14.10-assignable-11Expected Result: PASS
Regression Test:
tcltest::test 14.10-assignable-10 { ConstantExpression must be assignable to Expression } { switch_labels T1410a10 char {case (short) 1:} } {PASS}
ConstantExpression must be assignable to ExpressionTest Case: 14.10-assignable-12Expected Result: PASS
Regression Test:
tcltest::test 14.10-assignable-11 { ConstantExpression must be assignable to Expression } { switch_labels T1410a11 short {case '1':} } {PASS}
ConstantExpression must be assignable to ExpressionTest Case: 14.10-duplicate-1Expected Result: PASS
Regression Test:
tcltest::test 14.10-assignable-12 { ConstantExpression must be assignable to Expression } { switch_labels T1410a12 char {case (byte) 1:} } {PASS}
No two case statements may have the same ConstantExpression valueTest Case: 14.10-duplicate-2Expected Result: FAIL
Regression Test:
tcltest::test 14.10-duplicate-1 { No two case statements may have the same ConstantExpression value } { switch_labels T1410d1 int {case 0: case 1: case 0:} } {FAIL}
No two case statements may have the same ConstantExpression valueTest Case: 14.10-duplicate-3Expected Result: FAIL
Regression Test:
tcltest::test 14.10-duplicate-2 { No two case statements may have the same ConstantExpression value } { switch_labels T1410d2 int {case 0: case 1: case (2-2):} } {FAIL}
No two case statements may have the same ConstantExpression valueTest Case: 14.10-duplicate-4Expected Result: FAIL
Regression Test:
tcltest::test 14.10-duplicate-3 { No two case statements may have the same ConstantExpression value } { switch_labels T1410d3 int {case 0: case 1: case ((2==2) ? 0 : 2):} } {FAIL}
At most 1 default statement can be associated with the same switch statementTest Case: 14.10-abrupt-completion-1Expected Result: FAIL
Regression Test:
tcltest::test 14.10-duplicate-4 { At most 1 default statement can be associated with the same switch statement } { switch_labels T1410d4 int {default: case 0: default:} } {FAIL}
break is a valid abrupt completionTest Case: 14.10-abrupt-completion-2Expected Result: PASS
Regression Test:
tcltest::test 14.10-abrupt-completion-1 { break is a valid abrupt completion } { switch_labels T1410ac1 int {case 0: break;} {case 1: break;} } {PASS}
continue is not a valid abrupt completionTest Case: 14.10-exhaustion-1Expected Result: FAIL
Regression Test:
tcltest::test 14.10-abrupt-completion-2 { continue is not a valid abrupt completion } { switch_labels T1410ac2 int {case 0: break;} {case 1: continue;} } {FAIL}
When all 256 cases explicitly listed, the specs are unclear as to whether default is reachableTest Case: 14.10-exhaustion-2Expected Result: PASS
Regression Test:
tcltest::test 14.10-exhaustion-1 { When all 256 cases explicitly listed, the specs are unclear as to whether default is reachable } { switch_labels T1410e1 byte [exhaust_list] "break; default:" } {PASS}
When all 256 cases explicitly listed, the specs are unclear as to whether the switch can complete normallyExpected Result: PASS
Regression Test:
tcltest::test 14.10-exhaustion-2 { When all 256 cases explicitly listed, the specs are unclear as to whether the switch can complete normally } { switch_labels T1410e2 byte [exhaust_list] "throw new RuntimeException();\n \}\n \{System.out.println();" } {PASS}
tests/jls/blocks-and-statements/break-statement
plain break must occur in a loop statement or switchTest Case: 14.14-plain-2Expected Result: FAIL
Regression Test:
tcltest::test 14.14-plain-1 { plain break must occur in a loop statement or switch } { empty_main T1414p1 { break; } } {FAIL}
plain break must occur in a loop statement or switchTest Case: 14.14-plain-3Expected Result: PASS
Regression Test:
tcltest::test 14.14-plain-2 { plain break must occur in a loop statement or switch } { empty_main T1414p2 { for (int i=0; i<10; i++) break; } } {PASS}
plain break must occur in a loop statement or switchTest Case: 14.14-plain-4Expected Result: PASS
Regression Test:
tcltest::test 14.14-plain-3 { plain break must occur in a loop statement or switch } { empty_main T1414p3 { int i=0; while (i++<10) break; } } {PASS}
plain break must occur in a loop statement or switchTest Case: 14.14-plain-5Expected Result: PASS
Regression Test:
tcltest::test 14.14-plain-4 { plain break must occur in a loop statement or switch } { empty_main T1414p4 { int i=0; do break; while (i++<10); } } {PASS}
plain break must occur in a loop statement or switchTest Case: 14.14-plain-6Expected Result: PASS
Regression Test:
tcltest::test 14.14-plain-5 { plain break must occur in a loop statement or switch } { empty_main T1414p5 { for (int i=0; i<10; i++) { break; } } } {PASS}
plain break must occur in a loop statement or switchTest Case: 14.14-plain-7Expected Result: PASS
Regression Test:
tcltest::test 14.14-plain-6 { plain break must occur in a loop statement or switch } { empty_main T1414p6 { int i=0; while (i++<10) { break; } } } {PASS}
plain break must occur in a loop statement or switchTest Case: 14.14-plain-8Expected Result: PASS
Regression Test:
tcltest::test 14.14-plain-7 { plain break must occur in a loop statement or switch } { empty_main T1414p7 { int i=0; do { break; } while (i++<10); } } {PASS}
plain break must occur in a loop statement or switchTest Case: 14.14-plain-9Expected Result: PASS
Regression Test:
tcltest::test 14.14-plain-8 { plain break must occur in a loop statement or switch } { empty_main T1414p8 { switch (args.length) { case 0: break; } } } {PASS}
plain break must occur in a loop statement or switchTest Case: 14.14-nonlocal-1Expected Result: FAIL
Regression Test:
tcltest::test 14.14-plain-9 { plain break must occur in a loop statement or switch } { empty_main T1414p9 { a: break; } } {FAIL}
there are no non-local jumpsTest Case: 14.14-try-1Expected Result: FAIL
Regression Test:
tcltest::test 14.14-nonlocal-1 { there are no non-local jumps } { empty_main T1414nonlocal1 { do { new Object() { { break; } }; } while (false); } } {FAIL}
the break can be interrupted by a finallyTest Case: 14.14-label-1Expected Result: PASS
Regression Test:
tcltest::test 14.14-try-1 { the break can be interrupted by a finally } { empty_main T1414try1 { do { try { try { break; } finally { // discard the break throw new Exception(); } } catch (Throwable t) { // stop the exception } int i = 1; // reachable, even though it follows a break } while (false); } } {PASS}
A label may be targeted by breakTest Case: 14.14-label-2Expected Result: PASS
Regression Test:
tcltest::test 14.14-label-1 { A label may be targeted by break } { empty_main T1414l1 { a: { for (int i=0; i<10; i++) break a; } } } {PASS}
A label may be targeted by breakTest Case: 14.14-label-3Expected Result: PASS
Regression Test:
tcltest::test 14.14-label-2 { A label may be targeted by break } { empty_main T1414l2 { a: b: for (int i=0; i<10; i++) break a; } } {PASS}
labeled break must occur in that labelTest Case: 14.14-label-4Expected Result: FAIL
Regression Test:
tcltest::test 14.14-label-3 { labeled break must occur in that label } { empty_main T1414l3 { b: break a; } } {FAIL}
labeled break must occur in that labelTest Case: 14.14-label-5Expected Result: PASS
Regression Test:
tcltest::test 14.14-label-4 { labeled break must occur in that label } { empty_main T1414l4 { a: break a; } } {PASS}
labeled break must occur in that labelTest Case: 14.14-label-6Expected Result: PASS
Regression Test:
tcltest::test 14.14-label-5 { labeled break must occur in that label } { empty_main T1414l5 { a: for (int i=0; i<10; i++) break a; } } {PASS}
labeled break must occur in that labelTest Case: 14.14-label-7Expected Result: PASS
Regression Test:
tcltest::test 14.14-label-6 { labeled break must occur in that label } { empty_main T1414l6 { int i=0; a: while (i++<10) break a; } } {PASS}
labeled break must occur in that labelTest Case: 14.14-label-8Expected Result: PASS
Regression Test:
tcltest::test 14.14-label-7 { labeled break must occur in that label } { empty_main T1414l7 { int i=0; a: do break a; while (i++<10); } } {PASS}
labeled break must occur in that labelTest Case: 14.14-label-9Expected Result: PASS
Regression Test:
tcltest::test 14.14-label-8 { labeled break must occur in that label } { empty_main T1414l8 { a: for (int i=0; i<10; i++) { break a; } } } {PASS}
labeled break must occur in that labelTest Case: 14.14-label-10Expected Result: PASS
Regression Test:
tcltest::test 14.14-label-9 { labeled break must occur in that label } { empty_main T1414l9 { int i=0; a: while (i++<10) { break a; } } } {PASS}
labeled break must occur in that labelTest Case: 14.14-label-11Expected Result: PASS
Regression Test:
tcltest::test 14.14-label-10 { labeled break must occur in that label } { empty_main T1414l10 { int i=0; a: do { break a; } while (i++<10); } } {PASS}
labeled break must occur in that labelTest Case: 14.14-label-12Expected Result: PASS
Regression Test:
tcltest::test 14.14-label-11 { labeled break must occur in that label } { empty_main T1414l11 { a: switch (args.length) { case 0: break a; } } } {PASS}
there are no non-local jumpsTest Case: 14.14-label-13Expected Result: FAIL
Regression Test:
tcltest::test 14.14-label-12 { there are no non-local jumps } { empty_main T1414l12 { a: do { new Object() { { break a; } }; } while (false); } } {FAIL}
the break can be interrupted by a finallyTest Case: 14.14-arg-1Expected Result: PASS
Regression Test:
tcltest::test 14.14-label-13 { the break can be interrupted by a finally } { empty_main T1414l13 { a: do { try { try { break a; } finally { // discard the break throw new Exception(); } } catch (Throwable t) { // stop the exception } int i = 1; // reachable, even though it follows a break } while (false); } } {PASS}
The arg to break must be an identifierTest Case: 14.14-arg-2Expected Result: FAIL
Regression Test:
tcltest::test 14.14-arg-1 { The arg to break must be an identifier } { empty_main T1414a1 { a: do { break 1; } while (false); } } {FAIL}
The arg to break must be an identifierTest Case: 14.14-arg-3Expected Result: FAIL
Regression Test:
tcltest::test 14.14-arg-2 { The arg to break must be an identifier } { empty_main T1414a2 { a: do { break "a"; } while (false); } } {FAIL}
The arg to break must be an identifierTest Case: 14.14-arg-4Expected Result: FAIL
Regression Test:
tcltest::test 14.14-arg-3 { The arg to break must be an identifier } { empty_main T1414a3 { a: do { break (a); } while (false); } } {FAIL}
The arg to break must be an identifierExpected Result: FAIL
Regression Test:
tcltest::test 14.14-arg-4 { The arg to break must be an identifier } { empty_main T1414a4 { a: do { break a.a; } while (false); } } {FAIL}
tests/jls/blocks-and-statements/continue-statement
continue must occur in a loop statementTest Case: 14.15-plain-2Expected Result: FAIL
Regression Test:
tcltest::test 14.15-plain-1 { continue must occur in a loop statement } { empty_main T1415p1 { continue; } } {FAIL}
continue must occur in a loop statementTest Case: 14.15-plain-3Expected Result: PASS
Regression Test:
tcltest::test 14.15-plain-2 { continue must occur in a loop statement } { empty_main T1415p2 { for (int i=0; i<10; i++) continue; } } {PASS}
continue must occur in a loop statementTest Case: 14.15-plain-4Expected Result: PASS
Regression Test:
tcltest::test 14.15-plain-3 { continue must occur in a loop statement } { empty_main T1415p3 { int i=0; while (i++<10) continue; } } {PASS}
continue must occur in a loop statementTest Case: 14.15-plain-5Expected Result: PASS
Regression Test:
tcltest::test 14.15-plain-4 { continue must occur in a loop statement } { empty_main T1415p4 { int i=0; do continue; while (i++<10); } } {PASS}
continue must occur in a loop statementTest Case: 14.15-plain-6Expected Result: PASS
Regression Test:
tcltest::test 14.15-plain-5 { continue must occur in a loop statement } { empty_main T1415p5 { for (int i=0; i<10; i++) { continue; } } } {PASS}
continue must occur in a loop statementTest Case: 14.15-plain-7Expected Result: PASS
Regression Test:
tcltest::test 14.15-plain-6 { continue must occur in a loop statement } { empty_main T1415p6 { int i=0; while (i++<10) { continue; } } } {PASS}
continue must occur in a loop statementTest Case: 14.15-plain-8Expected Result: PASS
Regression Test:
tcltest::test 14.15-plain-7 { continue must occur in a loop statement } { empty_main T1415p7 { int i=0; do { continue; } while (i++<10); } } {PASS}
continue must occur in a loop statementTest Case: 14.15-nonlocal-1Expected Result: FAIL
Regression Test:
tcltest::test 14.15-plain-8 { continue must occur in a loop statement } { empty_main T1415p8 { switch (args.length) { case 0: continue; } } } {FAIL}
there are no non-local jumpsTest Case: 14.15-try-1Expected Result: FAIL
Regression Test:
tcltest::test 14.15-nonlocal-1 { there are no non-local jumps } { empty_main T1415nonlocal1 { do { new Object() { { continue; } }; } while (false); } } {FAIL}
the continue can be interrupted by a finallyTest Case: 14.15-label-1Expected Result: PASS
Regression Test:
tcltest::test 14.15-try-1 { the continue can be interrupted by a finally } { empty_main T1415try1 { do { try { try { continue; } finally { // discard the continue throw new Exception(); } } catch (Throwable t) { // stop the exception } int i = 1; // reachable, even though it follows a continue } while (false); } } {PASS}
A label targeted by continue must have a loop as its statmentTest Case: 14.15-label-2Expected Result: FAIL
Regression Test:
tcltest::test 14.15-label-1 { A label targeted by continue must have a loop as its statment } { empty_main T1415l1 { a: { for (int i=0; i<10; i++) continue a; } } } {FAIL}
A label targeted by continue must have a loop as its statmentTest Case: 14.15-label-3Expected Result: FAIL
Regression Test:
tcltest::test 14.15-label-2 { A label targeted by continue must have a loop as its statment } { empty_main T1415l2 { a: b: for (int i=0; i<10; i++) continue a; } } {FAIL}
labeled continue must occur in that labelTest Case: 14.15-label-4Expected Result: FAIL
Regression Test:
tcltest::test 14.15-label-3 { labeled continue must occur in that label } { empty_main T1415l3 { b: continue a; } } {FAIL}
continue must occur in a loop statementTest Case: 14.15-label-5Expected Result: FAIL
Regression Test:
tcltest::test 14.15-label-4 { continue must occur in a loop statement } { empty_main T1415l4 { a: continue a; } } {FAIL}
continue must occur in a loop statementTest Case: 14.15-label-6Expected Result: PASS
Regression Test:
tcltest::test 14.15-label-5 { continue must occur in a loop statement } { empty_main T1415l5 { a: for (int i=0; i<10; i++) continue a; } } {PASS}
continue must occur in a loop statementTest Case: 14.15-label-7Expected Result: PASS
Regression Test:
tcltest::test 14.15-label-6 { continue must occur in a loop statement } { empty_main T1415l6 { int i=0; a: while (i++<10) continue a; } } {PASS}
continue must occur in a loop statementTest Case: 14.15-label-8Expected Result: PASS
Regression Test:
tcltest::test 14.15-label-7 { continue must occur in a loop statement } { empty_main T1415l7 { int i=0; a: do continue a; while (i++<10); } } {PASS}
continue must occur in a loop statementTest Case: 14.15-label-9Expected Result: PASS
Regression Test:
tcltest::test 14.15-label-8 { continue must occur in a loop statement } { empty_main T1415l8 { a: for (int i=0; i<10; i++) { continue a; } } } {PASS}
continue must occur in a loop statementTest Case: 14.15-label-10Expected Result: PASS
Regression Test:
tcltest::test 14.15-label-9 { continue must occur in a loop statement } { empty_main T1415l9 { int i=0; a: while (i++<10) { continue a; } } } {PASS}
continue must occur in a loop statementTest Case: 14.15-label-11Expected Result: PASS
Regression Test:
tcltest::test 14.15-label-10 { continue must occur in a loop statement } { empty_main T1415l10 { int i=0; a: do { continue a; } while (i++<10); } } {PASS}
continue must occur in a loop statementTest Case: 14.15-nonlocal-2Expected Result: FAIL
Regression Test:
tcltest::test 14.15-label-11 { continue must occur in a loop statement } { empty_main T1415l11 { a: switch (args.length) { case 0: continue a; } } } {FAIL}
there are no non-local jumpsTest Case: 14.15-try-2Expected Result: FAIL
Regression Test:
tcltest::test 14.15-nonlocal-2 { there are no non-local jumps } { empty_main T1415nonlocal2 { a: do { new Object() { { continue a; } }; } while (false); } } {FAIL}
the continue can be interrupted by a finallyTest Case: 14.15-arg-1Expected Result: PASS
Regression Test:
tcltest::test 14.15-try-2 { the continue can be interrupted by a finally } { empty_main T1415try2 { a: do { try { try { continue a; } finally { // discard the continue throw new Exception(); } } catch (Throwable t) { // stop the exception } int i = 1; // reachable, even though it follows a continue } while (false); } } {PASS}
The arg to continue must be an identifierTest Case: 14.15-arg-2Expected Result: FAIL
Regression Test:
tcltest::test 14.15-arg-1 { The arg to continue must be an identifier } { empty_main T1415a1 { a: do { continue 1; } while (false); } } {FAIL}
The arg to continue must be an identifierTest Case: 14.15-arg-3Expected Result: FAIL
Regression Test:
tcltest::test 14.15-arg-2 { The arg to continue must be an identifier } { empty_main T1415a2 { a: do { continue "a"; } while (false); } } {FAIL}
The arg to continue must be an identifierTest Case: 14.15-arg-4Expected Result: FAIL
Regression Test:
tcltest::test 14.15-arg-3 { The arg to continue must be an identifier } { empty_main T1415a3 { a: do { continue (a); } while (false); } } {FAIL}
The arg to continue must be an identifierExpected Result: FAIL
Regression Test:
tcltest::test 14.15-arg-4 { The arg to continue must be an identifier } { empty_main T1415a4 { a: do { continue a.a; } while (false); } } {FAIL}
tests/jls/blocks-and-statements/unreachable-statements
Example of valid unreachable code, since value analysis is not madeTest Case: 14.20-block-1Expected Result: PASS
Regression Test:
tcltest::test 14.20-valid-1 { Example of valid unreachable code, since value analysis is not made } { empty_main T1420valid1 { int n = 5, k; while (n > 7) k = 2; } } {PASS}
Empty blocks complete normally iff reachableTest Case: 14.20-block-2Expected Result: PASS
Regression Test:
tcltest::test 14.20-block-1 { Empty blocks complete normally iff reachable } { empty_main T1420block1 { {} int i; } } {PASS}
Non-empty blocks complete normally iff last statement doesTest Case: 14.20-block-3Expected Result: PASS
Regression Test:
tcltest::test 14.20-block-2 { Non-empty blocks complete normally iff last statement does } { empty_main T1420block2 { { int i; } int j; } } {PASS}
Non-empty blocks complete normally iff last statement doesTest Case: 14.20-block-4Expected Result: FAIL
Regression Test:
tcltest::test 14.20-block-3 { Non-empty blocks complete normally iff last statement does } { empty_main T1420block3 { { return; } int i; } } {FAIL}
Non-empty blocks complete normally iff last statement doesTest Case: 14.20-block-5Expected Result: FAIL
Regression Test:
tcltest::test 14.20-block-4 { Non-empty blocks complete normally iff last statement does } { empty_main T1420block4 { { return; } ; } } {FAIL}
Non-empty blocks complete normally iff last statement doesTest Case: 14.20-block-6Expected Result: FAIL
Regression Test:
tcltest::test 14.20-block-5 { Non-empty blocks complete normally iff last statement does } { empty_main T1420block5 { { return; } {} } } {FAIL}
Non-empty blocks complete normally iff last statement doesTest Case: 14.20-block-7Expected Result: FAIL
Regression Test:
tcltest::test 14.20-block-6 { Non-empty blocks complete normally iff last statement does } { empty_main T1420block6 { { return; } { int x=3; } } } {FAIL}
First block statement is reachable iff block is; all others iff the preceding statement completes normallyTest Case: 14.20-block-8Expected Result: PASS
Regression Test:
tcltest::test 14.20-block-7 { First block statement is reachable iff block is; all others iff the preceding statement completes normally } { empty_main T1420block7 { int i; int j; } } {PASS}
First block statement is reachable iff block is; all others iff the preceding statement completes normallyTest Case: 14.20-block-9Expected Result: FAIL
Regression Test:
tcltest::test 14.20-block-8 { First block statement is reachable iff block is; all others iff the preceding statement completes normally } { empty_main T1420block8 { return; int i; } } {FAIL}
First block statement is reachable iff block is; all others iff the preceding statement completes normallyTest Case: 14.20-block-10Expected Result: FAIL
Regression Test:
tcltest::test 14.20-block-9 { First block statement is reachable iff block is; all others iff the preceding statement completes normally } { empty_main T1420block9 { return; ; } } {FAIL}
First block statement is reachable iff block is; all others iff the preceding statement completes normallyTest Case: 14.20-block-11Expected Result: FAIL
Regression Test:
tcltest::test 14.20-block-10 { First block statement is reachable iff block is; all others iff the preceding statement completes normally } { empty_main T1420block10 { return; {} } } {FAIL}
First block statement is reachable iff block is; all others iff the preceding statement completes normallyTest Case: 14.20-local-1Expected Result: FAIL
Regression Test:
tcltest::test 14.20-block-11 { First block statement is reachable iff block is; all others iff the preceding statement completes normally } { empty_main T1420block11 { return; { int x=3; } } } {FAIL}
Local class declarations can complete normally iff reachableTest Case: 14.20-local-2Expected Result: PASS
Regression Test:
tcltest::test 14.20-local-1 { Local class declarations can complete normally iff reachable } { empty_main T1420local1 { class bar {} int i; } } {PASS}
Local class declarations can complete normally iff reachableTest Case: 14.20-local-3Expected Result: FAIL
Regression Test:
tcltest::test 14.20-local-2 { Local class declarations can complete normally iff reachable } { empty_main T1420local2 { return; class bar {} } } {FAIL}
Local variable declarations can complete normally iff reachableTest Case: 14.20-local-4Expected Result: PASS
Regression Test:
tcltest::test 14.20-local-3 { Local variable declarations can complete normally iff reachable } { empty_main T1420local3 { int i; int j; } } {PASS}
Local variable declarations can complete normally iff reachableTest Case: 14.20-empty-1Expected Result: FAIL
Regression Test:
tcltest::test 14.20-local-4 { Local variable declarations can complete normally iff reachable } { empty_main T1420local4 { return; int j; } } {FAIL}
The empty statement completes normally iff reachableTest Case: 14.20-label-1Expected Result: PASS
Regression Test:
tcltest::test 14.20-empty-1 { The empty statement completes normally iff reachable } { empty_main T1420empty1 { ; int i; } } {PASS}
Labeled statements can complete normally if contained statement can as wellTest Case: 14.20-label-2Expected Result: PASS
Regression Test:
tcltest::test 14.20-label-1 { Labeled statements can complete normally if contained statement can as well } { empty_main T1420label1 { int i; a: i = 1; int j; } } {PASS}
Labeled statements can complete normally if it contains a reachable break to exit the labelTest Case: 14.20-label-3Expected Result: PASS
Regression Test:
tcltest::test 14.20-label-2 { Labeled statements can complete normally if it contains a reachable break to exit the label } { empty_main T1420label2 { a: break a; int i; } } {PASS}
Labeled statements can complete normally if it contains a reachable break to exit the labelTest Case: 14.20-label-4Expected Result: PASS
Regression Test:
tcltest::test 14.20-label-3 { Labeled statements can complete normally if it contains a reachable break to exit the label } { empty_main T1420label3 { a: while (true) break a; int i; } } {PASS}
Labeled statements without exiting break or normal completion of contained statement do not complete normallyTest Case: 14.20-label-5Expected Result: FAIL
Regression Test:
tcltest::test 14.20-label-4 { Labeled statements without exiting break or normal completion of contained statement do not complete normally } { empty_main T1420label4 { a: return; int i; } } {FAIL}
Labeled statements without exiting break or normal completion of contained statement do not complete normallyTest Case: 14.20-label-6Expected Result: FAIL
Regression Test:
tcltest::test 14.20-label-5 { Labeled statements without exiting break or normal completion of contained statement do not complete normally } { empty_main T1420label5 { a: return; ; } } {FAIL}
Labeled statements without exiting break or normal completion of contained statement do not complete normallyTest Case: 14.20-label-7Expected Result: FAIL
Regression Test:
tcltest::test 14.20-label-6 { Labeled statements without exiting break or normal completion of contained statement do not complete normally } { empty_main T1420label6 { a: return; {} } } {FAIL}
Labeled statements without exiting break or normal completion of contained statement do not complete normallyTest Case: 14.20-label-8Expected Result: FAIL
Regression Test:
tcltest::test 14.20-label-7 { Labeled statements without exiting break or normal completion of contained statement do not complete normally } { empty_main T1420label7 { a: return; { int x=3; } } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-label-9Expected Result: FAIL
Regression Test:
tcltest::test 14.20-label-8 { The break is interrupted by the try-finally } { empty_main T1420label8 { a: try { break a; } finally { return; } int i; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-label-10Expected Result: FAIL
Regression Test:
tcltest::test 14.20-label-9 { The break is interrupted by the try-finally } { empty_main T1420label9 { a: try { break a; } finally { return; } ; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-label-11Expected Result: FAIL
Regression Test:
tcltest::test 14.20-label-10 { The break is interrupted by the try-finally } { empty_main T1420label10 { a: try { break a; } finally { return; } {} } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-label-12Expected Result: FAIL
Regression Test:
tcltest::test 14.20-label-11 { The break is interrupted by the try-finally } { empty_main T1420label11 { a: try { break a; } finally { return; } { int x=3; } } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-label-13Expected Result: FAIL
Regression Test:
tcltest::test 14.20-label-12 { The break is interrupted by the try-finally } { empty_main T1420label12 { a: try { throw new Exception(); } catch (Exception e) { break a; } finally { return; } int i; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-label-14Expected Result: FAIL
Regression Test:
tcltest::test 14.20-label-13 { The break is interrupted by the try-finally } { empty_main T1420label13 { a: try { throw new Exception(); } catch (Exception e) { break a; } finally { return; } ; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-label-15Expected Result: FAIL
Regression Test:
tcltest::test 14.20-label-14 { The break is interrupted by the try-finally } { empty_main T1420label14 { a: try { throw new Exception(); } catch (Exception e) { break a; } finally { return; } {} } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-expression-1Expected Result: FAIL
Regression Test:
tcltest::test 14.20-label-15 { The break is interrupted by the try-finally } { empty_main T1420label15 { a: try { throw new Exception(); } catch (Exception e) { break a; } finally { return; } { int x=3; } } } {FAIL}
Expression statements can complete normally iff reachableTest Case: 14.20-expression-2Expected Result: PASS
Regression Test:
tcltest::test 14.20-expression-1 { Expression statements can complete normally iff reachable } { empty_main T1420expression1 { System.out.println(); int i; i = 1; i++; --i; new Object(); new Object() {}; } } {PASS}
Expression statements can complete normally iff reachable (even if stricter analysis shows otherwise)Test Case: 14.20-switch-1Expected Result: PASS
Regression Test:
tcltest::test 14.20-expression-2 { Expression statements can complete normally iff reachable (even if stricter analysis shows otherwise) } { empty_class T1420expression2 { void die() { throw new RuntimeException(); } void foo() { System.exit(1); // never returns die(); // always abrupt exit with exception Object o = new Object[Integer.MAX_VALUE][Integer.MAX_VALUE][Integer.MAX_VALUE]; // almost a guaranteed OutOfMemoryError foo(); // recursion short-circuits rest of method int i; // will never get here, but it is reachable } } } {PASS}
A switch statement can complete normally if: The last statement in the switch block can complete normally.Test Case: 14.20-switch-2Expected Result: PASS
Regression Test:
tcltest::test 14.20-switch-1 { A switch statement can complete normally if: The last statement in the switch block can complete normally. } { empty_main T1420switch1 { switch (args.length) { case 0: int i; } int j; } } {PASS}
A switch statement can complete normally if: The switch block is empty or contains only switch labels.Test Case: 14.20-switch-3Expected Result: PASS
Regression Test:
tcltest::test 14.20-switch-2 { A switch statement can complete normally if: The switch block is empty or contains only switch labels. } { empty_main T1420switch2 { switch (args.length) {} int i; } } {PASS}
A switch statement can complete normally if: The switch block is empty or contains only switch labels.Test Case: 14.20-switch-4Expected Result: PASS
Regression Test:
tcltest::test 14.20-switch-3 { A switch statement can complete normally if: The switch block is empty or contains only switch labels. } { empty_main T1420switch3 { switch (args.length) { case 0: } int i; } } {PASS}
A switch statement can complete normally if: There is at least one switch label after the last switch block statement group.Test Case: 14.20-switch-5Expected Result: PASS
Regression Test:
tcltest::test 14.20-switch-4 { A switch statement can complete normally if: There is at least one switch label after the last switch block statement group. } { empty_main T1420switch4 { switch (args.length) { case 0: return; case 1: } int i; } } {PASS}
A switch statement can complete normally if: The switch block does not contain a default label.Test Case: 14.20-switch-6Expected Result: PASS
Regression Test:
tcltest::test 14.20-switch-5 { A switch statement can complete normally if: The switch block does not contain a default label. } { empty_main T1420switch5 { switch (args.length) { case 0: return; } int i; } } {PASS}
A switch statement can complete normally if: There is a reachable break statement that exits the switch statement.Test Case: 14.20-switch-7Expected Result: PASS
Regression Test:
tcltest::test 14.20-switch-6 { A switch statement can complete normally if: There is a reachable break statement that exits the switch statement. } { empty_main T1420switch6 { switch (args.length) { default: return; case 0: break; } int i; } } {PASS}
A switch statement cannot complete normally if all five preceding conditions are not metTest Case: 14.20-switch-8Expected Result: FAIL
Regression Test:
tcltest::test 14.20-switch-7 { A switch statement cannot complete normally if all five preceding conditions are not met } { empty_main T1420switch7 { switch (args.length) { default: return; } int i; } } {FAIL}
A switch statement cannot complete normally if all five preceding conditions are not metTest Case: 14.20-switch-9Expected Result: FAIL
Regression Test:
tcltest::test 14.20-switch-8 { A switch statement cannot complete normally if all five preceding conditions are not met } { empty_main T1420switch8 { switch (args.length) { default: return; } ; } } {FAIL}
A switch statement cannot complete normally if all five preceding conditions are not metTest Case: 14.20-switch-10Expected Result: FAIL
Regression Test:
tcltest::test 14.20-switch-9 { A switch statement cannot complete normally if all five preceding conditions are not met } { empty_main T1420switch9 { switch (args.length) { default: return; } {} } } {FAIL}
A switch statement cannot complete normally if all five preceding conditions are not metTest Case: 14.20-switch-11Expected Result: FAIL
Regression Test:
tcltest::test 14.20-switch-10 { A switch statement cannot complete normally if all five preceding conditions are not met } { empty_main T1420switch10 { switch (args.length) { default: return; } { int x=3; } } } {FAIL}
A switchblock statement is reachable if it bears a switch labelTest Case: 14.20-switch-12Expected Result: PASS
Regression Test:
tcltest::test 14.20-switch-11 { A switchblock statement is reachable if it bears a switch label } { switch_labels T1420switch11 int { case 0: return; case 1: boolean b; } } {PASS}
A switchblock statement is reachable if a prior statement can complete normallyTest Case: 14.20-switch-13Expected Result: PASS
Regression Test:
tcltest::test 14.20-switch-12 { A switchblock statement is reachable if a prior statement can complete normally } { switch_labels T1420switch12 int { case 0: boolean b1; boolean b2; } } {PASS}
A switchblock statement is unreachable iff it bears no label and the prior statement cannot complete normallyTest Case: 14.20-switch-14Expected Result: FAIL
Regression Test:
tcltest::test 14.20-switch-13 { A switchblock statement is unreachable iff it bears no label and the prior statement cannot complete normally } { switch_labels T1420switch13 int { case 0: return; int i; } } {FAIL}
A switchblock statement is unreachable iff it bears no label and the prior statement cannot complete normallyTest Case: 14.20-switch-15Expected Result: FAIL
Regression Test:
tcltest::test 14.20-switch-14 { A switchblock statement is unreachable iff it bears no label and the prior statement cannot complete normally } { switch_labels T1420switch14 int { case 0: return; ; } } {FAIL}
A switchblock statement is unreachable iff it bears no label and the prior statement cannot complete normallyTest Case: 14.20-switch-16Expected Result: FAIL
Regression Test:
tcltest::test 14.20-switch-15 { A switchblock statement is unreachable iff it bears no label and the prior statement cannot complete normally } { switch_labels T1420switch15 int { case 0: return; {} } } {FAIL}
A switchblock statement is unreachable iff it bears no label and the prior statement cannot complete normallyTest Case: 14.20-switch-17Expected Result: FAIL
Regression Test:
tcltest::test 14.20-switch-16 { A switchblock statement is unreachable iff it bears no label and the prior statement cannot complete normally } { switch_labels T1420switch16 int { case 0: return; { int x=3; } } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-switch-18Expected Result: FAIL
Regression Test:
tcltest::test 14.20-switch-17 { The break is interrupted by the try-finally } { empty_main T1420switch17 { switch (args.length) { default: try { break; } finally { return; } } int i; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-switch-19Expected Result: FAIL
Regression Test:
tcltest::test 14.20-switch-18 { The break is interrupted by the try-finally } { empty_main T1420switch18 { switch (args.length) { default: try { break; } finally { return; } } ; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-switch-20Expected Result: FAIL
Regression Test:
tcltest::test 14.20-switch-19 { The break is interrupted by the try-finally } { empty_main T1420switch19 { switch (args.length) { default: try { break; } finally { return; } } {} } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-switch-21Expected Result: FAIL
Regression Test:
tcltest::test 14.20-switch-20 { The break is interrupted by the try-finally } { empty_main T1420switch20 { switch (args.length) { default: try { break; } finally { return; } } { int x=3; } } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-switch-22Expected Result: FAIL
Regression Test:
tcltest::test 14.20-switch-21 { The break is interrupted by the try-finally } { empty_main T1420switch21 { switch (args.length) { default: try { throw new Exception(); } catch (Exception e) { break; } finally { return; } } int i; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-switch-23Expected Result: FAIL
Regression Test:
tcltest::test 14.20-switch-22 { The break is interrupted by the try-finally } { empty_main T1420switch22 { switch (args.length) { default: try { throw new Exception(); } catch (Exception e) { break; } finally { return; } } ; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-switch-24Expected Result: FAIL
Regression Test:
tcltest::test 14.20-switch-23 { The break is interrupted by the try-finally } { empty_main T1420switch23 { switch (args.length) { default: try { throw new Exception(); } catch (Exception e) { break; } finally { return; } } {} } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-while-1Expected Result: FAIL
Regression Test:
tcltest::test 14.20-switch-24 { The break is interrupted by the try-finally } { empty_main T1420switch24 { switch (args.length) { default: try { throw new Exception(); } catch (Exception e) { break; } finally { return; } } { int x=3; } } } {FAIL}
A while statement can complete normally if: The condition expression is not a constant expression with value trueTest Case: 14.20-while-2Expected Result: PASS
Regression Test:
tcltest::test 14.20-while-1 { A while statement can complete normally if: The condition expression is not a constant expression with value true } { empty_main T1420while1 { boolean b = true; while (b); int j; } } {PASS}
A while statement can complete normally if: There is a reachable break statement that exits the while statement.Test Case: 14.20-while-3Expected Result: PASS
Regression Test:
tcltest::test 14.20-while-2 { A while statement can complete normally if: There is a reachable break statement that exits the while statement. } { empty_main T1420while2 { while (true) break; int i; } } {PASS}
A while statement cannot complete normally iff there is no break and the condition is constant trueTest Case: 14.20-while-4Expected Result: FAIL
Regression Test:
tcltest::test 14.20-while-3 { A while statement cannot complete normally iff there is no break and the condition is constant true } { empty_main T1420while3 { while (true); int i; } } {FAIL}
A while statement cannot complete normally iff there is no break and the condition is constant trueTest Case: 14.20-while-5Expected Result: FAIL
Regression Test:
tcltest::test 14.20-while-4 { A while statement cannot complete normally iff there is no break and the condition is constant true } { empty_main T1420while4 { while (true); ; } } {FAIL}
A while statement cannot complete normally iff there is no break and the condition is constant trueTest Case: 14.20-while-6Expected Result: FAIL
Regression Test:
tcltest::test 14.20-while-5 { A while statement cannot complete normally iff there is no break and the condition is constant true } { empty_main T1420while5 { while (true); {} } } {FAIL}
A while statement cannot complete normally iff there is no break and the condition is constant trueTest Case: 14.20-while-7Expected Result: FAIL
Regression Test:
tcltest::test 14.20-while-6 { A while statement cannot complete normally iff there is no break and the condition is constant true } { empty_main T1420while6 { while (true); { int x=3; } } } {FAIL}
The contained statement of a while is unreachable iff the condition is constant falseTest Case: 14.20-while-8Expected Result: PASS
Regression Test:
tcltest::test 14.20-while-7 { The contained statement of a while is unreachable iff the condition is constant false } { empty_main T1420while7 { boolean b = false; while (b) b = false; int i; } } {PASS}
The contained statement of a while is unreachable iff the condition is constant falseTest Case: 14.20-while-9Expected Result: FAIL
Regression Test:
tcltest::test 14.20-while-8 { The contained statement of a while is unreachable iff the condition is constant false } { empty_main T1420while8 { int i; while (false) i = 1; } } {FAIL}
The contained statement of a while is unreachable iff the condition is constant falseTest Case: 14.20-while-10Expected Result: FAIL
Regression Test:
tcltest::test 14.20-while-9 { The contained statement of a while is unreachable iff the condition is constant false } { empty_main T1420while9 { while (false); } } {FAIL}
The contained statement of a while is unreachable iff the condition is constant falseTest Case: 14.20-while-11Expected Result: FAIL
Regression Test:
tcltest::test 14.20-while-10 { The contained statement of a while is unreachable iff the condition is constant false } { empty_main T1420while10 { while (false) {} } } {FAIL}
The contained statement of a while is unreachable iff the condition is constant falseTest Case: 14.20-while-12Expected Result: FAIL
Regression Test:
tcltest::test 14.20-while-11 { The contained statement of a while is unreachable iff the condition is constant false } { empty_main T1420while11 { while (false) { int x=3; } } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-while-13Expected Result: FAIL
Regression Test:
tcltest::test 14.20-while-12 { The break is interrupted by the try-finally } { empty_main T1420while12 { while (true) { try { break; } finally { return; } } int i; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-while-14Expected Result: FAIL
Regression Test:
tcltest::test 14.20-while-13 { The break is interrupted by the try-finally } { empty_main T1420while13 { while (true) { try { break; } finally { return; } } ; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-while-15Expected Result: FAIL
Regression Test:
tcltest::test 14.20-while-14 { The break is interrupted by the try-finally } { empty_main T1420while14 { while (true) { try { break; } finally { return; } } {} } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-while-16Expected Result: FAIL
Regression Test:
tcltest::test 14.20-while-15 { The break is interrupted by the try-finally } { empty_main T1420while15 { while (true) { try { break; } finally { return; } } { int x=3; } } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-while-17Expected Result: FAIL
Regression Test:
tcltest::test 14.20-while-16 { The break is interrupted by the try-finally } { empty_main T1420while16 { while (true) { try { throw new Exception(); } catch (Exception e) { break; } finally { return; } } int i; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-while-18Expected Result: FAIL
Regression Test:
tcltest::test 14.20-while-17 { The break is interrupted by the try-finally } { empty_main T1420while17 { while (true) { try { throw new Exception(); } catch (Exception e) { break; } finally { return; } } ; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-while-19Expected Result: FAIL
Regression Test:
tcltest::test 14.20-while-18 { The break is interrupted by the try-finally } { empty_main T1420while18 { while (true) { try { throw new Exception(); } catch (Exception e) { break; } finally { return; } } {} } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-do-1Expected Result: FAIL
Regression Test:
tcltest::test 14.20-while-19 { The break is interrupted by the try-finally } { empty_main T1420while19 { while (true) { try { throw new Exception(); } catch (Exception e) { break; } finally { return; } } { int x=3; } } } {FAIL}
A do statement can complete normally if: The contained statement can complete normally and the condition is not constant trueTest Case: 14.20-do-2Expected Result: PASS
Regression Test:
tcltest::test 14.20-do-1 { A do statement can complete normally if: The contained statement can complete normally and the condition is not constant true } { empty_main T1420do1 { boolean b = true; do {} while (b); int i; } } {PASS}
A do statement can complete normally if: The do statement contains a reachable unlabeled continue statement for the do, with condition not constant trueTest Case: 14.20-do-3Expected Result: PASS
Regression Test:
tcltest::test 14.20-do-2 { A do statement can complete normally if: The do statement contains a reachable unlabeled continue statement for the do, with condition not constant true } { empty_main T1420do2 { boolean b = true; do continue; while (b); int i; } } {PASS}
A do statement can complete normally if: The do statement contains a reachable labeled continue statement for the do, with condition not constant trueTest Case: 14.20-do-4Expected Result: PASS
Regression Test:
tcltest::test 14.20-do-3 { A do statement can complete normally if: The do statement contains a reachable labeled continue statement for the do, with condition not constant true } { empty_main T1420do3 { boolean b = true; a: do continue a; while (b); int i; } } {PASS}
A do statement can complete normally if: There is a reachable break statement that exits the do statement.Test Case: 14.20-do-5Expected Result: PASS
Regression Test:
tcltest::test 14.20-do-4 { A do statement can complete normally if: There is a reachable break statement that exits the do statement. } { empty_main T1420do4 { do break; while (true); int i; } } {PASS}
A do statement cannot complete normally iff all four preceding conditions are not metTest Case: 14.20-do-6Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-5 { A do statement cannot complete normally iff all four preceding conditions are not met } { empty_main T1420do5 { int i; do i = 1; while (true); int j; } } {FAIL}
A do statement cannot complete normally iff all four preceding conditions are not metTest Case: 14.20-do-7Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-6 { A do statement cannot complete normally iff all four preceding conditions are not met } { empty_main T1420do6 { int i; do i = 1; while (true); ; } } {FAIL}
A do statement cannot complete normally iff all four preceding conditions are not metTest Case: 14.20-do-8Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-7 { A do statement cannot complete normally iff all four preceding conditions are not met } { empty_main T1420do7 { int i; do i = 1; while (true); {} } } {FAIL}
A do statement cannot complete normally iff all four preceding conditions are not metTest Case: 14.20-do-9Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-8 { A do statement cannot complete normally iff all four preceding conditions are not met } { empty_main T1420do8 { int i; do i = 1; while (true); { int x=3; } } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-do-10Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-9 { The break is interrupted by the try-finally } { empty_main T1420do9 { do try { break; } finally { return; } while (true); int i; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-do-11Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-10 { The break is interrupted by the try-finally } { empty_main T1420do10 { do try { break; } finally { return; } while (true); ; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-do-12Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-11 { The break is interrupted by the try-finally } { empty_main T1420do11 { do try { break; } finally { return; } while (true); {} } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-do-13Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-12 { The break is interrupted by the try-finally } { empty_main T1420do12 { do try { break; } finally { return; } while (true); { int x=3; } } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-do-14Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-13 { The break is interrupted by the try-finally } { empty_main T1420do13 { do try { throw new Exception(); } catch (Exception e) { break; } finally { return; } while (true); int i; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-do-15Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-14 { The break is interrupted by the try-finally } { empty_main T1420do14 { do try { throw new Exception(); } catch (Exception e) { break; } finally { return; } while (true); ; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-do-16Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-15 { The break is interrupted by the try-finally } { empty_main T1420do15 { do try { throw new Exception(); } catch (Exception e) { break; } finally { return; } while (true); {} } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-do-17Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-16 { The break is interrupted by the try-finally } { empty_main T1420do16 { do try { throw new Exception(); } catch (Exception e) { break; } finally { return; } while (true); { int x=3; } } } {FAIL}
The continue is interrupted by the try-finallyTest Case: 14.20-do-18Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-17 { The continue is interrupted by the try-finally } { empty_main T1420do17 { do try { continue; } finally { return; } while (false); int i; } } {FAIL}
The continue is interrupted by the try-finallyTest Case: 14.20-do-19Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-18 { The continue is interrupted by the try-finally } { empty_main T1420do18 { do try { continue; } finally { return; } while (false); ; } } {FAIL}
The continue is interrupted by the try-finallyTest Case: 14.20-do-20Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-19 { The continue is interrupted by the try-finally } { empty_main T1420do19 { do try { continue; } finally { return; } while (false); {} } } {FAIL}
The continue is interrupted by the try-finallyTest Case: 14.20-do-21Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-20 { The continue is interrupted by the try-finally } { empty_main T1420do20 { do try { continue; } finally { return; } while (false); { int x=3; } } } {FAIL}
The continue is interrupted by the try-finallyTest Case: 14.20-do-22Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-21 { The continue is interrupted by the try-finally } { empty_main T1420do21 { do try { throw new Exception(); } catch (Exception e) { continue; } finally { return; } while (false); int i; } } {FAIL}
The continue is interrupted by the try-finallyTest Case: 14.20-do-23Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-22 { The continue is interrupted by the try-finally } { empty_main T1420do22 { do try { throw new Exception(); } catch (Exception e) { continue; } finally { return; } while (false); ; } } {FAIL}
The continue is interrupted by the try-finallyTest Case: 14.20-do-24Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-23 { The continue is interrupted by the try-finally } { empty_main T1420do23 { do try { throw new Exception(); } catch (Exception e) { continue; } finally { return; } while (false); {} } } {FAIL}
The continue is interrupted by the try-finallyTest Case: 14.20-do-25Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-24 { The continue is interrupted by the try-finally } { empty_main T1420do24 { do try { throw new Exception(); } catch (Exception e) { continue; } finally { return; } while (false); { int x=3; } } } {FAIL}
The continue is interrupted by the try-finallyTest Case: 14.20-do-26Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-25 { The continue is interrupted by the try-finally } { empty_main T1420do25 { a: do try { continue a; } finally { return; } while (false); int i; } } {FAIL}
The continue is interrupted by the try-finallyTest Case: 14.20-do-27Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-26 { The continue is interrupted by the try-finally } { empty_main T1420do26 { a: do try { continue a; } finally { return; } while (false); ; } } {FAIL}
The continue is interrupted by the try-finallyTest Case: 14.20-do-28Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-27 { The continue is interrupted by the try-finally } { empty_main T1420do27 { a: do try { continue a; } finally { return; } while (false); {} } } {FAIL}
The continue is interrupted by the try-finallyTest Case: 14.20-do-29Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-28 { The continue is interrupted by the try-finally } { empty_main T1420do28 { a: do try { continue a; } finally { return; } while (false); { int x=3; } } } {FAIL}
The continue is interrupted by the try-finallyTest Case: 14.20-do-30Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-29 { The continue is interrupted by the try-finally } { empty_main T1420do29 { a: do try { throw new Exception(); } catch (Exception e) { continue a; } finally { return; } while (false); int i; } } {FAIL}
The continue is interrupted by the try-finallyTest Case: 14.20-do-31Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-30 { The continue is interrupted by the try-finally } { empty_main T1420do30 { a: do try { throw new Exception(); } catch (Exception e) { continue a; } finally { return; } while (false); ; } } {FAIL}
The continue is interrupted by the try-finallyTest Case: 14.20-do-32Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-31 { The continue is interrupted by the try-finally } { empty_main T1420do31 { a: do try { throw new Exception(); } catch (Exception e) { continue a; } finally { return; } while (false); {} } } {FAIL}
The continue is interrupted by the try-finallyTest Case: 14.20-do-33Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-32 { The continue is interrupted by the try-finally } { empty_main T1420do32 { a: do try { throw new Exception(); } catch (Exception e) { continue a; } finally { return; } while (false); { int x=3; } } } {FAIL}
The continue is interrupted by the try-finallyTest Case: 14.20-for-1Expected Result: FAIL
Regression Test:
tcltest::test 14.20-do-33 { The continue is interrupted by the try-finally } { empty_main T1420do33 { a: do { try { throw new Exception(); } catch (Exception e) { continue a; } finally { return; } } while (false); { int x=3; } } } {FAIL}
A for statement can complete normally if: The condition statement exists and is non-constantTest Case: 14.20-for-2Expected Result: PASS
Regression Test:
tcltest::test 14.20-for-1 { A for statement can complete normally if: The condition statement exists and is non-constant } { empty_main T1420for1 { boolean b = true; for ( ; b; ); int i; } } {PASS}
A for statement can complete normally if: There is a reachable break statement that exits the for statement.Test Case: 14.20-for-3Expected Result: PASS
Regression Test:
tcltest::test 14.20-for-2 { A for statement can complete normally if: There is a reachable break statement that exits the for statement. } { empty_main T1420for2 { for ( ; ; ) break; int i; } } {PASS}
A for statement cannot complete normally if there is no condition or the condition is constant true, and there is no breakTest Case: 14.20-for-4Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-3 { A for statement cannot complete normally if there is no condition or the condition is constant true, and there is no break } { empty_main T1420for3 { for ( ; ; ); int i; } } {FAIL}
A for statement cannot complete normally if there is no condition or the condition is constant true, and there is no breakTest Case: 14.20-for-5Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-4 { A for statement cannot complete normally if there is no condition or the condition is constant true, and there is no break } { empty_main T1420for4 { for ( ; ; ); ; } } {FAIL}
A for statement cannot complete normally if there is no condition or the condition is constant true, and there is no breakTest Case: 14.20-for-6Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-5 { A for statement cannot complete normally if there is no condition or the condition is constant true, and there is no break } { empty_main T1420for5 { for ( ; ; ); {} } } {FAIL}
A for statement cannot complete normally if there is no condition or the condition is constant true, and there is no breakTest Case: 14.20-for-7Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-6 { A for statement cannot complete normally if there is no condition or the condition is constant true, and there is no break } { empty_main T1420for6 { for ( ; ; ); { int x=3; } } } {FAIL}
A for statement cannot complete normally if there is no condition or the condition is constant true, and there is no breakTest Case: 14.20-for-8Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-7 { A for statement cannot complete normally if there is no condition or the condition is constant true, and there is no break } { empty_main T1420for7 { for ( ; true; ); int i; } } {FAIL}
A for statement cannot complete normally if there is no condition or the condition is constant true, and there is no breakTest Case: 14.20-for-9Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-8 { A for statement cannot complete normally if there is no condition or the condition is constant true, and there is no break } { empty_main T1420for8 { for ( ; true; ); ; } } {FAIL}
A for statement cannot complete normally if there is no condition or the condition is constant true, and there is no breakTest Case: 14.20-for-10Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-9 { A for statement cannot complete normally if there is no condition or the condition is constant true, and there is no break } { empty_main T1420for9 { for ( ; true; ); {} } } {FAIL}
A for statement cannot complete normally if there is no condition or the condition is constant true, and there is no breakTest Case: 14.20-for-11Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-10 { A for statement cannot complete normally if there is no condition or the condition is constant true, and there is no break } { empty_main T1420for10 { for ( ; true; ); { int x=3; } } } {FAIL}
A for statement cannot have a constant false conditionTest Case: 14.20-for-12Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-11 { A for statement cannot have a constant false condition } { empty_main T1420for11 { int i; for( ; false; ) i = 1; } } {FAIL}
A for statement cannot have a constant false conditionTest Case: 14.20-for-13Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-12 { A for statement cannot have a constant false condition } { empty_main T1420for12 { for ( ; false; ); } } {FAIL}
A for statement cannot have a constant false conditionTest Case: 14.20-for-14Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-13 { A for statement cannot have a constant false condition } { empty_main T1420for13 { for ( ; false; ) {} } } {FAIL}
A for statement cannot have a constant false conditionTest Case: 14.20-for-15Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-14 { A for statement cannot have a constant false condition } { empty_main T1420for14 { for ( ; false; ) { int x=3; } } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-for-16Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-15 { The break is interrupted by the try-finally } { empty_main T1420for15 { for ( ; ; ) try { break; } finally { return; } int i; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-for-17Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-16 { The break is interrupted by the try-finally } { empty_main T1420for16 { for ( ; ; ) try { break; } finally { return; } ; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-for-18Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-17 { The break is interrupted by the try-finally } { empty_main T1420for17 { for ( ; ; ) try { break; } finally { return; } {} } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-for-19Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-18 { The break is interrupted by the try-finally } { empty_main T1420for18 { for ( ; ; ) try { break; } finally { return; } { int x=3; } } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-for-20Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-19 { The break is interrupted by the try-finally } { empty_main T1420for19 { for ( ; ; ) try { throw new Exception(); } catch (Exception e) { break; } finally { return; } int i; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-for-21Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-20 { The break is interrupted by the try-finally } { empty_main T1420for20 { for ( ; ; ) try { throw new Exception(); } catch (Exception e) { break; } finally { return; } ; } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-for-22Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-21 { The break is interrupted by the try-finally } { empty_main T1420for21 { for ( ; ; ) try { throw new Exception(); } catch (Exception e) { break; } finally { return; } {} } } {FAIL}
The break is interrupted by the try-finallyTest Case: 14.20-abrupt-1Expected Result: FAIL
Regression Test:
tcltest::test 14.20-for-22 { The break is interrupted by the try-finally } { empty_main T1420for22 { for ( ; ; ) try { throw new Exception(); } catch (Exception e) { break; } finally { return; } { int x=3; } } } {FAIL}
break cannot complete normallyTest Case: 14.20-abrupt-2Expected Result: FAIL
Regression Test:
tcltest::test 14.20-abrupt-1 { break cannot complete normally } { empty_main T1420abrupt1 { while (true) { break; int i; } } } {FAIL}
break cannot complete normallyTest Case: 14.20-abrupt-3Expected Result: FAIL
Regression Test:
tcltest::test 14.20-abrupt-2 { break cannot complete normally } { empty_main T1420abrupt2 { while (true) { break; ; } } } {FAIL}
break cannot complete normallyTest Case: 14.20-abrupt-4Expected Result: FAIL
Regression Test:
tcltest::test 14.20-abrupt-3 { break cannot complete normally } { empty_main T1420abrupt3 { while (true) { break; {} } } } {FAIL}
break cannot complete normallyTest Case: 14.20-abrupt-5Expected Result: FAIL
Regression Test:
tcltest::test 14.20-abrupt-4 { break cannot complete normally } { empty_main T1420abrupt4 { while (true) { break; { int x=3; } } } } {FAIL}
continue cannot complete normallyTest Case: 14.20-abrupt-6Expected Result: FAIL
Regression Test:
tcltest::test 14.20-abrupt-5 { continue cannot complete normally } { empty_main T1420abrupt5 { while (true) { continue; int i; } } } {FAIL}
continue cannot complete normallyTest Case: 14.20-abrupt-7Expected Result: FAIL
Regression Test:
tcltest::test 14.20-abrupt-6 { continue cannot complete normally } { empty_main T1420abrupt6 { while (true) { continue; ; } } } {FAIL}
continue cannot complete normallyTest Case: 14.20-abrupt-8Expected Result: FAIL
Regression Test:
tcltest::test 14.20-abrupt-7 { continue cannot complete normally } { empty_main T1420abrupt7 { while (true) { continue; {} } } } {FAIL}
continue cannot complete normallyTest Case: 14.20-abrupt-9Expected Result: FAIL
Regression Test:
tcltest::test 14.20-abrupt-8 { continue cannot complete normally } { empty_main T1420abrupt8 { while (true) { continue; { int x=3; } } } } {FAIL}
return cannot complete normallyTest Case: 14.20-abrupt-10Expected Result: FAIL
Regression Test:
tcltest::test 14.20-abrupt-9 { return cannot complete normally } { empty_main T1420abrupt9 { return; int i; } } {FAIL}
return cannot complete normallyTest Case: 14.20-abrupt-11Expected Result: FAIL
Regression Test:
tcltest::test 14.20-abrupt-10 { return cannot complete normally } { empty_main T1420abrupt10 { return; ; } } {FAIL}
return cannot complete normallyTest Case: 14.20-abrupt-12Expected Result: FAIL
Regression Test:
tcltest::test 14.20-abrupt-11 { return cannot complete normally } { empty_main T1420abrupt11 { return; {} } } {FAIL}
return cannot complete normallyTest Case: 14.20-abrupt-13Expected Result: FAIL
Regression Test:
tcltest::test 14.20-abrupt-12 { return cannot complete normally } { empty_main T1420abrupt12 { return; { int x=3; } } } {FAIL}
throw cannot complete normallyTest Case: 14.20-abrupt-14Expected Result: FAIL
Regression Test:
tcltest::test 14.20-abrupt-13 { throw cannot complete normally } { empty_main T1420abrupt13 { throw new RuntimeException(); int i; } } {FAIL}
throw cannot complete normallyTest Case: 14.20-abrupt-15Expected Result: FAIL
Regression Test:
tcltest::test 14.20-abrupt-14 { throw cannot complete normally } { empty_main T1420abrupt14 { throw new RuntimeException(); ; } } {FAIL}
throw cannot complete normallyTest Case: 14.20-abrupt-16Expected Result: FAIL
Regression Test:
tcltest::test 14.20-abrupt-15 { throw cannot complete normally } { empty_main T1420abrupt15 { throw new RuntimeException(); {} } } {FAIL}
throw cannot complete normallyTest Case: 14.20-synchronized-1Expected Result: FAIL
Regression Test:
tcltest::test 14.20-abrupt-16 { throw cannot complete normally } { empty_main T1420abrupt16 { throw new RuntimeException(); { int x=3; } } } {FAIL}
synchronized completes normally iff the contained block does as wellTest Case: 14.20-synchronized-2Expected Result: PASS
Regression Test:
tcltest::test 14.20-synchronized-1 { synchronized completes normally iff the contained block does as well } { empty_main T1420synch1 { synchronized (args) {} int i; } } {PASS}
synchronized completes normally iff the contained block does as wellTest Case: 14.20-synchronized-3Expected Result: FAIL
Regression Test:
tcltest::test 14.20-synchronized-2 { synchronized completes normally iff the contained block does as well } { empty_main T1420synch2 { synchronized (args) { return; } int i; } } {FAIL}
synchronized completes normally iff the contained block does as wellTest Case: 14.20-synchronized-4Expected Result: FAIL
Regression Test:
tcltest::test 14.20-synchronized-3 { synchronized completes normally iff the contained block does as well } { empty_main T1420synch3 { synchronized (args) { return; } ; } } {FAIL}
synchronized completes normally iff the contained block does as wellTest Case: 14.20-synchronized-5Expected Result: FAIL
Regression Test:
tcltest::test 14.20-synchronized-4 { synchronized completes normally iff the contained block does as well } { empty_main T1420synch4 { synchronized (args) { return; } {} } } {FAIL}
synchronized completes normally iff the contained block does as wellTest Case: 14.20-try-1Expected Result: FAIL
Regression Test:
tcltest::test 14.20-synchronized-5 { synchronized completes normally iff the contained block does as well } { empty_main T1420synch5 { synchronized (args) { return; } { int x=3; } } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-2Expected Result: PASS
Regression Test:
tcltest::test 14.20-try-1 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try1 { try { new Object(); } catch (RuntimeException e) { return; } int i; } } {PASS}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-3Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-2 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try2 { try { throw new Exception(); } catch (Exception e) { return; } int i; } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-4Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-3 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try3 { try { throw new Exception(); } catch (Exception e) { return; } ; } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-5Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-4 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try4 { try { throw new Exception(); } catch (Exception e) { return; } {} } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-6Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-5 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try5 { try { throw new Exception(); } catch (Exception e) { return; } { int x=3; } } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-7Expected Result: PASS
Regression Test:
tcltest::test 14.20-try-6 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try6 { try { throw new Exception(); } catch (Exception e) { return; } catch (Throwable t) { } int i; } } {PASS}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-8Expected Result: PASS
Regression Test:
tcltest::test 14.20-try-7 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try7 { try { new Object(); } catch (RuntimeException e) { return; } finally { } int i; } } {PASS}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-9Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-8 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try8 { try { throw new Exception(); } catch (Exception e) { return; } finally { } int i; } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-10Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-9 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try9 { try { throw new Exception(); } catch (Exception e) { return; } finally { } ; } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-11Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-10 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try10 { try { throw new Exception(); } catch (Exception e) { return; } finally { } {} } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-12Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-11 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try11 { try { throw new Exception(); } catch (Exception e) { return; } finally { } { int x=3; } } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-13Expected Result: PASS
Regression Test:
tcltest::test 14.20-try-12 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try12 { try { throw new Exception(); } catch (Exception e) { return; } catch (Throwable t) { } finally { } int i; } } {PASS}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-14Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-13 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try13 { try { new Object(); } catch (Exception e) { return; } finally { return; } int i; } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-15Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-14 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try14 { try { new Object(); } catch (Exception e) { return; } finally { return; } ; } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-16Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-15 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try15 { try { new Object(); } catch (Exception e) { return; } finally { return; } {} } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-17Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-16 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try16 { try { new Object(); } catch (Exception e) { return; } finally { return; } { int x=3; } } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-18Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-17 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try17 { try { throw new Exception(); } catch (Exception e) { return; } finally { return; } int i; } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-19Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-18 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try18 { try { throw new Exception(); } catch (Exception e) { return; } finally { return; } ; } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-20Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-19 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try19 { try { throw new Exception(); } catch (Exception e) { return; } finally { return; } {} } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-21Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-20 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try20 { try { throw new Exception(); } catch (Exception e) { return; } finally { return; } { int x=3; } } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-22Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-21 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try21 { try { throw new Exception(); } catch (Exception e) { return; } catch (Throwable t) { } finally { return; } int i; } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-23Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-22 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try22 { try { throw new Exception(); } catch (Exception e) { return; } catch (Throwable t) { } finally { return; } ; } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-24Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-23 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try23 { try { throw new Exception(); } catch (Exception e) { return; } catch (Throwable t) { } finally { return; } {} } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-25Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-24 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try24 { try { throw new Exception(); } catch (Exception e) { return; } catch (Throwable t) { } finally { return; } { int x=3; } } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-26Expected Result: PASS
Regression Test:
tcltest::test 14.20-try-25 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try25 { try { new Object(); } finally { } int i; } } {PASS}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-27Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-26 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try26 { try { throw new RuntimeException(); } finally { } int i; } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-28Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-27 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try27 { try { throw new RuntimeException(); } finally { } ; } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-29Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-28 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try28 { try { throw new RuntimeException(); } finally { } {} } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-30Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-29 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try29 { try { throw new RuntimeException(); } finally { } { int x=3; } } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-31Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-30 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try30 { try { new Object(); } finally { return; } int i; } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-32Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-31 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try31 { try { new Object(); } finally { return; } ; } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-33Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-32 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try32 { try { new Object(); } finally { return; } {} } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-34Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-33 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try33 { try { new Object(); } finally { return; } { int x=3; } } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-35Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-34 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try34 { try { throw new Exception(); } finally { return; } int i; } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-36Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-35 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try35 { try { throw new Exception(); } finally { return; } ; } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-try-37Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-36 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try36 { try { throw new Exception(); } finally { return; } {} } } {FAIL}
A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally.Test Case: 14.20-catch-1Expected Result: FAIL
Regression Test:
tcltest::test 14.20-try-37 { A try statement can complete normally iff both: The try block can complete normally or any catch block can complete normally. The finally block, if present, can complete normally. } { empty_main T1420try37 { try { throw new Exception(); } finally { return; } { int x=3; } } } {FAIL}
A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass.Test Case: 14.20-catch-2Expected Result: FAIL
Regression Test:
tcltest::test 14.20-catch-1 { A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass. } { empty_main T1420catch1 { try { // empty block cannot throw exception } catch (Throwable t) { } } } {FAIL}
A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass.Test Case: 14.20-catch-3Expected Result: FAIL
Regression Test:
tcltest::test 14.20-catch-2 { A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass. } { empty_main T1420catch2 { try { int i = 0; i /= i; } catch (ClassCastException e) { } } } {FAIL}
A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass.Test Case: 14.20-catch-4Expected Result: PASS
Regression Test:
tcltest::test 14.20-catch-3 { A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass. } { empty_main T1420catch3 { try { throw new Exception(); } catch (Exception e) { } } } {PASS}
A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass.Test Case: 14.20-catch-5Expected Result: FAIL
Regression Test:
tcltest::test 14.20-catch-4 { A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass. } { empty_main T1420catch4 { try { throw new Exception(); } catch (Throwable t) { } catch (Exception e) { } } } {FAIL}
A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass.Test Case: 14.20-catch-6Expected Result: PASS
Regression Test:
tcltest::test 14.20-catch-5 { A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass. } { empty_main T1420catch5 { try { throw new Exception(); } catch (Exception e) { } catch (Throwable t) { // possible Error creating new Exception } } } {PASS}
A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass.Test Case: 14.20-catch-7Expected Result: PASS
Regression Test:
tcltest::test 14.20-catch-6 { A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass. } { empty_main T1420catch6 { try { new Object(); } catch (RuntimeException e) { } catch (Error err) { } } } {PASS}
A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass.Test Case: 14.20-catch-8Expected Result: OK
Regression Test:
tcltest::test 14.20-catch-7 { A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass. } { ok_pass_or_warn [compile [saveas T1420catch7.java { class T1420catch7 { void foo() { try { new Object(); } catch (Exception e) { } catch (Throwable t) { } } } }]] } {OK}
A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass.Test Case: 14.20-catch-9Expected Result: FAIL
Regression Test:
tcltest::test 14.20-catch-8 { A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass. } { empty_main T1420catch8 { try { throw new Exception(); } catch (Exception e) { } catch (Exception e1) { } } } {FAIL}
A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass.Test Case: 14.20-catch-10Expected Result: PASS
Regression Test:
tcltest::test 14.20-catch-9 { A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass. } { empty_main T1420catch9 { int i, j=0; try { i = 1/j; } catch (ArithmeticException ae) { } } } {PASS}
A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass.Test Case: 14.20-catch-11Expected Result: FAIL
Regression Test:
tcltest::test 14.20-catch-10 { A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass. } { empty_main T1420catch10 { int i, j=0; try { i = 1/j; } catch (ArithmeticException ae) { } catch (RuntimeException re) { // the only possible exception, ae, has already been caught } } } {FAIL}
A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass.Test Case: 14.20-catch-12Expected Result: PASS
Regression Test:
tcltest::test 14.20-catch-11 { A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass. } { empty_class T1420catch11 { void choke() throws Exception { throw new java.io.IOException(); } void foo() throws Exception { try { choke(); } catch (java.io.IOException io) { // reachable, as choke() can throw any subclass } } } } {PASS}
A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass.Test Case: 14.20-catch-13Expected Result: FAIL
Regression Test:
tcltest::test 14.20-catch-12 { A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass. } { empty_class T1420catch12 { void foo() throws Exception { try { throw new Exception(); } catch (java.io.IOException io) { // unreachable, as new cannot create subclass, and // the constructor has no throws clause } } } } {FAIL}
A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass.Test Case: 14.20-catch-14Expected Result: FAIL
Regression Test:
tcltest::test 14.20-catch-13 { A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass. } { empty_main T1420catch13 { try { return; } catch (RuntimeException e) { // this cannot be thrown } } } {FAIL}
The throw is interrupted by the inner finallyTest Case: 14.20-catch-15Expected Result: FAIL
Regression Test:
tcltest::test 14.20-catch-14 { The throw is interrupted by the inner finally } { empty_main T1420catch14 { Exception e = new Exception(); // create here to make test work try { try { throw e; } finally { return; } } catch (Exception e1) { // this is unreachable } } } {FAIL}
The throw is interrupted by the inner finallyTest Case: 14.20-catch-16Expected Result: FAIL
Regression Test:
tcltest::test 14.20-catch-15 { The throw is interrupted by the inner finally } { empty_main T1420catch15 { try { try { throw new java.io.IOException(); } finally { return; } } catch (java.io.IOException e) { // this is unreachable } } } {FAIL}
The throw is interrupted by the inner finallyTest Case: 14.20-catch-17Expected Result: FAIL
Regression Test:
tcltest::test 14.20-catch-16 { The throw is interrupted by the inner finally } { empty_main T1420catch16 { Exception e = new Exception(); // create here to make test work try { try { throw e; } catch (Exception e1) { throw e1; } finally { return; } } catch (Exception e2) { // this is unreachable } } } {FAIL}
The throw is interrupted by the inner finallyTest Case: 14.20-catch-18Expected Result: FAIL
Regression Test:
tcltest::test 14.20-catch-17 { The throw is interrupted by the inner finally } { empty_main T1420catch17 { try { try { throw new java.io.IOException(); } catch (java.io.IOException e) { throw e; } finally { return; } } catch (java.io.IOException e1) { // this is unreachable } } } {FAIL}
A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass.Test Case: 14.20-catch-19Expected Result: FAIL
Regression Test:
tcltest::test 14.20-catch-18 { A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass. } { empty_main T1420catch18 { try { try { throw new Exception(); } catch (Throwable t) { } } catch (Exception e) { // this is unreachable } } } {FAIL}
A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass.Test Case: 14.20-catch-20Expected Result: PASS
Regression Test:
tcltest::test 14.20-catch-19 { A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass. } { empty_class T1420catch19 { class MyException extends java.io.IOException {} void foo() throws Exception { java.io.IOException io = new MyException(); try { throw io; } catch (MyException e) { // reachable, as variable reference can contain subclass } } } } {PASS}
A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass.Test Case: 14.20-catch-21Expected Result: FAIL
Regression Test:
tcltest::test 14.20-catch-20 { A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass. } { empty_main T1420catch20 { class MyException extends ArithmeticException {} try { int i = 0; i /= i; } catch (MyException e) { // unreachable, as expressions do not throw subclass } } } {FAIL}
A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass.Test Case: 14.20-if-1Expected Result: PASS
Regression Test:
tcltest::test 14.20-catch-21 { A catch block C is reachable iff both: Some reachable expression or throw statement throws assignable exception. No earlier catch block covers type C or superclass. } { empty_main T1420catch21 { final Exception e = new java.io.IOException(); try { throw e; } catch (java.io.IOException io) { // this one will be called } catch (Exception ex) { // this one is reachable, but will never be executed, // since analysis does not evaluate variable contents } } } {PASS}
if-then can complete normally iff it is reachableTest Case: 14.20-if-2Expected Result: PASS
Regression Test:
tcltest::test 14.20-if-1 { if-then can complete normally iff it is reachable } { empty_main T1420if1 { if (true) return; int i; } } {PASS}
then-statement of if-then is reachableTest Case: 14.20-if-3Expected Result: PASS
Regression Test:
tcltest::test 14.20-if-2 { then-statement of if-then is reachable } { empty_main T1420if2 { int i; if (false) i = 1; } } {PASS}
if-then-else can complete normally iff then-statement or else-statement can complete normally.Test Case: 14.20-if-4Expected Result: PASS
Regression Test:
tcltest::test 14.20-if-3 { if-then-else can complete normally iff then-statement or else-statement can complete normally. } { empty_main T1420if3 { if (true) return; else ; int i; } } {PASS}
if-then-else can complete normally iff then-statement or else-statement can complete normally.Test Case: 14.20-if-5Expected Result: PASS
Regression Test:
tcltest::test 14.20-if-4 { if-then-else can complete normally iff then-statement or else-statement can complete normally. } { empty_main T1420if4 { if (false) ; else return; int i; } } {PASS}
if-then-else can complete normally iff then-statement or else-statement can complete normally.Test Case: 14.20-if-6Expected Result: FAIL
Regression Test:
tcltest::test 14.20-if-5 { if-then-else can complete normally iff then-statement or else-statement can complete normally. } { empty_main T1420if5 { if (true) return; else return; int i; } } {FAIL}
if-then-else can complete normally iff then-statement or else-statement can complete normally.Test Case: 14.20-if-7Expected Result: FAIL
Regression Test:
tcltest::test 14.20-if-6 { if-then-else can complete normally iff then-statement or else-statement can complete normally. } { empty_main T1420if6 { if (true) return; else return; ; } } {FAIL}
if-then-else can complete normally iff then-statement or else-statement can complete normally.Test Case: 14.20-if-8Expected Result: FAIL
Regression Test:
tcltest::test 14.20-if-7 { if-then-else can complete normally iff then-statement or else-statement can complete normally. } { empty_main T1420if7 { if (true) return; else return; {} } } {FAIL}
if-then-else can complete normally iff then-statement or else-statement can complete normally.Expected Result: FAIL
Regression Test:
tcltest::test 14.20-if-8 { if-then-else can complete normally iff then-statement or else-statement can complete normally. } { empty_main T1420if8 { if (true) return; else return; { int x=3; } } } {FAIL}
tests/jls/expressions/class-instance-creation
a ClassInstanceCreationExpression that starts with the keyword new is known as an unqualified class instance creation expressionTest Case: 15.9-unqualified-2Expected Result: PASS
Regression Test:
tcltest::test 15.9-unqualified-1 { a ClassInstanceCreationExpression that starts with the keyword new is known as an unqualified class instance creation expression } { empty_class T159u1 { Object o = new T159u1(); } } {PASS}
an unqualified class instance creation expression can create instances of a toplevel, member, local, or anonymous classExpected Result: PASS
Regression Test:
tcltest::test 15.9-unqualified-2 { an unqualified class instance creation expression can create instances of a toplevel, member, local, or anonymous class } { empty_class T159u2 { class Inner {} static class Sinner {} void foo() { new T159u2(); // toplevel new Inner(); // member new Sinner(); // static member class Local {} new Local(); // local new T159u2() {}; // anonymous } } } {PASS}
tests/jls/expressions/class-instance-creation/determining-the-class
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-anonymous-2Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-1 { The ClassOrInterfaceType must be accessible } { empty_main T1591ua1 { new java.lang.Object(){}; new T1591ua1(){}; } } {PASS}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-anonymous-3Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-2 { The ClassOrInterfaceType must be accessible } { compile [saveas p1/T1591ua2_1.java { package p1; public class T1591ua2_1 {} }] [saveas p2/T1591ua2_2.java { package p2; import p1.*; class T1591ua2_2 extends p1.T1591ua2_1 { Object o1 = new p1.T1591ua2_1(){}; Object o2 = new T1591ua2_1(){}; } }] } {PASS}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-anonymous-4Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-3 { The ClassOrInterfaceType must be accessible } { compile [saveas p1/T1591ua3_1.java { package p1; class T1591ua3_1 {} }] [saveas p2/T1591ua3_2.java { package p2; import p1.*; class T1591ua3_2 extends p1.T1591ua3_1 { Object o1 = new p1.T1591ua3_1(){}; Object o2 = new T1591ua3_1(){}; } }] } {FAIL}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-anonymous-5Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-4 { The ClassOrInterfaceType must be accessible } { compile [saveas p1/T1591ua4_1.java { package p1; public class T1591ua4_1 { public class Inner{} } }] [saveas p2/T1591ua4_2.java { package p2; import p1.*; class T1591ua4_2 extends p1.T1591ua4_1 { Object o1 = new p1.T1591ua4_1.Inner(){}; Object o2 = new Inner(){}; } }] } {PASS}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-anonymous-6Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-5 { The ClassOrInterfaceType must be accessible } { compile [saveas p1/T1591ua5_1.java { package p1; public class T1591ua5_1 { protected class Inner{} } }] [saveas p2/T1591ua5_2.java { package p2; import p1.*; class T1591ua5_2 extends p1.T1591ua5_1 { Object o1 = new p1.T1591ua5_1.Inner(){}; Object o2 = new Inner(){}; } }] } {PASS}
The ClassOrInterfaceType must be accessible, the inner class is has package access so it is not accessible from another packageTest Case: 15.9.1-unqualified-anonymous-7Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-6 { The ClassOrInterfaceType must be accessible, the inner class is has package access so it is not accessible from another package } { compile [saveas p1/T1591ua6_1.java { package p1; public class T1591ua6_1 { class Inner{} } }] [saveas p2/T1591ua6_2.java { package p2; import p1.*; class T1591ua6_2 extends p1.T1591ua6_1 { Object o1 = new p1.T1591ua6_1.Inner(){}; Object o2 = new Inner(){}; } }] } {FAIL}
The ClassOrInterfaceType must be accessible, this inner class is privateTest Case: 15.9.1-unqualified-anonymous-8Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-7 { The ClassOrInterfaceType must be accessible, this inner class is private } { compile [saveas p1/T1591ua7_1.java { package p1; public class T1591ua7_1 { private class Inner{} } }] [saveas p2/T1591ua7_2.java { package p2; import p1.*; class T1591ua7_2 extends p1.T1591ua7_1 { Object o1 = new p1.T1591ua7_1.Inner(){}; Object o2 = new Inner(){}; } }] } {FAIL}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-anonymous-9Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-8 { The ClassOrInterfaceType must be accessible } { compile [saveas T1591ua8_1.java { class T1591ua8_1 { protected class Inner{} } class T1591ua8_2 extends T1591ua8_1 { Object o1 = new T1591ua8_1.Inner(){}; Object o2 = new Inner(){}; } }] } {PASS}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-anonymous-10Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-9 { The ClassOrInterfaceType must be accessible } { compile [saveas T1591ua9_1.java { class T1591ua9_1 { class Inner{} } class T1591ua9_2 extends T1591ua9_1 { Object o1 = new T1591ua9_1.Inner(){}; Object o2 = new Inner(){}; } }] } {PASS}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-anonymous-11Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-10 { The ClassOrInterfaceType must be accessible } { compile [saveas T1591ua10_1.java { class T1591ua10_1 { private class Inner{} } class T1591ua10_2 extends T1591ua10_1 { Object o1 = new T1591ua10_1.Inner(){}; Object o2 = new Inner(){}; } }] } {FAIL}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-anonymous-12Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-11 { The ClassOrInterfaceType must be accessible } { compile [saveas T1591ua11.java { interface I1591ua11 {} class T1591ua11 { Object o1 = new java.lang.Cloneable(){}; Object o2 = new I1591ua11(){}; } }] } {PASS}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-anonymous-13Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-12 { The ClassOrInterfaceType must be accessible } { compile [saveas p1/T1591ua12_1.java { package p1; public interface T1591ua12_1 {} }] [saveas p2/T1591ua12_2.java { package p2; import p1.*; class T1591ua12_2 implements p1.T1591ua12_1 { Object o1 = new p1.T1591ua12_1(){}; Object o2 = new T1591ua12_1(){}; } }] } {PASS}
The ClassOrInterfaceType must be accessible, this interface has package accessTest Case: 15.9.1-unqualified-anonymous-14Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-13 { The ClassOrInterfaceType must be accessible, this interface has package access } { compile [saveas p1/T1591ua13_1.java { package p1; interface T1591ua13_1 {} }] [saveas p2/T1591ua13_2.java { package p2; import p1.*; class T1591ua13_2 implements p1.T1591ua13_1 { Object o1 = new p1.T1591ua13_1(){}; Object o2 = new T1591ua13_1(){}; } }] } {FAIL}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-anonymous-15Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-14 { The ClassOrInterfaceType must be accessible } { compile [saveas p1/T1591ua14_1.java { package p1; public class T1591ua14_1 { public interface Inner{} } }] [saveas p2/T1591ua14_2.java { package p2; import p1.*; class T1591ua14_2 extends p1.T1591ua14_1 { Object o1 = new p1.T1591ua14_1.Inner(){}; Object o2 = new Inner(){}; } }] } {PASS}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-anonymous-16Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-15 { The ClassOrInterfaceType must be accessible } { compile [saveas p1/T1591ua15_1.java { package p1; public class T1591ua15_1 { protected interface Inner{} } }] [saveas p2/T1591ua15_2.java { package p2; import p1.*; class T1591ua15_2 extends p1.T1591ua15_1 { Object o1 = new p1.T1591ua15_1.Inner(){}; Object o2 = new Inner(){}; } }] } {PASS}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-anonymous-17Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-16 { The ClassOrInterfaceType must be accessible } { compile [saveas p1/T1591ua16_1.java { package p1; public class T1591ua16_1 { interface Inner{} } }] [saveas p2/T1591ua16_2.java { package p2; import p1.*; class T1591ua16_2 extends p1.T1591ua16_1 { Object o1 = new p1.T1591ua16_1.Inner(){}; Object o2 = new Inner(){}; } }] } {FAIL}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-anonymous-18Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-17 { The ClassOrInterfaceType must be accessible } { compile [saveas p1/T1591ua17_1.java { package p1; public class T1591ua17_1 { private interface Inner{} } }] [saveas p2/T1591ua17_2.java { package p2; import p1.*; class T1591ua17_2 extends p1.T1591ua17_1 { Object o1 = new p1.T1591ua17_1.Inner(){}; Object o2 = new Inner(){}; } }] } {FAIL}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-anonymous-19Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-18 { The ClassOrInterfaceType must be accessible } { compile [saveas T1591ua18_1.java { class T1591ua18_1 { protected interface Inner{} } class T1591ua18_2 extends T1591ua18_1 { Object o1 = new T1591ua18_1.Inner(){}; Object o2 = new Inner(){}; } }] } {PASS}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-anonymous-20Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-19 { The ClassOrInterfaceType must be accessible } { compile [saveas T1591ua19_1.java { class T1591ua19_1 { interface Inner{} } class T1591ua19_2 extends T1591ua19_1 { Object o1 = new T1591ua19_1.Inner(){}; Object o2 = new Inner(){}; } }] } {PASS}
The ClassOrInterfaceType must be accessible, this inner class has private accessTest Case: 15.9.1-unqualified-anonymous-21Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-20 { The ClassOrInterfaceType must be accessible, this inner class has private access } { compile [saveas T1591ua20_1.java { class T1591ua20_1 { private interface Inner{} } class T1591ua20_2 extends T1591ua20_1 { Object o1 = new T1591ua20_1.Inner(){}; Object o2 = new Inner(){}; } }] } {FAIL}
Anonymous classes cannot extend final classTest Case: 15.9.1-unqualified-anonymous-22Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-21 { Anonymous classes cannot extend final class } { empty_class T1591ua21 { final class Inner{} Object o1 = new T1591ua21.Inner(){}; Object o2 = new Inner(){}; } } {FAIL}
Anonymous classes may extend abstract classTest Case: 15.9.1-unqualified-anonymous-23Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-22 { Anonymous classes may extend abstract class } { empty_class T1591ua22 { abstract class Inner{} Object o1 = new T1591ua22.Inner(){}; Object o2 = new Inner(){}; } } {PASS}
The name may not be ambiguous, in this case Inner is ambiguous even though one is an inner class and cannot be constructed without an enclosing instanceTest Case: 15.9.1-unqualified-anonymous-24Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-23 { The name may not be ambiguous, in this case Inner is ambiguous even though one is an inner class and cannot be constructed without an enclosing instance } { compile [saveas T1591ua23_1.java { class T1591ua23_1 { class Inner{} } interface T1591ua23_2 { class Inner{} } class T1591ua23_3 extends T1591ua23_1 implements T1591ua23_2 { static Object o = new T1591ua23_3.Inner(){}; } n }] } {FAIL}
The name may not be ambiguous, accessibility means that only one Inner is inheritedTest Case: 15.9.1-qualified-anonymous-1Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-anonymous-24 { The name may not be ambiguous, accessibility means that only one Inner is inherited } { compile [saveas p1/T1591ua24_1.java { package p1; public class T1591ua24_1 { static class Inner{} } }] [saveas p2/T1591ua24_2.java { package p2; import p1.*; interface T1591ua24_2 { class Inner{} } class T1591ua24_3 extends T1591ua24_1 implements T1591ua24_2 { static Object o = new T1591ua24_3.Inner(){}; } }] } {PASS}
The simple name must be an accessible inner class of the qualifierTest Case: 15.9.1-qualified-anonymous-2Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-1 { The simple name must be an accessible inner class of the qualifier } { empty_class T1591qa1 { class Inner{} Object o = new T1591qa1().new Inner(){}; } } {PASS}
Anonymous classes cannot extend final classTest Case: 15.9.1-qualified-anonymous-3Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-2 { Anonymous classes cannot extend final class } { empty_class T1591qa2 { final class Inner{} Object o = new T1591qa2().new Inner(){}; } } {FAIL}
Anonymous classes may extend abstract classTest Case: 15.9.1-qualified-anonymous-4Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-3 { Anonymous classes may extend abstract class } { empty_class T1591qa3 { abstract class Inner{} Object o = new T1591qa3().new Inner(){}; } } {PASS}
The simple name must be an accessible inner class of the qualifierTest Case: 15.9.1-qualified-anonymous-5Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-4 { The simple name must be an accessible inner class of the qualifier } { compile [saveas p1/T1591qa4_1.java { package p1; public class T1591qa4_1 { public class Inner{} } }] [saveas p2/T1591qa4_2.java { package p2; import p1.*; class T1591qa4_2 extends p1.T1591qa4_1 { Object o = new p1.T1591qa4_1().new Inner(){}; } }] } {PASS}
The simple name must be an accessible inner class of the qualifierTest Case: 15.9.1-qualified-anonymous-6Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-5 { The simple name must be an accessible inner class of the qualifier } { compile [saveas p1/T1591qa5_1.java { package p1; public class T1591qa5_1 { protected class Inner{} } }] [saveas p2/T1591qa5_2.java { package p2; import p1.*; class T1591qa5_2 extends p1.T1591qa5_1 { Object o = new p1.T1591qa5_1().new Inner(){}; } }] } {PASS}
The simple name must be an accessible inner class of the qualifierTest Case: 15.9.1-qualified-anonymous-7Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-6 { The simple name must be an accessible inner class of the qualifier } { compile [saveas p1/T1591qa6_1.java { package p1; public class T1591qa6_1 { class Inner{} } }] [saveas p2/T1591qa6_2.java { package p2; import p1.*; class T1591qa6_2 extends p1.T1591qa6_1 { Object o = new p1.T1591qa6_1().new Inner(){}; } }] } {FAIL}
The simple name must be an accessible inner class of the qualifierTest Case: 15.9.1-qualified-anonymous-8Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-7 { The simple name must be an accessible inner class of the qualifier } { compile [saveas p1/T1591qa7_1.java { package p1; public class T1591qa7_1 { private class Inner{} } }] [saveas p2/T1591qa7_2.java { package p2; import p1.*; class T1591qa7_2 extends p1.T1591qa7_1 { Object o = new p1.T1591qa7_1().new Inner(){}; } }] } {FAIL}
The simple name must be an accessible inner class of the qualifierTest Case: 15.9.1-qualified-anonymous-9Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-8 { The simple name must be an accessible inner class of the qualifier } { compile [saveas T1591qa8_1.java { class T1591qa8_1 { protected class Inner{} } class T1591qa8_2 extends T1591qa8_1 { Object o = new T1591qa8_1().new Inner(){}; } }] } {PASS}
The simple name must be an accessible inner class of the qualifierTest Case: 15.9.1-qualified-anonymous-10Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-9 { The simple name must be an accessible inner class of the qualifier } { compile [saveas T1591qa9_1.java { class T1591qa9_1 { class Inner{} } class T1591qa9_2 extends T1591qa9_1 { Object o = new T1591qa9_1().new Inner(){}; } }] } {PASS}
The simple name must be an accessible inner class of the qualifierTest Case: 15.9.1-qualified-anonymous-11Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-10 { The simple name must be an accessible inner class of the qualifier } { compile [saveas T1591qa10_1.java { class T1591qa10_1 { private class Inner{} } class T1591qa10_2 extends T1591qa10_1 { Object o = new T1591qa10_1().new Inner(){}; } }] } {FAIL}
The qualified name must be simpleTest Case: 15.9.1-qualified-anonymous-12Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-11 { The qualified name must be simple } { empty_class T1591qa11 { class Inner{} Object o = new T1591qa11().new T1591qa11.Inner(){}; } } {FAIL}
The qualified name must be an inner classTest Case: 15.9.1-qualified-anonymous-13Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-12 { The qualified name must be an inner class } { empty_class T1591qa12 { static class Inner{} Object o = new T1591qa12().new Inner(){}; } } {FAIL}
The qualified name must be an inner classTest Case: 15.9.1-qualified-anonymous-14Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-13 { The qualified name must be an inner class } { empty_class T1591qa13 { interface Inner{} Object o = new T1591qa13().new Inner(){}; } } {FAIL}
The qualified name must be an inner classTest Case: 15.9.1-qualified-anonymous-15Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-14 { The qualified name must be an inner class } { empty_class T1591qa13 { Object o = new T1591qa13().new Object(){}; } } {FAIL}
The anonymous class extends the inner class of the type of the qualifierTest Case: 15.9.1-qualified-anonymous-16Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-15 { The anonymous class extends the inner class of the type of the qualifier } { empty_class T1591qa15 { class Inner{} Object o = new T1591qa15(){}.new Inner(){}; } } {PASS}
The anonymous class extends the inner class of the type of the qualifierTest Case: 15.9.1-qualified-anonymous-17Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-16 { The anonymous class extends the inner class of the type of the qualifier } { empty_class T1591qa16 { Object o = new T1591qa16(){ class Inner{} }.new Inner(){}; } } {PASS}
The anonymous class extends the inner class of the type of the qualifierTest Case: 15.9.1-qualified-anonymous-18Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-17 { The anonymous class extends the inner class of the type of the qualifier } { empty_class T1591qa17 { class Inner { static final int foo = 1; } Object o = new T1591qa17(){ class Inner { static final int foo = 2; } }.new Inner(){ { switch (1) { case 0: case ((foo == 2) ? 1 : 0): } } }; } } {PASS}
The name may not be ambiguous, even though only one is an inner class since member classes of interfaces are static and do not have enclosing instanceTest Case: 15.9.1-qualified-anonymous-19Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-18 { The name may not be ambiguous, even though only one is an inner class since member classes of interfaces are static and do not have enclosing instance } { compile [saveas T1591qa18_1.java { class T1591qa18_1 { class Inner{} } interface T1591qa18_2 { class Inner{} } class T1591qa18_3 extends T1591qa18_1 implements T1591qa18_2 { Object o = new T1591qa18_3().new Inner(){}; } n }] } {FAIL}
The qualifier must be a referenceTest Case: 15.9.1-qualified-anonymous-20Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-19 { The qualifier must be a reference } { empty_class T1591qa19 { class Inner{} int foo() { return 1; } Object o = foo().new Inner(){}; } } {FAIL}
The qualifier must be a referenceTest Case: 15.9.1-qualified-anonymous-21Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-20 { The qualifier must be a reference } { empty_class T1591qa20 { class Inner{} Object o = null.new Inner(){}; } } {FAIL}
The qualifier must be a referenceTest Case: 15.9.1-qualified-anonymous-22Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-21 { The qualifier must be a reference } { empty_class T1591qa21 { class Inner{} Object o = System.out.println().new Inner(){}; } } {FAIL}
The qualified name must be an inner class of the qualifierTest Case: 15.9.1-unqualified-concrete-1Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-anonymous-22 { The qualified name must be an inner class of the qualifier } { compile [saveas T1591qa22_1.java { class T1591qa22_1 {} class T1591qa22_2 extends T1591qa22_1 { class Inner{} Object o = new T1591qa22_1().new Inner(){}; } }] } {FAIL}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-concrete-2Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-concrete-1 { The ClassOrInterfaceType must be accessible } { empty_main T1591uc1 { new java.lang.Object(); new T1591uc1(); } } {PASS}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-concrete-3Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-concrete-2 { The ClassOrInterfaceType must be accessible } { compile [saveas p1/T1591uc2_1.java { package p1; public class T1591uc2_1 {} }] [saveas p2/T1591uc2_2.java { package p2; import p1.*; class T1591uc2_2 extends p1.T1591uc2_1 { Object o1 = new p1.T1591uc2_1(); Object o2 = new T1591uc2_1(); } }] } {PASS}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-concrete-4Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-unqualified-concrete-3 { The ClassOrInterfaceType must be accessible } { compile [saveas p1/T1591uc3_1.java { package p1; class T1591uc3_1 {} }] [saveas p2/T1591uc3_2.java { package p2; import p1.*; class T1591uc3_2 extends p1.T1591uc3_1 { Object o1 = new p1.T1591uc3_1(); Object o2 = new T1591uc3_1(); } }] } {FAIL}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-concrete-5Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-concrete-4 { The ClassOrInterfaceType must be accessible } { compile [saveas p1/T1591uc4_1.java { package p1; public class T1591uc4_1 { public class Inner{} } }] [saveas p2/T1591uc4_2.java { package p2; import p1.*; class T1591uc4_2 extends p1.T1591uc4_1 { Object o1 = new p1.T1591uc4_1.Inner(); Object o2 = new Inner(); } }] } {PASS}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-concrete-6Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-concrete-5 { The ClassOrInterfaceType must be accessible } { compile [saveas p1/T1591uc5_1.java { package p1; public class T1591uc5_1 { protected class Inner{ public Inner(){} } } }] [saveas p2/T1591uc5_2.java { package p2; import p1.*; class T1591uc5_2 extends p1.T1591uc5_1 { Object o1 = new p1.T1591uc5_1.Inner(); Object o2 = new Inner(); } }] } {PASS}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-concrete-7Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-unqualified-concrete-6 { The ClassOrInterfaceType must be accessible } { compile [saveas p1/T1591uc6_1.java { package p1; public class T1591uc6_1 { class Inner{} } }] [saveas p2/T1591uc6_2.java { package p2; import p1.*; class T1591uc6_2 extends p1.T1591uc6_1 { Object o1 = new p1.T1591uc6_1.Inner(); Object o2 = new Inner(); } }] } {FAIL}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-concrete-8Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-unqualified-concrete-7 { The ClassOrInterfaceType must be accessible } { compile [saveas p1/T1591uc7_1.java { package p1; public class T1591uc7_1 { private class Inner{} } }] [saveas p2/T1591uc7_2.java { package p2; import p1.*; class T1591uc7_2 extends p1.T1591uc7_1 { Object o1 = new p1.T1591uc7_1.Inner(); Object o2 = new Inner(); } }] } {FAIL}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-concrete-9Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-concrete-8 { The ClassOrInterfaceType must be accessible } { compile [saveas T1591uc8_1.java { class T1591uc8_1 { protected class Inner{} } class T1591uc8_2 extends T1591uc8_1 { Object o1 = new T1591uc8_1.Inner(); Object o2 = new Inner(); } }] } {PASS}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-concrete-10Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-concrete-9 { The ClassOrInterfaceType must be accessible } { compile [saveas T1591uc9_1.java { class T1591uc9_1 { class Inner{} } class T1591uc9_2 extends T1591uc9_1 { Object o1 = new T1591uc9_1.Inner(); Object o2 = new Inner(); } }] } {PASS}
The ClassOrInterfaceType must be accessibleTest Case: 15.9.1-unqualified-concrete-11Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-unqualified-concrete-10 { The ClassOrInterfaceType must be accessible } { compile [saveas T1591uc10_1.java { class T1591uc10_1 { private class Inner{} } class T1591uc10_2 extends T1591uc10_1 { Object o1 = new T1591uc10_1.Inner(); Object o2 = new Inner(); } }] } {FAIL}
Interface instances cannot be createdTest Case: 15.9.1-unqualified-concrete-12Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-unqualified-concrete-11 { Interface instances cannot be created } { compile [saveas T1591uc11.java { interface I1591uc11 {} class T1591uc11 { Object o = new I1591uc11(); } }] } {FAIL}
Concrete classes may be finalTest Case: 15.9.1-unqualified-concrete-13Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-concrete-12 { Concrete classes may be final } { empty_class T1591uc12 { final class Inner{} Object o1 = new T1591uc12.Inner(); Object o2 = new Inner(); } } {PASS}
Concrete classes may not be abstractTest Case: 15.9.1-unqualified-concrete-14Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-unqualified-concrete-13 { Concrete classes may not be abstract } { empty_class T1591uc13 { abstract class Inner{} Object o1 = new T1591uc13.Inner(); Object o2 = new Inner(); } } {FAIL}
The name may not be ambiguous, Inner is ambiguous, even though one is an inner class and cannot be constructed without an enclosing instanceTest Case: 15.9.1-unqualified-concrete-15Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-unqualified-concrete-14 { The name may not be ambiguous, Inner is ambiguous, even though one is an inner class and cannot be constructed without an enclosing instance } { compile [saveas T1591uc14_1.java { class T1591uc14_1 { class Inner{} } interface T1591uc14_2 { class Inner{} } class T1591uc14_3 extends T1591uc14_1 implements T1591uc14_2 { static Object o = new T1591uc14_3.Inner(); } }] } {FAIL}
The name may not be ambiguous, accessibility means that only one Inner is inheritedTest Case: 15.9.1-qualified-concrete-1Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-unqualified-concrete-15 { The name may not be ambiguous, accessibility means that only one Inner is inherited } { compile [saveas p1/T1591uc15_1.java { package p1; public class T1591uc15_1 { static class Inner{} } }] [saveas p2/T1591uc15_2.java { package p2; import p1.*; interface T1591uc15_2 { class Inner{} } class T1591uc15_3 extends T1591uc15_1 implements T1591uc15_2 { static Object o = new T1591uc15_3.Inner(); } }] } {PASS}
The simple name must be an accessible inner class of the qualifierTest Case: 15.9.1-qualified-concrete-2Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-qualified-concrete-1 { The simple name must be an accessible inner class of the qualifier } { empty_class T1591qc1 { class Inner{} Object o = new T1591qc1().new Inner(); } } {PASS}
Concrete classes may be finalTest Case: 15.9.1-qualified-concrete-3Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-qualified-concrete-2 { Concrete classes may be final } { empty_class T1591qc2 { final class Inner{} Object o = new T1591qc2().new Inner(); } } {PASS}
Concrete classes may not be abstractTest Case: 15.9.1-qualified-concrete-4Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-concrete-3 { Concrete classes may not be abstract } { empty_class T1591qc3 { abstract class Inner{} Object o = new T1591qc3().new Inner(); } } {FAIL}
The simple name must be an accessible inner class of the qualifierTest Case: 15.9.1-qualified-concrete-5Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-qualified-concrete-4 { The simple name must be an accessible inner class of the qualifier } { compile [saveas p1/T1591qc4_1.java { package p1; public class T1591qc4_1 { public class Inner{} } }] [saveas p2/T1591qc4_2.java { package p2; import p1.*; class T1591qc4_2 extends p1.T1591qc4_1 { Object o = new p1.T1591qc4_1().new Inner(); } }] } {PASS}
The simple name must be an accessible inner class of the qualifierTest Case: 15.9.1-qualified-concrete-6Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-qualified-concrete-5 { The simple name must be an accessible inner class of the qualifier } { compile [saveas p1/T1591qc5_1.java { package p1; public class T1591qc5_1 { protected class Inner{ public Inner(){} } } }] [saveas p2/T1591qc5_2.java { package p2; import p1.*; class T1591qc5_2 extends p1.T1591qc5_1 { Object o = new p1.T1591qc5_1().new Inner(); } }] } {PASS}
The simple name must be an accessible inner class of the qualifierTest Case: 15.9.1-qualified-concrete-7Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-concrete-6 { The simple name must be an accessible inner class of the qualifier } { compile [saveas p1/T1591qc6_1.java { package p1; public class T1591qc6_1 { class Inner{} } }] [saveas p2/T1591qc6_2.java { package p2; import p1.*; class T1591qc6_2 extends p1.T1591qc6_1 { Object o = new p1.T1591qc6_1().new Inner(); } }] } {FAIL}
The simple name must be an accessible inner class of the qualifierTest Case: 15.9.1-qualified-concrete-8Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-concrete-7 { The simple name must be an accessible inner class of the qualifier } { compile [saveas p1/T1591qc7_1.java { package p1; public class T1591qc7_1 { private class Inner{} } }] [saveas p2/T1591qc7_2.java { package p2; import p1.*; class T1591qc7_2 extends p1.T1591qc7_1 { Object o = new p1.T1591qc7_1().new Inner(); } }] } {FAIL}
The simple name must be an accessible inner class of the qualifierTest Case: 15.9.1-qualified-concrete-9Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-qualified-concrete-8 { The simple name must be an accessible inner class of the qualifier } { compile [saveas T1591qc8_1.java { class T1591qc8_1 { protected class Inner{} } class T1591qc8_2 extends T1591qc8_1 { Object o = new T1591qc8_1().new Inner(); } }] } {PASS}
The simple name must be an accessible inner class of the qualifierTest Case: 15.9.1-qualified-concrete-10Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-qualified-concrete-9 { The simple name must be an accessible inner class of the qualifier } { compile [saveas T1591qc9_1.java { class T1591qc9_1 { class Inner{} } class T1591qc9_2 extends T1591qc9_1 { Object o = new T1591qc9_1().new Inner(); } }] } {PASS}
The simple name must be an accessible inner class of the qualifierTest Case: 15.9.1-qualified-concrete-11Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-concrete-10 { The simple name must be an accessible inner class of the qualifier } { compile [saveas T1591qc10_1.java { class T1591qc10_1 { private class Inner{} } class T1591qc10_2 extends T1591qc10_1 { Object o = new T1591qc10_1().new Inner(); } }] } {FAIL}
The qualified name must be simpleTest Case: 15.9.1-qualified-concrete-12Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-concrete-11 { The qualified name must be simple } { empty_class T1591qc11 { class Inner{} Object o = new T1591qc11().new T1591qc11.Inner(); } } {FAIL}
The qualified name must be an inner classTest Case: 15.9.1-qualified-concrete-13Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-concrete-12 { The qualified name must be an inner class } { empty_class T1591qc12 { static class Inner{} Object o = new T1591qc12().new Inner(); } } {FAIL}
The qualified name must be an inner classTest Case: 15.9.1-qualified-concrete-14Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-concrete-13 { The qualified name must be an inner class } { empty_class T1591qc13 { interface Inner{} Object o = new T1591qc13().new Inner(); } } {FAIL}
The qualified name must be an inner classTest Case: 15.9.1-qualified-concrete-15Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-concrete-14 { The qualified name must be an inner class } { empty_class T1591qc13 { Object o = new T1591qc13().new Object(); } } {FAIL}
The concrete class extends the inner class of the type of the qualifierTest Case: 15.9.1-qualified-concrete-16Expected Result: PASS
Regression Test:
tcltest::test 15.9.1-qualified-concrete-15 { The concrete class extends the inner class of the type of the qualifier } { empty_class T1591qc15 { Object o = new T1591qc15(){ class Inner{} }.new Inner(); } } {PASS}
The name may not be ambiguous, Inner is ambiguous, even though only one is an inner class member classes of interfaces are static, and do not have enclosing instanceTest Case: 15.9.1-qualified-concrete-17Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-concrete-16 { The name may not be ambiguous, Inner is ambiguous, even though only one is an inner class member classes of interfaces are static, and do not have enclosing instance } { compile [saveas T1591qc16_1.java { class T1591qc16_1 { class Inner{} } interface T1591qc16_2 { class Inner{} } class T1591qc16_3 extends T1591qc16_1 implements T1591qc16_2 { Object o = new T1591qc16_3().new Inner(); } n }] } {FAIL}
The qualifier must be a referenceTest Case: 15.9.1-qualified-concrete-18Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-concrete-17 { The qualifier must be a reference } { empty_class T1591qc17 { class Inner{} int foo() { return 1; } Object o = foo().new Inner(); } } {FAIL}
The qualifier must be a referenceTest Case: 15.9.1-qualified-concrete-19Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-concrete-18 { The qualifier must be a reference } { empty_class T1591qc18 { class Inner{} Object o = null.new Inner(); } } {FAIL}
The qualifier must be a referenceTest Case: 15.9.1-qualified-concrete-20Expected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-concrete-19 { The qualifier must be a reference } { empty_class T1591qc19 { class Inner{} Object o = System.out.println().new Inner(); } } {FAIL}
The qualified name must be an inner class of the qualifierExpected Result: FAIL
Regression Test:
tcltest::test 15.9.1-qualified-concrete-20 { The qualified name must be an inner class of the qualifier } { compile [saveas T1591qa20_1.java { class T1591qa20_1 {} class T1591qa20_2 extends T1591qa20_1 { class Inner{} Object o = new T1591qa20_1().new Inner(); } }] } {FAIL}
tests/jls/expressions/array-creation-expressions
array initializer may be emptyTest Case: 15.10-initializer-syntax-2Expected Result: PASS
Regression Test:
tcltest::test 15.10-initializer-syntax-1 { array initializer may be empty } { empty_main T1510is1 { int[] ia = new int[] {}; } } {PASS}
array initializer may contain initializersTest Case: 15.10-initializer-syntax-3Expected Result: PASS
Regression Test:
tcltest::test 15.10-initializer-syntax-2 { array initializer may contain initializers } { empty_main T1510is2 { int[] ia = new int[] { 1 }; } } {PASS}
array initializer may contain initializersTest Case: 15.10-initializer-syntax-4Expected Result: PASS
Regression Test:
tcltest::test 15.10-initializer-syntax-3 { array initializer may contain initializers } { empty_main T1510is3 { int[] ia = new int[] { 1, 2 }; } } {PASS}
array initializer may contain concluding commaTest Case: 15.10-initializer-syntax-5Expected Result: PASS
Regression Test:
tcltest::test 15.10-initializer-syntax-4 { array initializer may contain concluding comma } { empty_main T1510is4 { int[] ia = new int[] { , }; } } {PASS}
array initializer may contain concluding commaTest Case: 15.10-initializer-syntax-6Expected Result: PASS
Regression Test:
tcltest::test 15.10-initializer-syntax-5 { array initializer may contain concluding comma } { empty_main T1510is5 { int[] ia = new int[] { 1, }; } } {PASS}
array initializers may nestTest Case: 15.10-initializer-type-1Expected Result: PASS
Regression Test:
tcltest::test 15.10-initializer-syntax-6 { array initializers may nest } { empty_main T1510ii6 { int[][] iaa = new int[][] { {1}, {2} }; } } {PASS}
expressions in array initializer must be assignment compatible with array typeTest Case: 15.10-initializer-type-2Expected Result: PASS
Regression Test:
tcltest::test 15.10-initializer-type-1 { expressions in array initializer must be assignment compatible with array type } { empty_main T1510it1 { short s = 1; int[] ia = new int[] { s, '1' }; } } {PASS}
expressions in array initializer must be assignment compatible with array typeTest Case: 15.10-initializer-type-3Expected Result: FAIL
Regression Test:
tcltest::test 15.10-initializer-type-2 { expressions in array initializer must be assignment compatible with array type } { empty_main T1510it2 { int[] ia = new int[] { 1L }; } } {FAIL}
expressions in array initializer must be assignment compatible with array typeTest Case: 15.10-initializer-type-4Expected Result: FAIL
Regression Test:
tcltest::test 15.10-initializer-type-3 { expressions in array initializer must be assignment compatible with array type } { empty_main T1510it3 { int[] ia = new int[] { new Object() }; } } {FAIL}
expressions in array initializer must be assignment compatible with array typeTest Case: 15.10-initializer-type-5Expected Result: FAIL
Regression Test:
tcltest::test 15.10-initializer-type-4 { expressions in array initializer must be assignment compatible with array type } { empty_main T1510it4 { int[] ia = new int[] { null }; } } {FAIL}
expressions in array initializer must be assignment compatible with array typeTest Case: 15.10-initializer-type-6Expected Result: FAIL
Regression Test:
tcltest::test 15.10-initializer-type-5 { expressions in array initializer must be assignment compatible with array type } { empty_main T1510it5 { int[] ia = new int[] { System.out.println() }; } } {FAIL}
expressions in array initializer must be assignment compatible with array typeTest Case: 15.10-initializer-type-7Expected Result: FAIL
Regression Test:
tcltest::test 15.10-initializer-type-6 { expressions in array initializer must be assignment compatible with array type } { empty_main T1510it6 { Object[] oa = new Object[] { 1 }; } } {FAIL}
expressions in array initializer must be assignment compatible with array typeTest Case: 15.10-initializer-type-8Expected Result: PASS
Regression Test:
tcltest::test 15.10-initializer-type-7 { expressions in array initializer must be assignment compatible with array type } { empty_main T1510it7 { Object[] oa = new Object[] { new Object() }; } } {PASS}
expressions in array initializer must be assignment compatible with array typeTest Case: 15.10-initializer-type-9Expected Result: PASS
Regression Test:
tcltest::test 15.10-initializer-type-8 { expressions in array initializer must be assignment compatible with array type } { empty_main T1510it8 { Object[] oa = new Object[] { null }; } } {PASS}
expressions in array initializer must be assignment compatible with array typeTest Case: 15.10-initializer-type-10Expected Result: FAIL
Regression Test:
tcltest::test 15.10-initializer-type-9 { expressions in array initializer must be assignment compatible with array type } { empty_main T1510it9 { Object[] oa = new Object[] { System.out.println() }; } } {FAIL}
expressions in array initializer must be assignment compatible with array typeTest Case: 15.10-initializer-type-11Expected Result: PASS
Regression Test:
tcltest::test 15.10-initializer-type-10 { expressions in array initializer must be assignment compatible with array type } { empty_main T1510it10 { int[][] iaa = new int[][] { {1} }; } } {PASS}
expressions in array initializer must be assignment compatible with array typeTest Case: 15.10-initializer-type-12Expected Result: FAIL
Regression Test:
tcltest::test 15.10-initializer-type-11 { expressions in array initializer must be assignment compatible with array type } { empty_main T1510it11 { int[][] iaa = new int[][] { 1 }; } } {FAIL}
expressions in array initializer must be assignment compatible with array typeTest Case: 15.10-initializer-type-13Expected Result: FAIL
Regression Test:
tcltest::test 15.10-initializer-type-12 { expressions in array initializer must be assignment compatible with array type } { empty_main T1510it12 { int[][] iaa = new int[][] { { {1} } }; } } {FAIL}
expressions in array initializer must be assignment compatible with array typeExpected Result: PASS
Regression Test:
tcltest::test 15.10-initializer-type-13 { expressions in array initializer must be assignment compatible with array type } { empty_main T1510it13 { int[][] iaa = new int[][] { {1, 2}, null }; } } {PASS}
tests/jls/expressions/method-invocation-expressions/determine-method-signature/applicable-and-accessible
example code, should fail since two(int) is privateTest Case: 15.12.2.1-jls-example-2Expected Result: FAIL
Regression Test:
tcltest::test 15.12.2.1-jls-example-1 { example code, should fail since two(int) is private } { saveas T151221je1.java { class Doubler { static int two() { return two(1); } private static int two(int i) { return 2*i; } } class Test extends Doubler { public static long two(long j) {return j+j; } public static void main(String[] args) { System.out.println(two(3)); System.out.println(Doubler.two(3)); // compile-time error } } } compile T151221je1.java } {FAIL}
example code, The type of the literal 37 is int, and int cannot be converted to byte by method invocation conversionTest Case: 15.12.2.1-accessibility-constructor-1Expected Result: FAIL
Regression Test:
tcltest::test 15.12.2.1-jls-example-2 { example code, The type of the literal 37 is int, and int cannot be converted to byte by method invocation conversion } { saveas T151221je2.java { class ColoredPoint { int x, y; byte color; void setColor(byte color) { this.color = color; } } class Test { public static void main(String[] args) { ColoredPoint cp = new ColoredPoint(); byte color = 37; cp.setColor(color); cp.setColor(37); // compile-time error } } } compile T151221je2.java } {FAIL}
A constructor must be applicable and accessible, in this case the constructor is private so it is not accessible even though it is applicableTest Case: 15.12.2.1-accessibility-constructor-2Expected Result: PASS
Regression Test:
tcltest::test 15.12.2.1-accessibility-constructor-1 { A constructor must be applicable and accessible, in this case the constructor is private so it is not accessible even though it is applicable } { saveas T151221ac1.java { class T151221ac1 { public T151221ac1(String s) {} private T151221ac1(Integer i) {} } class T151221ac1_Test { Object o = new T151221ac1(null); } } compile T151221ac1.java } {PASS}
A private constructor is not accessibleTest Case: 15.12.2.1-accessibility-method-1Expected Result: PASS
Regression Test:
tcltest::test 15.12.2.1-accessibility-constructor-2 { A private constructor is not accessible } { saveas T151221ac2.java { class T151221ac2 { public T151221ac2(String x, String y) {} private T151221ac2(String x, char[] y) {} } class T151221ac2_Test { Object o = new T151221ac2("hi", null); } } compile T151221ac2.java } {PASS}
A method must be applicable and accessible, in this case the method is private so it is not accessible even though it is applicableExpected Result: PASS
Regression Test:
tcltest::test 15.12.2.1-accessibility-method-1 { A method must be applicable and accessible, in this case the method is private so it is not accessible even though it is applicable } { saveas T151221am1.java { class T151221am1 { public int foo(String s) { return 0; } private int foo(Integer i) { return 0; } } class T151221am1_Test { int i = new T151221am1().foo(null); } } compile T151221am1.java } {PASS}
tests/jls/expressions/postfix-expressions/postfix-increment-operator
Postfix++ must operate on a numeric variableTest Case: 15.14.1-argument-2Expected Result: FAIL
Regression Test:
tcltest::test 15.14.1-argument-1 { Postfix++ must operate on a numeric variable } { empty_class T15141a1 {int i = 1++;} } {FAIL}
Postfix++ must operate on a numeric variableTest Case: 15.14.1-argument-3Expected Result: FAIL
Regression Test:
tcltest::test 15.14.1-argument-2 { Postfix++ must operate on a numeric variable } { empty_class T15141a2 {boolean b = true++;} } {FAIL}
Postfix++ must operate on a numeric variableTest Case: 15.14.1-argument-4Expected Result: FAIL
Regression Test:
tcltest::test 15.14.1-argument-3 { Postfix++ must operate on a numeric variable } { empty_class T15141a3 {Object o = null++;} } {FAIL}
Postfix++ must operate on a numeric variableTest Case: 15.14.1-argument-5Expected Result: FAIL
Regression Test:
tcltest::test 15.14.1-argument-4 { Postfix++ must operate on a numeric variable } { empty_class T15141a4 {Object o = (new Object())++;} } {FAIL}
Postfix++ must operate on a numeric variableTest Case: 15.14.1-argument-6Expected Result: FAIL
Regression Test:
tcltest::test 15.14.1-argument-5 { Postfix++ must operate on a numeric variable } { empty_class T15141a5 {int i = (System.out.println())++;} } {FAIL}
Postfix++ must operate on a numeric variableTest Case: 15.14.1-argument-7Expected Result: FAIL
Regression Test:
tcltest::test 15.14.1-argument-6 { Postfix++ must operate on a numeric variable } { empty_class T15141a6 {boolean b = true, b2 = b++;} } {FAIL}
Postfix++ must operate on a numeric variableTest Case: 15.14.1-argument-8Expected Result: FAIL
Regression Test:
tcltest::test 15.14.1-argument-7 { Postfix++ must operate on a numeric variable } { empty_class T15141a7 {Object o = null, o2 = o++;} } {FAIL}
Postfix++ must operate on a numeric variableTest Case: 15.14.1-argument-9Expected Result: FAIL
Regression Test:
tcltest::test 15.14.1-argument-8 { Postfix++ must operate on a numeric variable } { empty_class T15141a8 {int i = 1, i2 = (-i)++;} } {FAIL}
Postfix++ cannot operate on final variableTest Case: 15.14.1-type-1Expected Result: FAIL
Regression Test:
tcltest::test 15.14.1-argument-9 { Postfix++ cannot operate on final variable } { empty_class T15141a9 {final int i = 1, j = i++;} } {FAIL}
Postfix++ operates on all numeric typesTest Case: 15.14.1-type-2Expected Result: PASS
Regression Test:
tcltest::test 15.14.1-type-1 { Postfix++ operates on all numeric types } { empty_class T15141t1 {byte b = 1, b2 = b++;} } {PASS}
Postfix++ operates on all numeric typesTest Case: 15.14.1-type-3Expected Result: PASS
Regression Test:
tcltest::test 15.14.1-type-2 { Postfix++ operates on all numeric types } { empty_class T15141t2 {short s = 1, s2 = s++;} } {PASS}
Postfix++ operates on all numeric typesTest Case: 15.14.1-type-4Expected Result: PASS
Regression Test:
tcltest::test 15.14.1-type-3 { Postfix++ operates on all numeric types } { empty_class T15141t3 {char c = 1, c2 = c++;} } {PASS}
Postfix++ operates on all numeric typesTest Case: 15.14.1-type-5Expected Result: PASS
Regression Test:
tcltest::test 15.14.1-type-4 { Postfix++ operates on all numeric types } { empty_class T15141t4 {int i = 1, i2 = i++;} } {PASS}
Postfix++ operates on all numeric typesTest Case: 15.14.1-type-6Expected Result: PASS
Regression Test:
tcltest::test 15.14.1-type-5 { Postfix++ operates on all numeric types } { empty_class T15141t5 {long l = 1, l2 = l++;} } {PASS}
Postfix++ operates on all numeric typesTest Case: 15.14.1-type-7Expected Result: PASS
Regression Test:
tcltest::test 15.14.1-type-6 { Postfix++ operates on all numeric types } { empty_class T15141t6 {float f = 1, f2 = f++;} } {PASS}
Postfix++ operates on all numeric typesTest Case: 15.14.1-result-1Expected Result: PASS
Regression Test:
tcltest::test 15.14.1-type-7 { Postfix++ operates on all numeric types } { empty_class T15141t7 {double d = 1, d2 = d++;} } {PASS}
Postfix++ results in a value, not a variableExpected Result: FAIL
Regression Test:
tcltest::test 15.14.1-result-1 { Postfix++ results in a value, not a variable } { empty_class T15141r1 { void foo() { int i = 1; i++ = 2; } } } {FAIL}
tests/jls/expressions/postfix-expressions/postfix-decrement-operator
Postfix-- must operate on a numeric variableTest Case: 15.14.2-argument-2Expected Result: FAIL
Regression Test:
tcltest::test 15.14.2-argument-1 { Postfix-- must operate on a numeric variable } { empty_class T15142a1 {int i = 1--;} } {FAIL}
Postfix-- must operate on a numeric variableTest Case: 15.14.2-argument-3Expected Result: FAIL
Regression Test:
tcltest::test 15.14.2-argument-2 { Postfix-- must operate on a numeric variable } { empty_class T15142a2 {boolean b = true--;} } {FAIL}
Postfix-- must operate on a numeric variableTest Case: 15.14.2-argument-4Expected Result: FAIL
Regression Test:
tcltest::test 15.14.2-argument-3 { Postfix-- must operate on a numeric variable } { empty_class T15142a3 {Object o = null--;} } {FAIL}
Postfix-- must operate on a numeric variableTest Case: 15.14.2-argument-5Expected Result: FAIL
Regression Test:
tcltest::test 15.14.2-argument-4 { Postfix-- must operate on a numeric variable } { empty_class T15142a4 {Object o = (new Object())--;} } {FAIL}
Postfix-- must operate on a numeric variableTest Case: 15.14.2-argument-6Expected Result: FAIL
Regression Test:
tcltest::test 15.14.2-argument-5 { Postfix-- must operate on a numeric variable } { empty_class T15142a5 {int i = (System.out.println())--;} } {FAIL}
Postfix-- must operate on a numeric variableTest Case: 15.14.2-argument-7Expected Result: FAIL
Regression Test:
tcltest::test 15.14.2-argument-6 { Postfix-- must operate on a numeric variable } { empty_class T15142a6 {boolean b = true, b2 = b--;} } {FAIL}
Postfix-- must operate on a numeric variableTest Case: 15.14.2-argument-8Expected Result: FAIL
Regression Test:
tcltest::test 15.14.2-argument-7 { Postfix-- must operate on a numeric variable } { empty_class T15142a7 {Object o = null, o2 = o--;} } {FAIL}
Postfix-- must operate on a numeric variableTest Case: 15.14.2-argument-9Expected Result: FAIL
Regression Test:
tcltest::test 15.14.2-argument-8 { Postfix-- must operate on a numeric variable } { empty_class T15142a8 {int i = 1, i2 = (-i)--;} } {FAIL}
Postfix-- cannot operate on final variableTest Case: 15.14.2-type-1Expected Result: FAIL
Regression Test:
tcltest::test 15.14.2-argument-9 { Postfix-- cannot operate on final variable } { empty_class T15142a9 {final int i = 1, j = i--;} } {FAIL}
Postfix-- operates on all numeric typesTest Case: 15.14.2-type-2Expected Result: PASS
Regression Test:
tcltest::test 15.14.2-type-1 { Postfix-- operates on all numeric types } { empty_class T15142t1 {byte b = 1, b2 = b--;} } {PASS}
Postfix-- operates on all numeric typesTest Case: 15.14.2-type-3Expected Result: PASS
Regression Test:
tcltest::test 15.14.2-type-2 { Postfix-- operates on all numeric types } { empty_class T15142t2 {short s = 1, s2 = s--;} } {PASS}
Postfix-- operates on all numeric typesTest Case: 15.14.2-type-4Expected Result: PASS
Regression Test:
tcltest::test 15.14.2-type-3 { Postfix-- operates on all numeric types } { empty_class T15142t3 {char c = 1, c2 = c--;} } {PASS}
Postfix-- operates on all numeric typesTest Case: 15.14.2-type-5Expected Result: PASS
Regression Test:
tcltest::test 15.14.2-type-4 { Postfix-- operates on all numeric types } { empty_class T15142t4 {int i = 1, i2 = i--;} } {PASS}
Postfix-- operates on all numeric typesTest Case: 15.14.2-type-6Expected Result: PASS
Regression Test:
tcltest::test 15.14.2-type-5 { Postfix-- operates on all numeric types } { empty_class T15142t5 {long l = 1, l2 = l--;} } {PASS}
Postfix-- operates on all numeric typesTest Case: 15.14.2-type-7Expected Result: PASS
Regression Test:
tcltest::test 15.14.2-type-6 { Postfix-- operates on all numeric types } { empty_class T15142t6 {float f = 1, f2 = f--;} } {PASS}
Postfix-- operates on all numeric typesTest Case: 15.14.2-result-1Expected Result: PASS
Regression Test:
tcltest::test 15.14.2-type-7 { Postfix-- operates on all numeric types } { empty_class T15142t7 {double d = 1, d2 = d--;} } {PASS}
Postfix-- results in a value, not a variableExpected Result: FAIL
Regression Test:
tcltest::test 15.14.2-result-1 { Postfix-- results in a value, not a variable } { empty_class T15142r1 { void foo() { int i = 1; i-- = 2; } } } {FAIL}
tests/jls/expressions/unary-operators
Unary operators group right-to-leftTest Case: 15.15-precedence-1Expected Result: PASS
Regression Test:
tcltest::test 15.15-group-1 { Unary operators group right-to-left } { constant_expression T15151 {-~0xffffffff == 0} {~-0xffffffff == 0xfffffffe} } {PASS}
Unary operators have higher precedence than multiplicativeTest Case: 15.15-precedence-2Expected Result: FAIL
Regression Test:
tcltest::test 15.15-precedence-1 { Unary operators have higher precedence than multiplicative } { is_assignable_to T1515p1 float {(float) 1/1.0} } {FAIL}
Unary operators have higher precedence than multiplicativeTest Case: 15.15-precedence-3Expected Result: PASS
Regression Test:
tcltest::test 15.15-precedence-2 { Unary operators have higher precedence than multiplicative } { is_assignable_to T1515p2 float {(float) (1/1.0)} } {PASS}
Unary operators have higher precedence than multiplicativeTest Case: 15.15-precedence-4Expected Result: PASS
Regression Test:
tcltest::test 15.15-precedence-3 { Unary operators have higher precedence than multiplicative } { constant_expression T1515p3 {-0x80000000/2 == 0xc0000000} {-(0x80000000/2) == 0x40000000} } {PASS}
Unary operators have higher precedence than multiplicativeTest Case: 15.15-precedence-5Expected Result: PASS
Regression Test:
tcltest::test 15.15-precedence-4 { Unary operators have higher precedence than multiplicative } { constant_expression T1515p4 {~0xffffffff*2 == 0} {~(0xffffffff*2) == 1} } {PASS}
Unary operators have higher precedence than addition, for booleanExpected Result: PASS
Regression Test:
tcltest::test 15.15-precedence-5 { Unary operators have higher precedence than addition, for boolean } { constant_expression T1515p5 {!true + "" == "false"} } {PASS}
tests/jls/expressions/unary-operators/prefix-increment-operator
++Prefix must operate on a numeric variableTest Case: 15.15.1-argument-2Expected Result: FAIL
Regression Test:
tcltest::test 15.15.1-argument-1 { ++Prefix must operate on a numeric variable } { empty_class T15151a1 {int i = ++1;} } {FAIL}
++Prefix must operate on a numeric variableTest Case: 15.15.1-argument-3Expected Result: FAIL
Regression Test:
tcltest::test 15.15.1-argument-2 { ++Prefix must operate on a numeric variable } { empty_class T15151a2 {boolean b = ++true;} } {FAIL}
++Prefix must operate on a numeric variableTest Case: 15.15.1-argument-4Expected Result: FAIL
Regression Test:
tcltest::test 15.15.1-argument-3 { ++Prefix must operate on a numeric variable } { empty_class T15151a3 {Object o = ++null;} } {FAIL}
++Prefix must operate on a numeric variableTest Case: 15.15.1-argument-5Expected Result: FAIL
Regression Test:
tcltest::test 15.15.1-argument-4 { ++Prefix must operate on a numeric variable } { empty_class T15151a4 {Object o = ++(new Object());} } {FAIL}
++Prefix must operate on a numeric variableTest Case: 15.15.1-argument-6Expected Result: FAIL
Regression Test:
tcltest::test 15.15.1-argument-5 { ++Prefix must operate on a numeric variable } { empty_class T15151a5 {int i = ++(System.out.println());} } {FAIL}
++Prefix must operate on a numeric variableTest Case: 15.15.1-argument-7Expected Result: FAIL
Regression Test:
tcltest::test 15.15.1-argument-6 { ++Prefix must operate on a numeric variable } { empty_class T15151a6 {boolean b = true, b2 = ++b;} } {FAIL}
++Prefix must operate on a numeric variableTest Case: 15.15.1-argument-8Expected Result: FAIL
Regression Test:
tcltest::test 15.15.1-argument-7 { ++Prefix must operate on a numeric variable } { empty_class T15151a7 {Object o = null, o2 = ++o;} } {FAIL}
++Prefix must operate on a numeric variableTest Case: 15.15.1-argument-9Expected Result: FAIL
Regression Test:
tcltest::test 15.15.1-argument-8 { ++Prefix must operate on a numeric variable } { empty_class T15151a8 {int i = 1, i2 = ++(-i);} } {FAIL}
++Prefix cannot operate on final variableTest Case: 15.15.1-type-1Expected Result: FAIL
Regression Test:
tcltest::test 15.15.1-argument-9 { ++Prefix cannot operate on final variable } { empty_class T15151a9 {final int i = 1, j = ++i;} } {FAIL}
++Prefix operates on all numeric typesTest Case: 15.15.1-type-2Expected Result: PASS
Regression Test:
tcltest::test 15.15.1-type-1 { ++Prefix operates on all numeric types } { empty_class T15151t1 {byte b = 1, b2 = ++b;} } {PASS}
++Prefix operates on all numeric typesTest Case: 15.15.1-type-3Expected Result: PASS
Regression Test:
tcltest::test 15.15.1-type-2 { ++Prefix operates on all numeric types } { empty_class T15151t2 {short s = 1, s2 = ++s;} } {PASS}
++Prefix operates on all numeric typesTest Case: 15.15.1-type-4Expected Result: PASS
Regression Test:
tcltest::test 15.15.1-type-3 { ++Prefix operates on all numeric types } { empty_class T15151t3 {char c = 1, c2 = ++c;} } {PASS}
++Prefix operates on all numeric typesTest Case: 15.15.1-type-5Expected Result: PASS
Regression Test:
tcltest::test 15.15.1-type-4 { ++Prefix operates on all numeric types } { empty_class T15151t4 {int i = 1, i2 = ++i;} } {PASS}
++Prefix operates on all numeric typesTest Case: 15.15.1-type-6Expected Result: PASS
Regression Test:
tcltest::test 15.15.1-type-5 { ++Prefix operates on all numeric types } { empty_class T15151t5 {long l = 1, l2 = ++l;} } {PASS}
++Prefix operates on all numeric typesTest Case: 15.15.1-type-7Expected Result: PASS
Regression Test:
tcltest::test 15.15.1-type-6 { ++Prefix operates on all numeric types } { empty_class T15151t6 {float f = 1, f2 = ++f;} } {PASS}
++Prefix operates on all numeric typesTest Case: 15.15.1-result-1Expected Result: PASS
Regression Test:
tcltest::test 15.15.1-type-7 { ++Prefix operates on all numeric types } { empty_class T15151t7 {double d = 1, d2 = ++d;} } {PASS}
++Prefix results in a value, not a variableExpected Result: FAIL
Regression Test:
tcltest::test 15.15.1-result-1 { ++Prefix results in a value, not a variable } { empty_class T15151r1 { void foo() { int i = 1; ++i = 2; } } } {FAIL}
tests/jls/expressions/unary-operators/prefix-decrement-operator
--Prefix must operate on a numeric variableTest Case: 15.15.2-argument-2Expected Result: FAIL
Regression Test:
tcltest::test 15.15.2-argument-1 { --Prefix must operate on a numeric variable } { empty_class T15152a1 {int i = --1;} } {FAIL}
--Prefix must operate on a numeric variableTest Case: 15.15.2-argument-3Expected Result: FAIL
Regression Test:
tcltest::test 15.15.2-argument-2 { --Prefix must operate on a numeric variable } { empty_class T15152a2 {boolean b = --true;} } {FAIL}
--Prefix must operate on a numeric variableTest Case: 15.15.2-argument-4Expected Result: FAIL
Regression Test:
tcltest::test 15.15.2-argument-3 { --Prefix must operate on a numeric variable } { empty_class T15152a3 {Object o = --null;} } {FAIL}
--Prefix must operate on a numeric variableTest Case: 15.15.2-argument-5Expected Result: FAIL
Regression Test:
tcltest::test 15.15.2-argument-4 { --Prefix must operate on a numeric variable } { empty_class T15152a4 {Object o = --(new Object());} } {FAIL}
--Prefix must operate on a numeric variableTest Case: 15.15.2-argument-6Expected Result: FAIL
Regression Test:
tcltest::test 15.15.2-argument-5 { --Prefix must operate on a numeric variable } { empty_class T15152a5 {int i = --(System.out.println());} } {FAIL}
--Prefix must operate on a numeric variableTest Case: 15.15.2-argument-7Expected Result: FAIL
Regression Test:
tcltest::test 15.15.2-argument-6 { --Prefix must operate on a numeric variable } { empty_class T15152a6 {boolean b = true, b2 = --b;} } {FAIL}
--Prefix must operate on a numeric variableTest Case: 15.15.2-argument-8Expected Result: FAIL
Regression Test:
tcltest::test 15.15.2-argument-7 { --Prefix must operate on a numeric variable } { empty_class T15152a7 {Object o = null, o2 = --o;} } {FAIL}
--Prefix must operate on a numeric variableTest Case: 15.15.2-argument-9Expected Result: FAIL
Regression Test:
tcltest::test 15.15.2-argument-8 { --Prefix must operate on a numeric variable } { empty_class T15152a8 {int i = 1, i2 = --(-i);} } {FAIL}
--Prefix cannot operate on final variableTest Case: 15.15.2-type-1Expected Result: FAIL
Regression Test:
tcltest::test 15.15.2-argument-9 { --Prefix cannot operate on final variable } { empty_class T15152a9 {final int i = 1, j = --i;} } {FAIL}
--Prefix operates on all numeric typesTest Case: 15.15.2-type-2Expected Result: PASS
Regression Test:
tcltest::test 15.15.2-type-1 { --Prefix operates on all numeric types } { empty_class T15152t1 {byte b = 1, b2 = --b;} } {PASS}
--Prefix operates on all numeric typesTest Case: 15.15.2-type-3Expected Result: PASS
Regression Test:
tcltest::test 15.15.2-type-2 { --Prefix operates on all numeric types } { empty_class T15152t2 {short s = 1, s2 = --s;} } {PASS}
--Prefix operates on all numeric typesTest Case: 15.15.2-type-4Expected Result: PASS
Regression Test:
tcltest::test 15.15.2-type-3 { --Prefix operates on all numeric types } { empty_class T15152t3 {char c = 1, c2 = --c;} } {PASS}
--Prefix operates on all numeric typesTest Case: 15.15.2-type-5Expected Result: PASS
Regression Test:
tcltest::test 15.15.2-type-4 { --Prefix operates on all numeric types } { empty_class T15152t4 {int i = 1, i2 = --i;} } {PASS}
--Prefix operates on all numeric typesTest Case: 15.15.2-type-6Expected Result: PASS
Regression Test:
tcltest::test 15.15.2-type-5 { --Prefix operates on all numeric types } { empty_class T15152t5 {long l = 1, l2 = --l;} } {PASS}
--Prefix operates on all numeric typesTest Case: 15.15.2-type-7Expected Result: PASS
Regression Test:
tcltest::test 15.15.2-type-6 { --Prefix operates on all numeric types } { empty_class T15152t6 {float f = 1, f2 = --f;} } {PASS}
--Prefix operates on all numeric typesTest Case: 15.15.2-result-1Expected Result: PASS
Regression Test:
tcltest::test 15.15.2-type-7 { --Prefix operates on all numeric types } { empty_class T15152t7 {double d = 1, d2 = --d;} } {PASS}
--Prefix results in a value, not a variableExpected Result: FAIL
Regression Test:
tcltest::test 15.15.2-result-1 { --Prefix results in a value, not a variable } { empty_class T15152r1 { void foo() { int i = 1; --i = 2; } } } {FAIL}
tests/jls/expressions/unary-operators/unary-plus-operator
+ must have numeric operandTest Case: 15.15.3-type-2Expected Result: FAIL
Regression Test:
tcltest::test 15.15.3-type-1 { + must have numeric operand } { is_assignable_to T15153t1 Object +null } {FAIL}
+ must have numeric operandTest Case: 15.15.3-type-3Expected Result: FAIL
Regression Test:
tcltest::test 15.15.3-type-2 { + must have numeric operand } { is_assignable_to T15153t2 boolean +true } {FAIL}
+ must have numeric operandTest Case: 15.15.3-type-4Expected Result: FAIL
Regression Test:
tcltest::test 15.15.3-type-3 { + must have numeric operand } { is_assignable_to T15153t3 Object {+(new Object())} } {FAIL}
+ must have numeric operandTest Case: 15.15.3-type-5Expected Result: FAIL
Regression Test:
tcltest::test 15.15.3-type-4 { + must have numeric operand } { is_assignable_to T15153t4 int +System.out.println() } {FAIL}
+ performs unary promotionTest Case: 15.15.3-type-6Expected Result: FAIL
Regression Test:
tcltest::test 15.15.3-type-5 { + performs unary promotion } { #is_assignable_to creates byte n1, byte n2 is_assignable_to T15153t5 byte 1 byte +n1 } {FAIL}
+ must have numeric operandTest Case: 15.15.3-type-7Expected Result: PASS
Regression Test:
tcltest::test 15.15.3-type-6 { + must have numeric operand } { is_assignable_to T15153t6 int +1 } {PASS}
+ must have numeric operandTest Case: 15.15.3-type-8Expected Result: PASS
Regression Test:
tcltest::test 15.15.3-type-7 { + must have numeric operand } { is_assignable_to T15153t7 long +1L } {PASS}
+ must have numeric operandTest Case: 15.15.3-type-9Expected Result: PASS
Regression Test:
tcltest::test 15.15.3-type-8 { + must have numeric operand } { is_assignable_to T15153t8 float +1f } {PASS}
+ must have numeric operandTest Case: 15.15.3-type-10Expected Result: PASS
Regression Test:
tcltest::test 15.15.3-type-9 { + must have numeric operand } { is_assignable_to T15153t9 double +1d } {PASS}
+ must have numeric operandTest Case: 15.15.3-type-11Expected Result: PASS
Regression Test:
tcltest::test 15.15.3-type-10 { + must have numeric operand } { is_assignable_to T15153t10 short +1 } {PASS}
+ must have numeric operandTest Case: 15.15.3-type-12Expected Result: PASS
Regression Test:
tcltest::test 15.15.3-type-11 { + must have numeric operand } { is_assignable_to T15153t11 char +'1' } {PASS}
+ must have numeric operandExpected Result: PASS
Regression Test:
tcltest::test 15.15.3-type-12 { + must have numeric operand } { is_assignable_to T15153t12 byte +1 } {PASS}
tests/jls/expressions/unary-operators/unary-minus-operator
- must have numeric operandTest Case: 15.15.4-type-2Expected Result: FAIL
Regression Test:
tcltest::test 15.15.4-type-1 { - must have numeric operand } { is_assignable_to T15154t1 Object -null } {FAIL}
- must have numeric operandTest Case: 15.15.4-type-3Expected Result: FAIL
Regression Test:
tcltest::test 15.15.4-type-2 { - must have numeric operand } { is_assignable_to T15154t2 boolean -true } {FAIL}
- must have numeric operandTest Case: 15.15.4-type-4Expected Result: FAIL
Regression Test:
tcltest::test 15.15.4-type-3 { - must have numeric operand } { is_assignable_to T15154t3 Object {-(new Object())} } {FAIL}
- must have numeric operandTest Case: 15.15.4-type-5Expected Result: FAIL
Regression Test:
tcltest::test 15.15.4-type-4 { - must have numeric operand } { is_assignable_to T15154t4 int -System.out.println() } {FAIL}
- performs unary promotionTest Case: 15.15.4-type-6Expected Result: FAIL
Regression Test:
tcltest::test 15.15.4-type-5 { - performs unary promotion } { #is_assignable_to creates byte n1, byte n2 is_assignable_to T15154t5 byte 1 byte -n1 } {FAIL}
- must have numeric operandTest Case: 15.15.4-type-7Expected Result: PASS
Regression Test:
tcltest::test 15.15.4-type-6 { - must have numeric operand } { is_assignable_to T15154t6 short -1 } {PASS}
- must have numeric operandTest Case: 15.15.4-type-8Expected Result: PASS
Regression Test:
tcltest::test 15.15.4-type-7 { - must have numeric operand } { is_assignable_to T15154t7 char -(-'1') } {PASS}
- must have numeric operandTest Case: 15.15.4-int-1Expected Result: PASS
Regression Test:
tcltest::test 15.15.4-type-8 { - must have numeric operand } { is_assignable_to T15154t8 byte -1 } {PASS}
-x = ~x+1 for all intsTest Case: 15.15.4-int-2Expected Result: PASS
Regression Test:
tcltest::test 15.15.4-int-1 { -x = ~x+1 for all ints } { constant_expression T15154i1 {-0 == ~0+1} } {PASS}
-x = ~x+1 for all intsTest Case: 15.15.4-int-3Expected Result: PASS
Regression Test:
tcltest::test 15.15.4-int-2 { -x = ~x+1 for all ints } { constant_expression T15154i2 {-0xffffffff == ~0xffffffff+1} } {PASS}
-MIN_INT is still MIN_INTTest Case: 15.15.4-long-1Expected Result: PASS
Regression Test:
tcltest::test 15.15.4-int-3 { -MIN_INT is still MIN_INT } { constant_expression T15154i3 {-0x80000000 == 0x80000000} } {PASS}
-x = ~x+1 for all longsTest Case: 15.15.4-long-2Expected Result: PASS
Regression Test:
tcltest::test 15.15.4-long-1 { -x = ~x+1 for all longs } { constant_expression T15154l1 {-0L == ~0L+1} } {PASS}
-x = ~x+1 for all longsTest Case: 15.15.4-long-3Expected Result: PASS
Regression Test:
tcltest::test 15.15.4-long-2 { -x = ~x+1 for all longs } { constant_expression T15154l2 {-0xffffffffffffffffL == ~0xffffffffffffffffL+1} } {PASS}
-MIN_LONG is still MIN_LONGTest Case: 15.15.4-float-1Expected Result: PASS
Regression Test:
tcltest::test 15.15.4-long-3 { -MIN_LONG is still MIN_LONG } { constant_expression T15154l3 {-0x8000000000000000L == 0x8000000000000000L} } {PASS}
-NaN is still NaNTest Case: 15.15.4-float-2Expected Result: PASS
Regression Test:
tcltest::test 15.15.4-float-1 { -NaN is still NaN } { constant_expression T15154f1 {-Float.NaN != -Float.NaN} } {PASS}
- Infinity is Infinity of opposite signTest Case: 15.15.4-float-3Expected Result: PASS
Regression Test:
tcltest::test 15.15.4-float-2 { - Infinity is Infinity of opposite sign } { constant_expression T15154f2 {-Float.POSITIVE_INFINITY == Float.NEGATIVE_INFINITY} } {PASS}
- 0.0 is zero of opposite signTest Case: 15.15.4-double-1Expected Result: PASS
Regression Test:
tcltest::test 15.15.4-float-3 { - 0.0 is zero of opposite sign } { constant_expression T15154f3 {(1/0.0f) != (1/-0.0f)} } {PASS}
-NaN is still NaNTest Case: 15.15.4-double-2Expected Result: PASS
Regression Test:
tcltest::test 15.15.4-double-1 { -NaN is still NaN } { constant_expression T15154d1 {-Double.NaN != -Double.NaN} } {PASS}
- Infinity is Infinity of opposite signTest Case: 15.15.4-double-3Expected Result: PASS
Regression Test:
tcltest::test 15.15.4-double-2 { - Infinity is Infinity of opposite sign } { constant_expression T15154d2 {-Double.POSITIVE_INFINITY == Double.NEGATIVE_INFINITY} } {PASS}
- 0.0 is zero of opposite signExpected Result: PASS
Regression Test:
tcltest::test 15.15.4-double-3 { - 0.0 is zero of opposite sign } { constant_expression T15154d3 {(1/0.0) != (1/-0.0)} } {PASS}
tests/jls/expressions/unary-operators/bitwise-complement-operator
~ must have integral operandTest Case: 15.15.5-type-2Expected Result: FAIL
Regression Test:
tcltest::test 15.15.5-type-1 { ~ must have integral operand } { is_assignable_to T15155t1 Object ~null } {FAIL}
~ must have integral operandTest Case: 15.15.5-type-3Expected Result: FAIL
Regression Test:
tcltest::test 15.15.5-type-2 { ~ must have integral operand } { is_assignable_to T15155t2 boolean ~true } {FAIL}
~ must have integral operandTest Case: 15.15.5-type-4Expected Result: FAIL
Regression Test:
tcltest::test 15.15.5-type-3 { ~ must have integral operand } { is_assignable_to T15155t3 Object {~(new Object())} } {FAIL}
~ must have integral operandTest Case: 15.15.5-type-5Expected Result: FAIL
Regression Test:
tcltest::test 15.15.5-type-4 { ~ must have integral operand } { is_assignable_to T15155t4 int ~System.out.println() } {FAIL}
~ must have integral operandTest Case: 15.15.5-type-6Expected Result: FAIL
Regression Test:
tcltest::test 15.15.5-type-5 { ~ must have integral operand } { is_assignable_to T15155t5 int ~0.0f } {FAIL}
~ must have integral operandTest Case: 15.15.5-type-7Expected Result: FAIL
Regression Test:
tcltest::test 15.15.5-type-6 { ~ must have integral operand } { is_assignable_to T15155t6 int ~0.0d } {FAIL}
~ performs unary promotionTest Case: 15.15.5-type-8Expected Result: FAIL
Regression Test:
tcltest::test 15.15.5-type-7 { ~ performs unary promotion } { #is_assignable_to creates byte n1, byte n2 is_assignable_to T15155t7 byte 1 byte ~n1 } {FAIL}
~ must have integral operandTest Case: 15.15.5-type-9Expected Result: PASS
Regression Test:
tcltest::test 15.15.5-type-8 { ~ must have integral operand } { is_assignable_to T15155t8 short ~1 } {PASS}
~ must have integral operandTest Case: 15.15.5-type-10Expected Result: PASS
Regression Test:
tcltest::test 15.15.5-type-9 { ~ must have integral operand } { is_assignable_to T15155t9 char ~(~'1') } {PASS}
~ must have integral operandTest Case: 15.15.5-int-1Expected Result: PASS
Regression Test:
tcltest::test 15.15.5-type-10 { ~ must have integral operand } { is_assignable_to T15155t10 byte ~1 } {PASS}
~x = -x-1 for all intsTest Case: 15.15.5-int-2Expected Result: PASS
Regression Test:
tcltest::test 15.15.5-int-1 { ~x = -x-1 for all ints } { constant_expression T15155i1 {~0 == -0-1} } {PASS}
~x = -x-1 for all intsTest Case: 15.15.5-long-1Expected Result: PASS
Regression Test:
tcltest::test 15.15.5-int-2 { ~x = -x-1 for all ints } { constant_expression T15155i2 {~0xffffffff == -0xffffffff-1} } {PASS}
~x = -x-1 for all longsTest Case: 15.15.5-long-2Expected Result: PASS
Regression Test:
tcltest::test 15.15.5-long-1 { ~x = -x-1 for all longs } { constant_expression T15155l1 {~0L == -0L-1} } {PASS}
~x = -x-1 for all longsExpected Result: PASS
Regression Test:
tcltest::test 15.15.5-long-2 { ~x = -x-1 for all longs } { constant_expression T15155l2 {~0xffffffffffffffffL == -0xffffffffffffffffL-1} } {PASS}
tests/jls/expressions/unary-operators/logical-complement-operator
! must have boolean operandTest Case: 15.15.6-type-2Expected Result: FAIL
Regression Test:
tcltest::test 15.15.6-type-1 { ! must have boolean operand } { is_assignable_to T15156t1 Object !null } {FAIL}
! must have boolean operandTest Case: 15.15.6-type-3Expected Result: FAIL
Regression Test:
tcltest::test 15.15.6-type-2 { ! must have boolean operand } { is_assignable_to T15156t2 Object {!(new Object())} } {FAIL}
! must have boolean operandTest Case: 15.15.6-type-4Expected Result: FAIL
Regression Test:
tcltest::test 15.15.6-type-3 { ! must have boolean operand } { is_assignable_to T15156t3 int !System.out.println() } {FAIL}
! must have boolean operandTest Case: 15.15.6-type-5Expected Result: FAIL
Regression Test:
tcltest::test 15.15.6-type-4 { ! must have boolean operand } { is_assignable_to T15156t4 int !0.0f } {FAIL}
! must have boolean operandTest Case: 15.15.6-type-6Expected Result: FAIL
Regression Test:
tcltest::test 15.15.6-type-5 { ! must have boolean operand } { is_assignable_to T15156t5 int !0.0d } {FAIL}
! must have boolean operandTest Case: 15.15.6-type-7Expected Result: FAIL
Regression Test:
tcltest::test 15.15.6-type-6 { ! must have boolean operand } { is_assignable_to T15156t6 short !1 } {FAIL}
! must have boolean operandTest Case: 15.15.6-type-8Expected Result: FAIL
Regression Test:
tcltest::test 15.15.6-type-7 { ! must have boolean operand } { is_assignable_to T15156t7 char !'1' } {FAIL}
! must have boolean operandTest Case: 15.15.6-boolean-1Expected Result: FAIL
Regression Test:
tcltest::test 15.15.6-type-8 { ! must have boolean operand } { is_assignable_to T15156t8 byte !1 } {FAIL}
! true is falseTest Case: 15.15.6-boolean-2Expected Result: PASS
Regression Test:
tcltest::test 15.15.6-boolean-1 { ! true is false } { constant_expression T15156b1 {!true == false} } {PASS}
! false is trueExpected Result: PASS
Regression Test:
tcltest::test 15.15.6-boolean-2 { ! false is true } { constant_expression T15156b2 {!false == true} } {PASS}
tests/jls/expressions/multiplicative-operators
null is not a primitive numeric typeTest Case: 15.17-null-2Expected Result: FAIL
Regression Test:
tcltest::test 15.17-null-1 { null is not a primitive numeric type } { empty_class T1517null1 {int i = 2*null;} } {FAIL}
null is not a primitive numeric typeTest Case: 15.17-null-3Expected Result: FAIL
Regression Test:
tcltest::test 15.17-null-2 { null is not a primitive numeric type } { empty_class T1517null2 {int i = 2/null;} } {FAIL}
null is not a primitive numeric typeTest Case: 15.17-boolean-1Expected Result: FAIL
Regression Test:
tcltest::test 15.17-null-3 { null is not a primitive numeric type } { empty_class T1517null3 {int i = 2%null;} } {FAIL}
boolean is not a primitive numeric typeTest Case: 15.17-boolean-2Expected Result: FAIL
Regression Test:
tcltest::test 15.17-boolean-1 { boolean is not a primitive numeric type } { empty_class T1517boolean1 {int i = 2*true;} } {FAIL}
boolean is not a primitive numeric typeTest Case: 15.17-boolean-3Expected Result: FAIL
Regression Test:
tcltest::test 15.17-boolean-2 { boolean is not a primitive numeric type } { empty_class T1517boolean2 {int i = 2/true;} } {FAIL}
boolean is not a primitive numeric typeTest Case: 15.17-object-1Expected Result: FAIL
Regression Test:
tcltest::test 15.17-boolean-3 { boolean is not a primitive numeric type } { empty_class T1517boolean3 {int i = 2%true;} } {FAIL}
Object is not a primitive numeric typeTest Case: 15.17-object-2Expected Result: FAIL
Regression Test:
tcltest::test 15.17-object-1 { Object is not a primitive numeric type } { empty_class T1517object1 {int i = 2*(new Object());} } {FAIL}
Object is not a primitive numeric typeTest Case: 15.17-object-3Expected Result: FAIL
Regression Test:
tcltest::test 15.17-object-2 { Object is not a primitive numeric type } { empty_class T1517object2 {int i = 2/(new Object());} } {FAIL}
Object is not a primitive numeric typeTest Case: 15.17-void-1Expected Result: FAIL
Regression Test:
tcltest::test 15.17-object-3 { Object is not a primitive numeric type } { empty_class T1517object3 {int i = 2%(new Object());} } {FAIL}
void is not a primitive numeric typeTest Case: 15.17-void-2Expected Result: FAIL
Regression Test:
tcltest::test 15.17-void-1 { void is not a primitive numeric type } { empty_class T1517void1 {int i = 2*System.out.println();} } {FAIL}
void is not a primitive numeric typeTest Case: 15.17-void-3Expected Result: FAIL
Regression Test:
tcltest::test 15.17-void-2 { void is not a primitive numeric type } { empty_class T1517void2 {int i = 2/System.out.println();} } {FAIL}
void is not a primitive numeric typeTest Case: 15.17-mult-1Expected Result: FAIL
Regression Test:
tcltest::test 15.17-void-3 { void is not a primitive numeric type } { empty_class T1517void3 {int i = 2%System.out.println();} } {FAIL}
* is a multiplicative operatorTest Case: 15.17-mult-2Expected Result: PASS
Regression Test:
tcltest::test 15.17-mult-1 { * is a multiplicative operator } { constant_expression T1517mult1 {2*2 == 4} } {PASS}
* is a multiplicative operatorTest Case: 15.17-mult-3Expected Result: PASS
Regression Test:
tcltest::test 15.17-mult-2 { * is a multiplicative operator } { constant_expression T1517mult2 {2L*2L == 4L} } {PASS}
* is a multiplicative operatorTest Case: 15.17-mult-4Expected Result: PASS
Regression Test:
tcltest::test 15.17-mult-3 { * is a multiplicative operator } { constant_expression T1517mult3 {2.0F * 2.0F == 4.0F} } {PASS}
* is a multiplicative operatorTest Case: 15.17-div-1Expected Result: PASS
Regression Test:
tcltest::test 15.17-mult-4 { * is a multiplicative operator } { constant_expression T1517mult4 {2.0D * 2.0D == 4.0D} } {PASS}
/ is a multiplicative operatorTest Case: 15.17-div-2Expected Result: PASS
Regression Test:
tcltest::test 15.17-div-1 { / is a multiplicative operator } { constant_expression T1517div1 {2/2 == 1} } {PASS}
/ is a multiplicative operatorTest Case: 15.17-div-3Expected Result: PASS
Regression Test:
tcltest::test 15.17-div-2 { / is a multiplicative operator } { constant_expression T1517div2 {2L/2L == 1L} } {PASS}
/ is a multiplicative operatorTest Case: 15.17-div-4Expected Result: PASS
Regression Test:
tcltest::test 15.17-div-3 { / is a multiplicative operator } { constant_expression T1517div3 {2.0F / 2.0F == 1.0F} } {PASS}
/ is a multiplicative operatorTest Case: 15.17-mod-1Expected Result: PASS
Regression Test:
tcltest::test 15.17-div-4 { / is a multiplicative operator } { constant_expression T1517div4 {2.0D / 2.0D == 1.0D} } {PASS}
% is a multiplicative operatorTest Case: 15.17-mod-2Expected Result: PASS
Regression Test:
tcltest::test 15.17-mod-1 { % is a multiplicative operator } { constant_expression T1517mod1 {2%2 == 0} } {PASS}
% is a multiplicative operatorTest Case: 15.17-mod-3Expected Result: PASS
Regression Test:
tcltest::test 15.17-mod-2 { % is a multiplicative operator } { constant_expression T1517mod2 {2L%2L == 0L} } {PASS}
% is a multiplicative operatorTest Case: 15.17-mod-4Expected Result: PASS
Regression Test:
tcltest::test 15.17-mod-3 { % is a multiplicative operator } { constant_expression T1517mod3 {2.0F % 2.0F == 0.0F} } {PASS}
% is a multiplicative operatorTest Case: 15.17-type-1Expected Result: PASS
Regression Test:
tcltest::test 15.17-mod-4 { % is a multiplicative operator } { constant_expression T1517mod4 {2.0D % 2.0D == 0.0D} } {PASS}
The type of a multiplicative expression is the promoted type of its operands.Test Case: 15.17-type-2Expected Result: FAIL
Regression Test:
tcltest::test 15.17-type-1 { The type of a multiplicative expression is the promoted type of its operands. } { is_assignable_to T1517type1 int {1 * 2L} } {FAIL}
The type of a multiplicative expression is the promoted type of its operands.Test Case: 15.17-type-3Expected Result: PASS
Regression Test:
tcltest::test 15.17-type-2 { The type of a multiplicative expression is the promoted type of its operands. } { is_assignable_to T1517type2 long {1 * 2L} } {PASS}
The type of a multiplicative expression is the promoted type of its operands.Test Case: 15.17-type-4Expected Result: FAIL
Regression Test:
tcltest::test 15.17-type-3 { The type of a multiplicative expression is the promoted type of its operands. } { is_assignable_to T1517type3 int {1 / 2L} } {FAIL}
The type of a multiplicative expression is the promoted type of its operands.Test Case: 15.17-type-5Expected Result: PASS
Regression Test:
tcltest::test 15.17-type-4 { The type of a multiplicative expression is the promoted type of its operands. } { is_assignable_to T1517type4 long {1 / 2L} } {PASS}
The type of a multiplicative expression is the promoted type of its operands.Test Case: 15.17-type-6Expected Result: FAIL
Regression Test:
tcltest::test 15.17-type-5 { The type of a multiplicative expression is the promoted type of its operands. } { is_assignable_to T1517type5 int {1 % 2L} } {FAIL}
The type of a multiplicative expression is the promoted type of its operands.Test Case: 15.17-type-7Expected Result: PASS
Regression Test:
tcltest::test 15.17-type-6 { The type of a multiplicative expression is the promoted type of its operands. } { is_assignable_to T1517type6 long {1 % 2L} } {PASS}
The type of a multiplicative expression is the promoted type of its operands.Test Case: 15.17-type-8Expected Result: FAIL
Regression Test:
tcltest::test 15.17-type-7 { The type of a multiplicative expression is the promoted type of its operands. } { is_assignable_to T1517type7 float {1f * 2D} } {FAIL}
The type of a multiplicative expression is the promoted type of its operands.Test Case: 15.17-type-9Expected Result: PASS
Regression Test:
tcltest::test 15.17-type-8 { The type of a multiplicative expression is the promoted type of its operands. } { is_assignable_to T1517type8 double {1f * 2D} } {PASS}
The type of a multiplicative expression is the promoted type of its operands.Test Case: 15.17-type-10Expected Result: FAIL
Regression Test:
tcltest::test 15.17-type-9 { The type of a multiplicative expression is the promoted type of its operands. } { is_assignable_to T1517type9 float {1f / 2D} } {FAIL}
The type of a multiplicative expression is the promoted type of its operands.Test Case: 15.17-type-11Expected Result: PASS
Regression Test:
tcltest::test 15.17-type-10 { The type of a multiplicative expression is the promoted type of its operands. } { is_assignable_to T1517type10 double {1f / 2D} } {PASS}
The type of a multiplicative expression is the promoted type of its operands.Test Case: 15.17-type-12Expected Result: FAIL
Regression Test:
tcltest::test 15.17-type-11 { The type of a multiplicative expression is the promoted type of its operands. } { is_assignable_to T1517type11 float {1f % 2D} } {FAIL}
The type of a multiplicative expression is the promoted type of its operands.Test Case: 15.17-type-13Expected Result: PASS
Regression Test:
tcltest::test 15.17-type-12 { The type of a multiplicative expression is the promoted type of its operands. } { is_assignable_to T1517type12 double {1f % 2D} } {PASS}
The type of a multiplicative expression is the promoted type of its operands.Test Case: 15.17-type-14Expected Result: FAIL
Regression Test:
tcltest::test 15.17-type-13 { The type of a multiplicative expression is the promoted type of its operands. } { is_assignable_to T1517type13 int {1 * 2D} } {FAIL}
The type of a multiplicative expression is the promoted type of its operands.Test Case: 15.17-type-15Expected Result: PASS
Regression Test:
tcltest::test 15.17-type-14 { The type of a multiplicative expression is the promoted type of its operands. } { is_assignable_to T1517type14 double {1 * 2D} } {PASS}
The type of a multiplicative expression is the promoted type of its operands.Test Case: 15.17-type-16Expected Result: FAIL
Regression Test:
tcltest::test 15.17-type-15 { The type of a multiplicative expression is the promoted type of its operands. } { is_assignable_to T1517type15 int {1 / 2D} } {FAIL}
The type of a multiplicative expression is the promoted type of its operands.Test Case: 15.17-type-17Expected Result: PASS
Regression Test:
tcltest::test 15.17-type-16 { The type of a multiplicative expression is the promoted type of its operands. } { is_assignable_to T1517type16 double {1 / 2D} } {PASS}
The type of a multiplicative expression is the promoted type of its operands.Test Case: 15.17-type-18Expected Result: FAIL
Regression Test:
tcltest::test 15.17-type-17 { The type of a multiplicative expression is the promoted type of its operands. } { is_assignable_to T1517type17 int {1 % 2D} } {FAIL}
The type of a multiplicative expression is the promoted type of its operands.Expected Result: PASS
Regression Test:
tcltest::test 15.17-type-18 { The type of a multiplicative expression is the promoted type of its operands. } { is_assignable_to T1517type18 double {1 % 2D} } {PASS}
tests/jls/expressions/multiplicative-operators/multiplication-operator
side-effect-free multiplication is commutativeTest Case: 15.17.1-commute-2Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-commute-1 { side-effect-free multiplication is commutative } { constant_expression T15171commute1 {1 * 2 == 2 * 1} } {PASS}
side-effect-free multiplication is commutativeTest Case: 15.17.1-commute-3Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-commute-2 { side-effect-free multiplication is commutative } { constant_expression T15171commute2 {1L * 2L == 2L * 1L} } {PASS}
side-effect-free multiplication is commutativeTest Case: 15.17.1-commute-4Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-commute-3 { side-effect-free multiplication is commutative } { constant_expression T15171commute3 {1f * 2f == 2f * 1f} } {PASS}
side-effect-free multiplication is commutativeTest Case: 15.17.1-assoc-1Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-commute-4 { side-effect-free multiplication is commutative } { constant_expression T15171commute4 {1d * 2d == 2d * 1d} } {PASS}
integer multiplication is associative when all arguments are of the same typeTest Case: 15.17.1-assoc-2Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-assoc-1 { integer multiplication is associative when all arguments are of the same type } { constant_expression T15171assoc1 {(1 * 2) * 3 == 1 * (2 * 3)} } {PASS}
integer multiplication is not associative when arguments are of different typesTest Case: 15.17.1-assoc-3Expected Result: FAIL
Regression Test:
tcltest::test 15.17.1-assoc-2 { integer multiplication is not associative when arguments are of different types } { constant_expression T15171assoc2 {(1L * 0x70000000) * 20 == 1L * (0x70000000 * 20)} } {FAIL}
floating-point multiplication is not associativeTest Case: 15.17.1-assoc-4Expected Result: FAIL
Regression Test:
tcltest::test 15.17.1-assoc-3 { floating-point multiplication is not associative } { constant_expression T15171assoc3 {(1e308 * 100.0) * .01 == 1e308 * (100.0 * .01)} } {FAIL}
multiplication is left-associativeTest Case: 15.17.1-float-1Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-assoc-4 { multiplication is left-associative } { constant_expression T15171assoc4 {1e308 * 100.0 * .01 == (1e308 * 100.0) * .01} } {PASS}
NaN * NaN is NaNTest Case: 15.17.1-float-2Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-float-1 { NaN * NaN is NaN } { constant_expression T15171f1 {Float.NaN * Float.NaN != Float.NaN * Float.NaN} } {PASS}
NaN * anything is NaNTest Case: 15.17.1-float-3Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-float-2 { NaN * anything is NaN } { constant_expression T15171f2 {Float.NaN * 1f != Float.NaN * 1f} } {PASS}
the result is positive in floating-point multiplication if both operands have the same signTest Case: 15.17.1-float-4Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-float-3 { the result is positive in floating-point multiplication if both operands have the same sign } { constant_expression T15171f3 {-1f * -2f > 0f} {1f * 2f > 0f} } {PASS}
the result is negative in floating-point multiplication if the operands have opposite signTest Case: 15.17.1-float-5Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-float-4 { the result is negative in floating-point multiplication if the operands have opposite sign } { constant_expression T15171f4 {-1f * 2f < 0f} {1f * -2f < 0f} } {PASS}
Infinity * 0 is NaNTest Case: 15.17.1-float-6Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-float-5 { Infinity * 0 is NaN } { constant_expression T15171f5 {Float.POSITIVE_INFINITY * 0f != Float.POSITIVE_INFINITY * 0f} } {PASS}
Infinity * finite == Infinity of correct signTest Case: 15.17.1-float-7Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-float-6 { Infinity * finite == Infinity of correct sign } { constant_expression T15171f6 {Float.NEGATIVE_INFINITY * -1f == Float.POSITIVE_INFINITY} {Float.POSITIVE_INFINITY * -1f == Float.NEGATIVE_INFINITY} } {PASS}
Infinity * Infinity == Infinity of correct sign (Specified in JVMS errata)Test Case: 15.17.1-float-8Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-float-7 { Infinity * Infinity == Infinity of correct sign (Specified in JVMS errata) } { constant_expression T15171f7 {Float.NEGATIVE_INFINITY * Float.NEGATIVE_INFINITY == Float.POSITIVE_INFINITY} {Float.POSITIVE_INFINITY * Float.POSITIVE_INFINITY == Float.POSITIVE_INFINITY} } {PASS}
Infinity * Infinity == Infinity of correct sign (Specified in JVMS errata)Test Case: 15.17.1-float-9Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-float-8 { Infinity * Infinity == Infinity of correct sign (Specified in JVMS errata) } { constant_expression T15171f8 {Float.NEGATIVE_INFINITY * Float.POSITIVE_INFINITY == Float.NEGATIVE_INFINITY} {Float.POSITIVE_INFINITY * Float.NEGATIVE_INFINITY == Float.NEGATIVE_INFINITY} } {PASS}
Floating-point * produces Infinity for overflowTest Case: 15.17.1-float-10Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-float-9 { Floating-point * produces Infinity for overflow } { constant_expression T15171f9 {1.0e30f * 1.0e30f == Float.POSITIVE_INFINITY} {1.0e30f * -1.0e30f == Float.NEGATIVE_INFINITY} } {PASS}
Floating-point * supports gradual underflowTest Case: 15.17.1-float-11Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-float-10 { Floating-point * supports gradual underflow } { constant_expression T15171f10 {1e-22f * 1e-22f == 1e-44f} {1e-22f * -1e-22f == -1e-44f} } {PASS}
Floating-point * produces 0 for underflow (check 1/0 to determine sign)Test Case: 15.17.1-float-12Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-float-11 { Floating-point * produces 0 for underflow (check 1/0 to determine sign) } { constant_expression T15171f11 {1e-30f * 1e-30f == 0} {1/(1e-30f * 1e-30f) == Float.POSITIVE_INFINITY} {1e-30f * -1e-30f == 0} {1/(1e-30f * -1e-30f) == Float.NEGATIVE_INFINITY} } {PASS}
Floating-point * works even with denormsTest Case: 15.17.1-float-13Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-float-12 { Floating-point * works even with denorms } { constant_expression T15171f12 {1e30f * 1e-40f == 9.999946e-11f} {1e30f * -1e-40f == -9.999946e-11f} {1e-40f * -1e30f == -9.999946e-11f} {-1e-40f * -1e30f == 9.999946e-11f} } {PASS}
Floating-point * follows round-to-nearest rulesTest Case: 15.17.1-float-14Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-float-13 { Floating-point * follows round-to-nearest rules } { constant_expression T15171f13 {0x800001 * 3f == 0x1800004} {0x800001 * 5f == 0x2800004} {0x800003 * 5f == 0x2800010} {0x800002 * 5f == 0x2800008} } {PASS}
Floating-point * follows round-to-nearest, even with denormsTest Case: 15.17.1-double-1Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-float-14 { Floating-point * follows round-to-nearest, even with denorms } { constant_expression T15171f14 {2.1302879E-19f * 5.4316195E-20f == 1.1570912E-38f} } {PASS}
NaN * NaN is NaNTest Case: 15.17.1-double-2Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-double-1 { NaN * NaN is NaN } { constant_expression T15171d1 {Double.NaN * Double.NaN != Double.NaN * Double.NaN} } {PASS}
NaN * anything is NaNTest Case: 15.17.1-double-3Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-double-2 { NaN * anything is NaN } { constant_expression T15171d2 {Double.NaN * 1d != Double.NaN * 1d} } {PASS}
the result is positive in floating-point multiplication if both operands have the same signTest Case: 15.17.1-double-4Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-double-3 { the result is positive in floating-point multiplication if both operands have the same sign } { constant_expression T15171d3 {-1d * -2d > 0d} {1d * 2d > 0d} } {PASS}
the result is negative in floating-point multiplication if the operands have opposite signTest Case: 15.17.1-double-5Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-double-4 { the result is negative in floating-point multiplication if the operands have opposite sign } { constant_expression T15171d4 {-1.0 * 2.0 < 0.0} {1.0 * -2.0 < 0.0} } {PASS}
Infinity * 0 is NaNTest Case: 15.17.1-double-6Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-double-5 { Infinity * 0 is NaN } { constant_expression T15171d5 {Double.POSITIVE_INFINITY * 0d != Double.POSITIVE_INFINITY * 0d} } {PASS}
Infinity * finite == Infinity of correct signTest Case: 15.17.1-double-7Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-double-6 { Infinity * finite == Infinity of correct sign } { constant_expression T15171d6 {Double.NEGATIVE_INFINITY * -1d == Double.POSITIVE_INFINITY} {Double.POSITIVE_INFINITY * -1d == Double.NEGATIVE_INFINITY} } {PASS}
Infinity * Infinity == Infinity of correct sign (Specified in JVMS errata)Test Case: 15.17.1-double-8Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-double-7 { Infinity * Infinity == Infinity of correct sign (Specified in JVMS errata) } { constant_expression T15171d7 {Double.NEGATIVE_INFINITY * Double.NEGATIVE_INFINITY == Double.POSITIVE_INFINITY} {Double.POSITIVE_INFINITY * Double.POSITIVE_INFINITY == Double.POSITIVE_INFINITY} } {PASS}
Infinity * Infinity == Infinity of correct sign (Specified in JVMS errata)Test Case: 15.17.1-double-9Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-double-8 { Infinity * Infinity == Infinity of correct sign (Specified in JVMS errata) } { constant_expression T15171d8 {Double.NEGATIVE_INFINITY * Double.POSITIVE_INFINITY == Double.NEGATIVE_INFINITY} {Double.POSITIVE_INFINITY * Double.NEGATIVE_INFINITY == Double.NEGATIVE_INFINITY} } {PASS}
Floating-point * produces Infinity for overflowTest Case: 15.17.1-double-10Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-double-9 { Floating-point * produces Infinity for overflow } { constant_expression T15171d9 {1.0e160 * 1.0e160 == Double.POSITIVE_INFINITY} {1.0e160 * -1.0e160 == Double.NEGATIVE_INFINITY} } {PASS}
Floating-point * supports gradual underflowTest Case: 15.17.1-double-11Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-double-10 { Floating-point * supports gradual underflow } { constant_expression T15171d10 {1e-160 * 1e-160 == 1e-320} {1e-160 * -1e-160 == -1e-320} } {PASS}
Floating-point * produces 0 for underflow (check 1/0 to determine sign)Test Case: 15.17.1-double-12Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-double-11 { Floating-point * produces 0 for underflow (check 1/0 to determine sign) } { constant_expression T15171d11 {1e-170 * 1e-170 == 0} {1/(1e-170 * 1e-170) == Double.POSITIVE_INFINITY} {1e-170 * -1e-170 == 0} {1/(1e-170 * -1e-170) == Double.NEGATIVE_INFINITY} } {PASS}
Floating-point * works even with denormsTest Case: 15.17.1-double-13Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-double-12 { Floating-point * works even with denorms } { constant_expression T15171d12 {1e300 * 1e-320 == 9.99988867182683E-21} {1e300 * -1e-320 == -9.99988867182683E-21} {1e-320 * -1e300 == -9.99988867182683E-21} {-1e-320 * -1e300 == 9.99988867182683E-21} } {PASS}
Floating-point * follows round-to-nearest rulesTest Case: 15.17.1-double-14Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-double-13 { Floating-point * follows round-to-nearest rules } { constant_expression T15171d13 {0x10000000000001L * 3d == 0x30000000000004L} {0x10000000000001L * 5d == 0x50000000000004L} {0x10000000000003L * 5d == 0x50000000000010L} {0x10000000000002L * 5d == 0x50000000000008L} } {PASS}
Floating-point * follows round-to-nearest, even with denorms, known bug in Sun's javacTest Case: 15.17.1-int-1Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-double-14 { Floating-point * follows round-to-nearest, even with denorms, known bug in Sun's javac } { constant_expression T15171d14 {8.578459548793971E-162 * 2.512418001798401E-147 == 2.155267619808936E-308} {6.946121092140867E-162 * 2.669444126910801E-147 == 1.8542282154226677E-308} } {PASS}
overflow in integer multiplication, simply selects low-order bits, possibly changing signTest Case: 15.17.1-int-2Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-int-1 { overflow in integer multiplication, simply selects low-order bits, possibly changing sign } { constant_expression T15171i1 {1234567890 * 10 == -539222988} } {PASS}
constant expression with int multiplicationTest Case: 15.17.1-long-1Expected Result: PASS
Regression Test:
tcltest::test 15.17.1-int-2 { constant expression with int multiplication } { constant_expression T15171i2 {-12300000 == 100000 * -123} {-50000000 == 500 * -100000} } {PASS}
constant expression with long multiplicationExpected Result: PASS
Regression Test:
tcltest::test 15.17.1-long-1 { constant expression with long multiplication } { constant_expression T15171l1 {-12192592592745L == 987654321L * -12345} {-12192592592745L == 12345 * -987654321L} {12192592592745L == 987654321L * 12345} {12192592592745L == -987654321L * -12345} } {PASS}
tests/jls/expressions/multiplicative-operators/division-operator
division is left-associativeTest Case: 15.17.2-assoc-2Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-assoc-1 { division is left-associative } { constant_expression T15172assoc1 {10 / 3 / 2 == 1} {10 / (3 / 2) == 10} } {PASS}
division is left-associativeTest Case: 15.17.2-float-1Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-assoc-2 { division is left-associative } { constant_expression T15172assoc2 {10.0 / 3.0 / 2.0 == 1.6666666666666667} {10.0 / (3.0 / 2.0) == 6.666666666666667} } {PASS}
NaN / NaN is NaNTest Case: 15.17.2-float-2Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-float-1 { NaN / NaN is NaN } { constant_expression T15172f1 {Float.NaN / Float.NaN != Float.NaN / Float.NaN} } {PASS}
NaN / anything is NaNTest Case: 15.17.2-float-3Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-float-2 { NaN / anything is NaN } { constant_expression T15172f2 {Float.NaN / 1f != Float.NaN / 1f} {1f / Float.NaN != 1f / Float.NaN} } {PASS}
the result is positive in floating-point division if both operands have the same signTest Case: 15.17.2-float-4Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-float-3 { the result is positive in floating-point division if both operands have the same sign } { constant_expression T15172f3 {-1f / -2f > 0f} {1f / 2f > 0f} } {PASS}
the result is negative in floating-point division if the operands have opposite signTest Case: 15.17.2-float-5Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-float-4 { the result is negative in floating-point division if the operands have opposite sign } { constant_expression T15172f4 {-1f / 2f < 0f} {1f / -2f < 0f} } {PASS}
0 / 0 is NaNTest Case: 15.17.2-float-6Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-float-5 { 0 / 0 is NaN } { constant_expression T15172f5 {0f / 0f != 0f / 0f} {-0f / 0f != -0f / 0f} } {PASS}
Infinity / finite == Infinity of correct signTest Case: 15.17.2-float-7Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-float-6 { Infinity / finite == Infinity of correct sign } { constant_expression T15172f6 {Float.NEGATIVE_INFINITY / -1f == Float.POSITIVE_INFINITY} {Float.POSITIVE_INFINITY / -1f == Float.NEGATIVE_INFINITY} } {PASS}
Infinity / Infinity is NaNTest Case: 15.17.2-float-8Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-float-7 { Infinity / Infinity is NaN } { constant_expression T15172f7 {Float.NEGATIVE_INFINITY / Float.NEGATIVE_INFINITY != Float.NEGATIVE_INFINITY / Float.NEGATIVE_INFINITY} {Float.POSITIVE_INFINITY / Float.NEGATIVE_INFINITY != Float.POSITIVE_INFINITY / Float.NEGATIVE_INFINITY} {Float.NEGATIVE_INFINITY / Float.POSITIVE_INFINITY != Float.NEGATIVE_INFINITY / Float.POSITIVE_INFINITY} {Float.POSITIVE_INFINITY / Float.POSITIVE_INFINITY != Float.POSITIVE_INFINITY / Float.POSITIVE_INFINITY} } {PASS}
Finite / Infinity == Signed zero (check 1/0 to determine sign)Test Case: 15.17.2-float-9Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-float-8 { Finite / Infinity == Signed zero (check 1/0 to determine sign) } { constant_expression T15172f8 {1f / Float.NEGATIVE_INFINITY == 0} {1/(1f / Float.NEGATIVE_INFINITY) == Float.NEGATIVE_INFINITY} {1f / Float.POSITIVE_INFINITY == 0} {1/(1f / Float.POSITIVE_INFINITY) == Float.POSITIVE_INFINITY} {-1f / Float.NEGATIVE_INFINITY == 0} {1/(-1f / Float.NEGATIVE_INFINITY) == Float.POSITIVE_INFINITY} {-1f / Float.POSITIVE_INFINITY == 0} {1/(-1f / Float.POSITIVE_INFINITY) == Float.NEGATIVE_INFINITY} } {PASS}
Finite / 0 == Signed infinityTest Case: 15.17.2-float-10Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-float-9 { Finite / 0 == Signed infinity } { constant_expression T15172f9 {1f / 0f == Float.POSITIVE_INFINITY} {-1f / 0f == Float.NEGATIVE_INFINITY} {1f / -0f == Float.NEGATIVE_INFINITY} {-1f / -0f == Float.POSITIVE_INFINITY} } {PASS}
0 / non-zero Finite == Signed zero (check 1/0 to determine sign)Test Case: 15.17.2-float-11Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-float-10 { 0 / non-zero Finite == Signed zero (check 1/0 to determine sign) } { constant_expression T15172f10 {0f / 1f == 0} {1/(0f / 1f) == Float.POSITIVE_INFINITY} {-0f / 1f == 0} {1/(-0f / 1f) == Float.NEGATIVE_INFINITY} {0f / -1f == 0} {1/(0f / -1f) == Float.NEGATIVE_INFINITY} {-0f / -1f == 0} {1/(-0f / -1f) == Float.POSITIVE_INFINITY} } {PASS}
Floating-point / produces Infinity for overflowTest Case: 15.17.2-float-12Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-float-11 { Floating-point / produces Infinity for overflow } { constant_expression T15172f11 {1.0e30f / 1.0e-30f == Float.POSITIVE_INFINITY} {1.0e30f / -1.0e-30f == Float.NEGATIVE_INFINITY} } {PASS}
Floating-point / supports gradual underflowTest Case: 15.17.2-float-13Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-float-12 { Floating-point / supports gradual underflow } { constant_expression T15172f12 {1e-22f / 1e22f == 1e-44f} {1e-22f / -1e22f == -1e-44f} } {PASS}
Floating-point / produces 0 for underflow (check 1/0 to determine sign)Test Case: 15.17.2-float-14Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-float-13 { Floating-point / produces 0 for underflow (check 1/0 to determine sign) } { constant_expression T15172f13 {1e-30f / 1e30f == 0} {1/(1e-30f / 1e30f) == Float.POSITIVE_INFINITY} {1e-30f / -1e30f == 0} {1/(1e-30f / -1e30f) == Float.NEGATIVE_INFINITY} } {PASS}
Floating-point / works even with denormsTest Case: 15.17.2-float-15Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-float-14 { Floating-point / works even with denorms } { constant_expression T15172f14 {1e-10f / 1e-40f == 1.0000054E30f} {1e-10f / -1e-40f == -1.0000054E30f} {1e-40f / -1e-10f == -9.999946E-31f} {-1e-40f / -1e-10f == 9.999946E-31f} } {PASS}
Floating-point / follows round-to-nearest rulesTest Case: 15.17.2-double-1Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-float-15 { Floating-point / follows round-to-nearest rules } { constant_expression T15172f15 {0x1800004 / 3f == 0x800001} {0x1800008 / 3f == 0x800003} {7e-45f / 2f == 2.8e-45f} {9.8e-45f / 2f == 5.6e-45f} } {PASS}
NaN / NaN is NaNTest Case: 15.17.2-double-2Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-double-1 { NaN / NaN is NaN } { constant_expression T15172d1 {Double.NaN / Double.NaN != Double.NaN / Double.NaN} } {PASS}
NaN / anything is NaNTest Case: 15.17.2-double-3Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-double-2 { NaN / anything is NaN } { constant_expression T15172d2 {Double.NaN / 1d != Double.NaN / 1d} {1d / Double.NaN != 1d / Double.NaN} } {PASS}
the result is positive in floating-point division if both operands have the same signTest Case: 15.17.2-double-4Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-double-3 { the result is positive in floating-point division if both operands have the same sign } { constant_expression T15172d3 {-1d / -2d > 0d} {1d / 2d > 0d} } {PASS}
the result is negative in floating-point division if the operands have opposite signTest Case: 15.17.2-double-5Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-double-4 { the result is negative in floating-point division if the operands have opposite sign } { constant_expression T15172d4 {-1.0 / 2.0 < 0.0} {1.0 / -2.0 < 0.0} } {PASS}
0 / 0 is NaNTest Case: 15.17.2-double-6Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-double-5 { 0 / 0 is NaN } { constant_expression T15172d5 {0d / 0d != 0d / 0d} {-0d / 0d != -0d / 0d} } {PASS}
Infinity / finite == Infinity of correct signTest Case: 15.17.2-double-7Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-double-6 { Infinity / finite == Infinity of correct sign } { constant_expression T15172d6 {Double.NEGATIVE_INFINITY / -1d == Double.POSITIVE_INFINITY} {Double.POSITIVE_INFINITY / -1d == Double.NEGATIVE_INFINITY} } {PASS}
Infinity / Infinity is NaNTest Case: 15.17.2-double-8Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-double-7 { Infinity / Infinity is NaN } { constant_expression T15172d7 {Double.NEGATIVE_INFINITY / Double.NEGATIVE_INFINITY != Double.NEGATIVE_INFINITY / Double.NEGATIVE_INFINITY} {Double.POSITIVE_INFINITY / Double.NEGATIVE_INFINITY != Double.POSITIVE_INFINITY / Double.NEGATIVE_INFINITY} {Double.NEGATIVE_INFINITY / Double.POSITIVE_INFINITY != Double.NEGATIVE_INFINITY / Double.POSITIVE_INFINITY} {Double.POSITIVE_INFINITY / Double.POSITIVE_INFINITY != Double.POSITIVE_INFINITY / Double.POSITIVE_INFINITY} } {PASS}
Finite / Infinity == Signed zero (check 1/0 to determine sign)Test Case: 15.17.2-double-9Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-double-8 { Finite / Infinity == Signed zero (check 1/0 to determine sign) } { constant_expression T15172d8 {1d / Double.NEGATIVE_INFINITY == 0} {1/(1d / Double.NEGATIVE_INFINITY) == Double.NEGATIVE_INFINITY} {1d / Double.POSITIVE_INFINITY == 0} {1/(1d / Double.POSITIVE_INFINITY) == Double.POSITIVE_INFINITY} {-1d / Double.NEGATIVE_INFINITY == 0} {1/(-1d / Double.NEGATIVE_INFINITY) == Double.POSITIVE_INFINITY} {-1d / Double.POSITIVE_INFINITY == 0} {1/(-1d / Double.POSITIVE_INFINITY) == Double.NEGATIVE_INFINITY} } {PASS}
Finite / 0 == Signed infinityTest Case: 15.17.2-double-10Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-double-9 { Finite / 0 == Signed infinity } { constant_expression T15172d9 {1d / 0d == Double.POSITIVE_INFINITY} {-1d / 0d == Double.NEGATIVE_INFINITY} {1d / -0d == Double.NEGATIVE_INFINITY} {-1d / -0d == Double.POSITIVE_INFINITY} } {PASS}
0 / non-zero Finite == Signed zero (check 1/0 to determine sign)Test Case: 15.17.2-double-11Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-double-10 { 0 / non-zero Finite == Signed zero (check 1/0 to determine sign) } { constant_expression T15172d10 {0d / 1d == 0} {1/(0d / 1d) == Double.POSITIVE_INFINITY} {-0d / 1d == 0} {1/(-0d / 1d) == Double.NEGATIVE_INFINITY} {0d / -1d == 0} {1/(0d / -1d) == Double.NEGATIVE_INFINITY} {-0d / -1d == 0} {1/(-0d / -1d) == Double.POSITIVE_INFINITY} } {PASS}
Floating-point / produces Infinity for overflowTest Case: 15.17.2-double-12Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-double-11 { Floating-point / produces Infinity for overflow } { constant_expression T15172d11 {1.0e160 / 1.0e-160 == Double.POSITIVE_INFINITY} {1.0e160 / -1.0e-160 == Double.NEGATIVE_INFINITY} } {PASS}
Floating-point / supports gradual underflowTest Case: 15.17.2-double-13Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-double-12 { Floating-point / supports gradual underflow } { constant_expression T15172d12 {1e-160 / 1e160 == 1e-320} {1e-160 / -1e160 == -1e-320} } {PASS}
Floating-point / produces 0 for underflow (check 1/0 to determine sign)Test Case: 15.17.2-double-14Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-double-13 { Floating-point / produces 0 for underflow (check 1/0 to determine sign) } { constant_expression T15172d13 {1e-170 / 1e170 == 0} {1/(1e-170 / 1e170) == Double.POSITIVE_INFINITY} {1e-170 / -1e170 == 0} {1/(1e-170 / -1e170) == Double.NEGATIVE_INFINITY} } {PASS}
Floating-point / works even with denormsTest Case: 15.17.2-double-15Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-double-14 { Floating-point / works even with denorms } { constant_expression T15172d14 {1e-20 / 1e-320 == 1.0000111329412579e300} {1e-20 / -1e-320 == -1.0000111329412579e300} {1e-320 / -1e-20 == -9.999888671826831E-301} {-1e-320 / -1e-20 == 9.999888671826831E-301} } {PASS}
Floating-point / follows round-to-nearest rulesTest Case: 15.17.2-int-1Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-double-15 { Floating-point / follows round-to-nearest rules } { constant_expression T15172d15 {0x30000000000004L / 3d == 0x10000000000001L} {0x30000000000008L / 3d == 0x10000000000003L} {2.5e-323 / 2d == 1e-323} {3.5e-323 / 2d == 2e-323} } {PASS}
integer division rounds to 0Test Case: 15.17.2-int-2Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-int-1 { integer division rounds to 0 } { constant_expression T15172i1 {5 / 3 == 1} {5 / -3 == -1} {-5 / 3 == -1} {-5 / -3 == 1} } {PASS}
MIN_INT / -1 overflowsTest Case: 15.17.2-int-3Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-int-2 { MIN_INT / -1 overflows } { constant_expression T15172i2 {0x80000000 / -1 == 0x80000000} } {PASS}
Compile-time error to divide by constant 0Test Case: 15.17.2-long-1Expected Result: FAIL
Regression Test:
tcltest::test 15.17.2-int-3 { Compile-time error to divide by constant 0 } { empty_class T15172i3 {int i = 1 / 0;} } {FAIL}
integer division rounds to 0Test Case: 15.17.2-long-2Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-long-1 { integer division rounds to 0 } { constant_expression T15172l1 {5L / 3L == 1L} {5L / -3L == -1L} {-5L / 3L == -1L} {-5L / -3L == 1L} } {PASS}
MIN_LONG / -1 overflowsTest Case: 15.17.2-long-3Expected Result: PASS
Regression Test:
tcltest::test 15.17.2-long-2 { MIN_LONG / -1 overflows } { constant_expression T15172l2 {0x8000000000000000L / -1L == 0x8000000000000000L} } {PASS}
Compile-time error to divide by constant 0Expected Result: FAIL
Regression Test:
tcltest::test 15.17.2-long-3 { Compile-time error to divide by constant 0 } { empty_class T15172l3 {long l = 1L / 0L;} } {FAIL}
tests/jls/expressions/multiplicative-operators/remainder-operator
remainder is left-associativeTest Case: 15.17.3-assoc-2Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-assoc-1 { remainder is left-associative } { constant_expression T15173assoc1 {10 % 4 % 3 == 2} {10 % (4 % 3) == 0} } {PASS}
remainder is left-associativeTest Case: 15.17.3-float-1Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-assoc-2 { remainder is left-associative } { constant_expression T15173assoc2 {10.0 % 4.0 % 3.0 == 2.0} {10.0 % (4.0 % 3.0) == 0.0} } {PASS}
NaN % NaN is NaNTest Case: 15.17.3-float-2Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-float-1 { NaN % NaN is NaN } { constant_expression T15173f1 {Float.NaN % Float.NaN != Float.NaN % Float.NaN} } {PASS}
NaN % anything is NaNTest Case: 15.17.3-float-3Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-float-2 { NaN % anything is NaN } { constant_expression T15173f2 {Float.NaN % 1f != Float.NaN % 1f} {1f % Float.NaN != 1f % Float.NaN} } {PASS}
the result is positive in floating-point remainder if the dividend is positiveTest Case: 15.17.3-float-4Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-float-3 { the result is positive in floating-point remainder if the dividend is positive } { constant_expression T15173f3 {3f % -2f > 0f} {3f % 2f > 0f} } {PASS}
the result is negative in floating-point remainder if the dividend is negativeTest Case: 15.17.3-float-5Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-float-4 { the result is negative in floating-point remainder if the dividend is negative } { constant_expression T15173f4 {-3f % 2f < 0f} {-3f % -2f < 0f} } {PASS}
0 % 0 is NaNTest Case: 15.17.3-float-6Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-float-5 { 0 % 0 is NaN } { constant_expression T15173f5 {0f % 0f != 0f % 0f} {-0f % 0f != -0f % 0f} } {PASS}
Infinity % finite is NaNTest Case: 15.17.3-float-7Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-float-6 { Infinity % finite is NaN } { constant_expression T15173f6 {Float.NEGATIVE_INFINITY % -1f != Float.NEGATIVE_INFINITY % -1f} {Float.POSITIVE_INFINITY % -1f != Float.POSITIVE_INFINITY % -1f} } {PASS}
Infinity % Infinity is NaNTest Case: 15.17.3-float-8Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-float-7 { Infinity % Infinity is NaN } { constant_expression T15173f7 {Float.NEGATIVE_INFINITY % Float.NEGATIVE_INFINITY != Float.NEGATIVE_INFINITY % Float.NEGATIVE_INFINITY} {Float.POSITIVE_INFINITY % Float.NEGATIVE_INFINITY != Float.POSITIVE_INFINITY % Float.NEGATIVE_INFINITY} {Float.NEGATIVE_INFINITY % Float.POSITIVE_INFINITY != Float.NEGATIVE_INFINITY % Float.POSITIVE_INFINITY} {Float.POSITIVE_INFINITY % Float.POSITIVE_INFINITY != Float.POSITIVE_INFINITY % Float.POSITIVE_INFINITY} } {PASS}
Finite % Infinity == dividendTest Case: 15.17.3-float-9Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-float-8 { Finite % Infinity == dividend } { constant_expression T15173f8 {1f % Float.NEGATIVE_INFINITY == 1f} {1f % Float.POSITIVE_INFINITY == 1f} {-1f % Float.NEGATIVE_INFINITY == -1f} {-1f % Float.POSITIVE_INFINITY == -1f} } {PASS}
Finite % 0 is NaNTest Case: 15.17.3-float-10Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-float-9 { Finite % 0 is NaN } { constant_expression T15173f9 {1f % 0f != 1f % 0f} {-1f % 0f != -1f % 0f} {1f % -0f != 1f % -0f} {-1f % -0f != -1f % -0f} } {PASS}
0 % non-zero Finite == Dividend (check 1/0 to determine sign)Test Case: 15.17.3-float-11Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-float-10 { 0 % non-zero Finite == Dividend (check 1/0 to determine sign) } { constant_expression T15173f10 {0f % 1f == 0} {1/(0f % 1f) == Float.POSITIVE_INFINITY} {-0f % 1f == 0} {1/(-0f % 1f) == Float.NEGATIVE_INFINITY} {0f % -1f == 0} {1/(0f % -1f) == Float.POSITIVE_INFINITY} {-0f % -1f == 0} {1/(-0f % -1f) == Float.NEGATIVE_INFINITY} } {PASS}
0 % Infinity == Dividend (check 1/0 to determine sign)Test Case: 15.17.3-float-12Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-float-11 { 0 % Infinity == Dividend (check 1/0 to determine sign) } { constant_expression T15173f11 {0f % Float.POSITIVE_INFINITY == 0} {1/(0f % Float.POSITIVE_INFINITY) == Float.POSITIVE_INFINITY} {-0f % Float.POSITIVE_INFINITY == 0} {1/(-0f % Float.POSITIVE_INFINITY) == Float.NEGATIVE_INFINITY} {0f % Float.NEGATIVE_INFINITY == 0} {1/(0f % Float.NEGATIVE_INFINITY) == Float.POSITIVE_INFINITY} {-0f % Float.NEGATIVE_INFINITY == 0} {1/(-0f % Float.NEGATIVE_INFINITY) == Float.NEGATIVE_INFINITY} } {PASS}
Floating-point % cannot overflowTest Case: 15.17.3-float-13Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-float-12 { Floating-point % cannot overflow } { constant_expression T15173f12 {1e30f % 1e-30f == 8.166816e-31f} {-1e30f % -1e-30f == -8.166816e-31f} } {PASS}
Floating-point % works even with denormsTest Case: 15.17.3-float-14Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-float-13 { Floating-point % works even with denorms } { constant_expression T15173f13 {1e30f % 1e-40f == 7.121e-42f} {1e30f % -1e-40f == 7.121e-42f} {-1e-40f % 1e30f == -1e-40f} {-1e-40f % -1e30f == -1e-40f} } {PASS}
Example casesTest Case: 15.17.3-double-1Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-float-14 { Example cases } { constant_expression T15173f14 {5.0f % 3.0f == 2.0f} {5.0f % -3.0f == 2.0f} {-5.0f % 3.0f == -2.0f} {-5.0f % -3.0f == -2.0f} } {PASS}
NaN % NaN is NaNTest Case: 15.17.3-double-2Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-double-1 { NaN % NaN is NaN } { constant_expression T15173d1 {Double.NaN % Double.NaN != Double.NaN % Double.NaN} } {PASS}
NaN % anything is NaNTest Case: 15.17.3-double-3Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-double-2 { NaN % anything is NaN } { constant_expression T15173d2 {Double.NaN % 1d != Double.NaN % 1d} {1d % Double.NaN != 1d % Double.NaN} } {PASS}
the result is positive in floating-point remainder if the dividend is positiveTest Case: 15.17.3-double-4Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-double-3 { the result is positive in floating-point remainder if the dividend is positive } { constant_expression T15173d3 {3d % -2d > 0d} {3d % 2d > 0d} } {PASS}
the result is negative in floating-point remainder if the dividend is negativeTest Case: 15.17.3-double-5Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-double-4 { the result is negative in floating-point remainder if the dividend is negative } { constant_expression T15173d4 {-3d % 2d < 0d} {-3d % -2d < 0d} } {PASS}
0 % 0 is NaNTest Case: 15.17.3-double-6Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-double-5 { 0 % 0 is NaN } { constant_expression T15173d5 {0d % 0d != 0d % 0d} {-0d % 0d != -0d % 0d} } {PASS}
Infinity % finite is NaNTest Case: 15.17.3-double-7Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-double-6 { Infinity % finite is NaN } { constant_expression T15173d6 {Double.NEGATIVE_INFINITY % -1d != Double.NEGATIVE_INFINITY % -1d} {Double.POSITIVE_INFINITY % -1d != Double.POSITIVE_INFINITY % -1d} } {PASS}
Infinity % Infinity is NaNTest Case: 15.17.3-double-8Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-double-7 { Infinity % Infinity is NaN } { constant_expression T15173d7 {Double.NEGATIVE_INFINITY % Double.NEGATIVE_INFINITY != Double.NEGATIVE_INFINITY % Double.NEGATIVE_INFINITY} {Double.POSITIVE_INFINITY % Double.NEGATIVE_INFINITY != Double.POSITIVE_INFINITY % Double.NEGATIVE_INFINITY} {Double.NEGATIVE_INFINITY % Double.POSITIVE_INFINITY != Double.NEGATIVE_INFINITY % Double.POSITIVE_INFINITY} {Double.POSITIVE_INFINITY % Double.POSITIVE_INFINITY != Double.POSITIVE_INFINITY % Double.POSITIVE_INFINITY} } {PASS}
Finite % Infinity == dividendTest Case: 15.17.3-double-9Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-double-8 { Finite % Infinity == dividend } { constant_expression T15173d8 {1d % Double.NEGATIVE_INFINITY == 1d} {1d % Double.POSITIVE_INFINITY == 1d} {-1d % Double.NEGATIVE_INFINITY == -1d} {-1d % Double.POSITIVE_INFINITY == -1d} } {PASS}
Finite % 0 is NaNTest Case: 15.17.3-double-10Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-double-9 { Finite % 0 is NaN } { constant_expression T15173d9 {1d % 0d != 1d % 0d} {-1d % 0d != -1d % 0d} {1d % -0d != 1d % -0d} {-1d % -0d != -1d % -0d} } {PASS}
0 % non-zero Finite == Dividend (check 1/0 to determine sign)Test Case: 15.17.3-double-11Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-double-10 { 0 % non-zero Finite == Dividend (check 1/0 to determine sign) } { constant_expression T15173d10 {0d % 1d == 0} {1/(0d % 1d) == Double.POSITIVE_INFINITY} {-0d % 1d == 0} {1/(-0d % 1d) == Double.NEGATIVE_INFINITY} {0d % -1d == 0} {1/(0d % -1d) == Double.POSITIVE_INFINITY} {-0d % -1d == 0} {1/(-0d % -1d) == Double.NEGATIVE_INFINITY} } {PASS}
0 % Infinity == Dividend (check 1/0 to determine sign)Test Case: 15.17.3-double-12Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-double-11 { 0 % Infinity == Dividend (check 1/0 to determine sign) } { constant_expression T15173d11 {0d % Double.POSITIVE_INFINITY == 0} {1/(0d % Double.POSITIVE_INFINITY) == Double.POSITIVE_INFINITY} {-0d % Double.POSITIVE_INFINITY == 0} {1/(-0d % Double.POSITIVE_INFINITY) == Double.NEGATIVE_INFINITY} {0d % Double.NEGATIVE_INFINITY == 0} {1/(0d % Double.NEGATIVE_INFINITY) == Double.POSITIVE_INFINITY} {-0d % Double.NEGATIVE_INFINITY == 0} {1/(-0d % Double.NEGATIVE_INFINITY) == Double.NEGATIVE_INFINITY} } {PASS}
Floating-point % cannot overflowTest Case: 15.17.3-double-13Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-double-12 { Floating-point % cannot overflow } { constant_expression T15173d12 {1e300 % 1e-300 == 4.891554850853602e-301} {-1e300 % -1e-300 == -4.891554850853602e-301} } {PASS}
Floating-point % works even with denormsTest Case: 15.17.3-double-14Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-double-13 { Floating-point % works even with denorms } { constant_expression T15173d13 {1e300 % 1e-320 == 3.16e-321} {1e300 % -1e-320 == 3.16e-321} {-1e-320 % 1e300 == -1e-320} {-1e-320 % -1e300 == -1e-320} } {PASS}
Example casesTest Case: 15.17.3-int-1Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-double-14 { Example cases } { constant_expression T15173d14 {5.0 % 3.0 == 2.0} {5.0 % -3.0 == 2.0} {-5.0 % 3.0 == -2.0} {-5.0 % -3.0 == -2.0} } {PASS}
Example casesTest Case: 15.17.3-int-2Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-int-1 { Example cases } { constant_expression T15173i1 {5 % 3 == 2} {5 % -3 == 2} {-5 % 3 == -2} {-5 % -3 == -2} } {PASS}
(a/b)*b+(a%b) == aTest Case: 15.17.3-int-3Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-int-2 { (a/b)*b+(a%b) == a } { constant_expression T15173i2 {(0x80000000 / -1) * -1 + (0x80000000 % -1) == 0x80000000} {(5 / 3) * 3 + (5 % 3) == 5} {(5 / -3) * -3 + (5 % -3) == 5} {(-5 / 3) * 3 + (-5 % 3) == -5} {(-5 / -3) * -3 + (-5 % -3) == -5} } {PASS}
Compile-time error to divide by constant 0Test Case: 15.17.3-int-4Expected Result: FAIL
Regression Test:
tcltest::test 15.17.3-int-3 { Compile-time error to divide by constant 0 } { empty_class T15173i3 {int i = 1 / 0;} } {FAIL}
MIN_INT % -1 == 0Test Case: 15.17.3-long-1Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-int-4 { MIN_INT % -1 == 0 } { constant_expression T15173i4 {0x80000000 % -1 == 0} } {PASS}
Example casesTest Case: 15.17.3-long-2Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-long-1 { Example cases } { constant_expression T15173l1 {5L % 3L == 2L} {5L % -3L == 2L} {-5L % 3L == -2L} {-5L % -3L == -2L} } {PASS}
(a/b)*b+(a%b) == aTest Case: 15.17.3-long-3Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-long-2 { (a/b)*b+(a%b) == a } { constant_expression T15173l2 {(0x8000000000000000L / -1L) * -1L + (0x8000000000000000L % -1L) == 0x8000000000000000L} {(5L / 3L) * 3L + (5L % 3L) == 5L} {(5L / -3L) * -3L + (5L % -3L) == 5L} {(-5L / 3L) * 3L + (-5L % 3L) == -5L} {(-5L / -3L) * -3L + (-5L % -3L) == -5L} } {PASS}
Compile-time error to divide by constant 0Test Case: 15.17.3-long-4Expected Result: FAIL
Regression Test:
tcltest::test 15.17.3-long-3 { Compile-time error to divide by constant 0 } { empty_class T15173l3 {long l = 1L % 0L;} } {FAIL}
MIN_LONG % -1 == 0Expected Result: PASS
Regression Test:
tcltest::test 15.17.3-long-4 { MIN_LONG % -1 == 0 } { constant_expression T15173l4 {0x8000000000000000L % -1L == 0L} } {PASS}
tests/jls/expressions/additive-operators
at least one argument of + should be String, or else both must be primitive numeric typeTest Case: 15.18-null-2Expected Result: FAIL
Regression Test:
tcltest::test 15.18-null-1 { at least one argument of + should be String, or else both must be primitive numeric type } { # Sun seems to have relaxed this so that null is used as type String is_assignable_to T1518n1 String {null + null} } {FAIL}
both arguments to - must be of a primitive numeric typeTest Case: 15.18-boolean-1Expected Result: FAIL
Regression Test:
tcltest::test 15.18-null-2 { both arguments to - must be of a primitive numeric type } { is_assignable_to T1518n2 String {null - null} } {FAIL}
at least one argument of + should be String, or else both must be primitive numeric typeTest Case: 15.18-boolean-2Expected Result: FAIL
Regression Test:
tcltest::test 15.18-boolean-1 { at least one argument of + should be String, or else both must be primitive numeric type } { is_assignable_to T1518b1 boolean {true + false} } {FAIL}
both arguments to - must be of a primitive numeric typeExpected Result: FAIL
Regression Test:
tcltest::test 15.18-boolean-2 { both arguments to - must be of a primitive numeric type } { is_assignable_to T1518b2 boolean {5 - false} } {FAIL}
tests/jls/expressions/additive-operators/string-concatenation-operator
String + requires a String argumentTest Case: 15.18.1-2Expected Result: FAIL
Regression Test:
tcltest::test 15.18.1-1 { String + requires a String argument } { # Sun seems to have relaxed this so that null is used as type String implicitly is_assignable_to T151811 String {null + 1} String {1 + null} } {FAIL}
(String)null denotes String concatenationTest Case: 15.18.1-3Expected Result: PASS
Regression Test:
tcltest::test 15.18.1-2 { (String)null denotes String concatenation } { is_assignable_to T151812 String {(String)null + 1} String {1 + (String)null} } {PASS}
(String)null + null denotes String concatenationTest Case: 15.18.1-4Expected Result: PASS
Regression Test:
tcltest::test 15.18.1-3 { (String)null + null denotes String concatenation } { is_assignable_to T151813 String {null + (String)null} String {(String)null + null} String {(String)null + (String)null} } {PASS}
void + String is invalidTest Case: 15.18.1-5Expected Result: FAIL
Regression Test:
tcltest::test 15.18.1-4 { void + String is invalid } { is_assignable_to T151814 String {System.out.println() + ""} String {"" + System.out.println()} } {FAIL}
+ operator should be left-associativeTest Case: 15.18.1-6Expected Result: PASS
Regression Test:
tcltest::test 15.18.1-5 { + operator should be left-associative } { constant_expression T151815 {1 + 2 + " fiddlers" == "3 fiddlers"} {"fiddlers " + 1 + 2 == "fiddlers 12"} } {PASS}
+ operator and integer constantsTest Case: 15.18.1-7Expected Result: PASS
Regression Test:
tcltest::test 15.18.1-6 { + operator and integer constants } { constant_expression T151816 {"-12300000" == "" + -12300000} {"-12300000,-50000000" == -12300000 + "," + -50000000} } {PASS}
+ operator and long constantsTest Case: 15.18.1-float-1Expected Result: PASS
Regression Test:
tcltest::test 15.18.1-7 { + operator and long constants } { constant_expression T151817 {"-12192592592745" == "" + -12192592592745L} {"-12192592592745,-12192592592745" == -12192592592745L + "," + -12192592592745L} } {PASS}
convert denormalized float to StringTest Case: 15.18.1-float-2Expected Result: PASS
Regression Test:
tcltest::test 15.18.1-float-1 { convert denormalized float to String } { constant_expression T15181f1 {"" + 1e-44f == "9.8E-45"} } {PASS}
convert NaN float to StringTest Case: 15.18.1-float-3Expected Result: PASS
Regression Test:
tcltest::test 15.18.1-float-2 { convert NaN float to String } { constant_expression T15181f2 {"" + Float.NaN == "NaN"} {"" + (-Float.NaN) == "NaN"} } {PASS}
convert Infinity float to StringTest Case: 15.18.1-float-4Expected Result: PASS
Regression Test:
tcltest::test 15.18.1-float-3 { convert Infinity float to String } { constant_expression T15181f3 {"" + Float.NEGATIVE_INFINITY == "-Infinity"} {"" + Float.POSITIVE_INFINITY == "Infinity"} } {PASS}
convert min float to StringTest Case: 15.18.1-float-5Expected Result: PASS
Regression Test:
tcltest::test 15.18.1-float-4 { convert min float to String } { constant_expression T15181f4 {"" + Float.MIN_VALUE == "1.4E-45"} } {PASS}
convert max float to StringTest Case: 15.18.1-float-6Expected Result: PASS
Regression Test:
tcltest::test 15.18.1-float-5 { convert max float to String } { constant_expression T15181f5 {"" + Float.MAX_VALUE == "3.4028235E38"} } {PASS}
conversion of float to String must use as few digits after decimal as produce the same float again by roundingTest Case: 15.18.1-double-1Expected Result: PASS
Regression Test:
tcltest::test 15.18.1-float-6 { conversion of float to String must use as few digits after decimal as produce the same float again by rounding } { constant_expression T15181f6 {"" + 123456768f == "1.2345677E8"} {"" + 123456776f == "1.23456776E8"} {"" + 123456784f == "1.2345678E8"} {"" + 123456792f == "1.2345679E8"} {"" + 123456800f == "1.234568E8"} } {PASS}
convert denormalized double to StringTest Case: 15.18.1-double-2Expected Result: PASS
Regression Test:
tcltest::test 15.18.1-double-1 { convert denormalized double to String } { constant_expression T15181d1 {"" + 1e-315 == "1.0E-315"} } {PASS}
convert Nan double to StringTest Case: 15.18.1-double-3Expected Result: PASS
Regression Test:
tcltest::test 15.18.1-double-2 { convert Nan double to String } { constant_expression T15181d2 {"" + Double.NaN == "NaN"} {"" + (-Double.NaN) == "NaN"} } {PASS}
convert Infinity double to StringTest Case: 15.18.1-double-4Expected Result: PASS
Regression Test:
tcltest::test 15.18.1-double-3 { convert Infinity double to String } { constant_expression T15181d3 {"" + Double.NEGATIVE_INFINITY == "-Infinity"} {"" + Double.POSITIVE_INFINITY == "Infinity"} } {PASS}
convert min double to StringTest Case: 15.18.1-double-5Expected Result: PASS
Regression Test:
tcltest::test 15.18.1-double-4 { convert min double to String } { constant_expression T15181d4 {"" + Double.MIN_VALUE == "4.9E-324"} } {PASS}
convert max double to StringExpected Result: PASS
Regression Test:
tcltest::test 15.18.1-double-5 { convert max double to String } { constant_expression T15181d5 {"" + Double.MAX_VALUE == "1.7976931348623157E308"} } {PASS}
tests/jls/expressions/additive-operators/numeric-types
side-effect-free addition is commutativeTest Case: 15.18.2-commute-2Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-commute-1 { side-effect-free addition is commutative } { constant_expression T15182commute1 {1 + 2 == 2 + 1} } {PASS}
side-effect-free addition is commutativeTest Case: 15.18.2-commute-3Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-commute-2 { side-effect-free addition is commutative } { constant_expression T15182commute2 {1L + 2L == 2L + 1L} } {PASS}
side-effect-free addition is commutativeTest Case: 15.18.2-commute-4Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-commute-3 { side-effect-free addition is commutative } { constant_expression T15182commute3 {1f + 2f == 2f + 1f} } {PASS}
side-effect-free addition is commutativeTest Case: 15.18.2-assoc-1Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-commute-4 { side-effect-free addition is commutative } { constant_expression T15182commute4 {1d + 2d == 2d + 1d} } {PASS}
integer addition is associative when all arguments are of the same typeTest Case: 15.18.2-assoc-2Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-assoc-1 { integer addition is associative when all arguments are of the same type } { constant_expression T15182assoc1 {(1 + 2) + 3 == 1 + (2 + 3)} } {PASS}
integer addition is not associative when arguments are of different typesTest Case: 15.18.2-assoc-3Expected Result: FAIL
Regression Test:
tcltest::test 15.18.2-assoc-2 { integer addition is not associative when arguments are of different types } { constant_expression T15182assoc2 {(1L + 0x70000000) + 0x70000000 == 1L + (0x70000000 + 0x70000000)} } {FAIL}
floating-point addition is not associativeTest Case: 15.18.2-assoc-4Expected Result: FAIL
Regression Test:
tcltest::test 15.18.2-assoc-3 { floating-point addition is not associative } { constant_expression T15182assoc3 {(1e10f + 256f) + 256f == 1e10f + (256f + 256f)} } {FAIL}
addition is left-associativeTest Case: 15.18.2-int-1Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-assoc-4 { addition is left-associative } { constant_expression T15182assoc3 {1e10f + 256f + 256f == (1e10f + 256f) + 256f} } {PASS}
overflow in integer addition simply selects low-order bits, changing signTest Case: 15.18.2-float-1Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-int-1 { overflow in integer addition simply selects low-order bits, changing sign } { constant_expression T15182i1 {1073741824 + 1073741824 == -2147483648} } {PASS}
NaN + NaN is NaNTest Case: 15.18.2-float-2Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-float-1 { NaN + NaN is NaN } { constant_expression T15182f1 {Float.NaN + Float.NaN != Float.NaN + Float.NaN} } {PASS}
NaN + anything is NaNTest Case: 15.18.2-float-3Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-float-2 { NaN + anything is NaN } { constant_expression T15182f2 {Float.NaN + 1f != Float.NaN + 1f} } {PASS}
the result of floating-point addition follows arithmetic sign rulesTest Case: 15.18.2-float-4Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-float-3 { the result of floating-point addition follows arithmetic sign rules } { constant_expression T15182f3 {-1f + -2f < 0f} } {PASS}
the result of floating-point addition follows arithmetic sign rulesTest Case: 15.18.2-float-5Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-float-4 { the result of floating-point addition follows arithmetic sign rules } { constant_expression T15182f4 {-1.0f + 2.0f > 0f} } {PASS}
Infinity + 0 = InfinityTest Case: 15.18.2-float-6Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-float-5 { Infinity + 0 = Infinity } { constant_expression T15182f5 {Float.POSITIVE_INFINITY + -0.0 == Float.POSITIVE_INFINITY} } {PASS}
Infinity + finite = Same sign InfinityTest Case: 15.18.2-float-7Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-float-6 { Infinity + finite = Same sign Infinity } { constant_expression T15182f6 {Float.NEGATIVE_INFINITY + -1f == Float.NEGATIVE_INFINITY} } {PASS}
Sum of Infinities of same sign is InfinityTest Case: 15.18.2-float-8Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-float-7 { Sum of Infinities of same sign is Infinity } { constant_expression T15182f7 {Float.NEGATIVE_INFINITY + Float.NEGATIVE_INFINITY == Float.NEGATIVE_INFINITY} } {PASS}
Sum of Infinities of opposite sign is NaNTest Case: 15.18.2-float-9Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-float-8 { Sum of Infinities of opposite sign is NaN } { constant_expression T15182f8 {Float.NEGATIVE_INFINITY + Float.POSITIVE_INFINITY != Float.NEGATIVE_INFINITY + Float.POSITIVE_INFINITY} } {PASS}
Sum of zeroes of same sign is same zeroTest Case: 15.18.2-float-10Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-float-9 { Sum of zeroes of same sign is same zero } { constant_expression T15182f9 {1.0f / (-0.0f + -0.0f) == Float.NEGATIVE_INFINITY} } {PASS}
Sum of zeroes of opposite sign is +0Test Case: 15.18.2-float-11Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-float-10 { Sum of zeroes of opposite sign is +0 } { constant_expression T15182f10 {1.0f / (-0.0f + 0.0f) == Float.POSITIVE_INFINITY} } {PASS}
Sum of oppositely signed floating-point is +0Test Case: 15.18.2-float-12Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-float-11 { Sum of oppositely signed floating-point is +0 } { constant_expression T15182f11 {1.0f / (1.0f + -1.0f) == Float.POSITIVE_INFINITY} } {PASS}
0.0 - x is not negation, for x = 0.0Test Case: 15.18.2-float-13Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-float-12 { 0.0 - x is not negation, for x = 0.0 } { constant_expression T15182f12 {1.0f / (0.0f - 0.0f) != Float.NEGATIVE_INFINITY} } {PASS}
a - b == a + (-b)Test Case: 15.18.2-float-14Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-float-13 { a - b == a + (-b) } { constant_expression T15182f13 {1.0f - 2.0f == 1.0f + -2.0f} } {PASS}
Floating-point addition takes place with infinite accuracy, then rounds to nearestTest Case: 15.18.2-float-15Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-float-14 { Floating-point addition takes place with infinite accuracy, then rounds to nearest } { constant_expression T15182f14 {0xfffff00 + 8.03125f == 0xfffff10} } {PASS}
Floating-point addition takes place with infinite accuracy, then rounds to nearestTest Case: 15.18.2-float-16Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-float-15 { Floating-point addition takes place with infinite accuracy, then rounds to nearest } { constant_expression T15182f15 {-0xfffff00 - -8.03125f == -0xffffef0} } {PASS}
Floating-point addition takes place with infinite accuracy, then rounds to nearestTest Case: 15.18.2-double-1Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-float-16 { Floating-point addition takes place with infinite accuracy, then rounds to nearest } { constant_expression T15182f16 {5.960465e-8f + 1 == 1.0000001f} } {PASS}
NaN + NaN is NaNTest Case: 15.18.2-double-2Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-double-1 { NaN + NaN is NaN } { constant_expression T15182d1 {Double.NaN + Double.NaN != Double.NaN + Double.NaN} } {PASS}
NaN + anything is NaNTest Case: 15.18.2-double-3Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-double-2 { NaN + anything is NaN } { constant_expression T15182d2 {Double.NaN + 1d != Double.NaN + 1d} } {PASS}
the result of floating-point addition follows arithmetic sign rulesTest Case: 15.18.2-double-4Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-double-3 { the result of floating-point addition follows arithmetic sign rules } { constant_expression T15182d3 {-1d + -2d < 0d} } {PASS}
the result of floating-point addition follows arithmetic sign rulesTest Case: 15.18.2-double-5Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-double-4 { the result of floating-point addition follows arithmetic sign rules } { constant_expression T15182d4 {-1.0 + 2.0 > 0.0} } {PASS}
Infinity + 0 = InfinityTest Case: 15.18.2-double-6Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-double-5 { Infinity + 0 = Infinity } { constant_expression T15182d5 {Double.POSITIVE_INFINITY + 0d == Double.POSITIVE_INFINITY} } {PASS}
Infinity + finite = Same sign InfinityTest Case: 15.18.2-double-7Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-double-6 { Infinity + finite = Same sign Infinity } { constant_expression T15182d6 {Double.NEGATIVE_INFINITY + -1d == Double.NEGATIVE_INFINITY} } {PASS}
Sum of Infinities of same sign is InfinityTest Case: 15.18.2-double-8Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-double-7 { Sum of Infinities of same sign is Infinity } { constant_expression T15182d7 {Double.NEGATIVE_INFINITY + Double.NEGATIVE_INFINITY == Double.NEGATIVE_INFINITY} } {PASS}
Sum of Infinities of opposite sign is NaNTest Case: 15.18.2-double-9Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-double-8 { Sum of Infinities of opposite sign is NaN } { constant_expression T15182d8 {Double.NEGATIVE_INFINITY + Double.POSITIVE_INFINITY != Double.NEGATIVE_INFINITY + Double.POSITIVE_INFINITY} } {PASS}
Sum of zeroes of same sign is same zeroTest Case: 15.18.2-double-10Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-double-9 { Sum of zeroes of same sign is same zero } { constant_expression T15182d9 {1.0 / (-0.0 + -0.0) == Double.NEGATIVE_INFINITY} } {PASS}
Sum of zeroes of opposite sign is +0Test Case: 15.18.2-double-11Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-double-10 { Sum of zeroes of opposite sign is +0 } { constant_expression T15182d10 {1.0 / (-0.0 + 0.0) == Double.POSITIVE_INFINITY} } {PASS}
Sum of oppositely signed floating-point is +0Test Case: 15.18.2-double-12Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-double-11 { Sum of oppositely signed floating-point is +0 } { constant_expression T15182d11 {1.0 / (1.0 + -1.0) == Double.POSITIVE_INFINITY} } {PASS}
0.0 - x is not negation, for x = 0.0Test Case: 15.18.2-double-13Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-double-12 { 0.0 - x is not negation, for x = 0.0 } { constant_expression T15182d12 {1.0 / (0.0 - 0.0) != Double.NEGATIVE_INFINITY} } {PASS}
a - b == a + (-b)Test Case: 15.18.2-double-14Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-double-13 { a - b == a + (-b) } { constant_expression T15182d13 {1.0 - 2.0 == 1.0 + -2.0} } {PASS}
Floating-point addition takes place with infinite accuracy, then rounds to nearestTest Case: 15.18.2-double-15Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-double-14 { Floating-point addition takes place with infinite accuracy, then rounds to nearest } { constant_expression T15182d14 {0x1ffffffffffff00L + 8.03125 == 0x1ffffffffffff10L } } {PASS}
Floating-point addition takes place with infinite accuracy, then rounds to nearestTest Case: 15.18.2-double-16Expected Result: PASS
Regression Test:
tcltest::test 15.18.2-double-15 { Floating-point addition takes place with infinite accuracy, then rounds to nearest } { constant_expression T15182d15 {-0x1ffffffffffff00L - -8.03125 == -0x1fffffffffffef0L } } {PASS}
Floating-point addition takes place with infinite accuracy, then rounds to nearestExpected Result: PASS
Regression Test:
tcltest::test 15.18.2-double-16 { Floating-point addition takes place with infinite accuracy, then rounds to nearest } { constant_expression T15182d16 {1.1107651257113993e-16 + 1 == 1.0000000000000002} } {PASS}
tests/jls/expressions/assignment-operators/compound-assignment-operators
String += null is validTest Case: 15.26.2-string-2Expected Result: PASS
Regression Test:
tcltest::test 15.26.2-string-1 { String += null is valid } { compile [saveas T15262s1.java { class T15262s1 { void foo() { String s = ""; s += null; } } }] } {PASS}
String += void method is invalidTest Case: 15.26.2-string-3Expected Result: FAIL
Regression Test:
tcltest::test 15.26.2-string-2 { String += void method is invalid } { compile [saveas T15262s2.java { class T15262s2 { void foo() { String s = ""; s += System.out.println(); } } }] } {FAIL}
left-hand side of += should be StringTest Case: 15.26.2-string-4Expected Result: FAIL
Regression Test:
tcltest::test 15.26.2-string-3 { left-hand side of += should be String } { # Sun seems to have relaxed this to left-hand side of += should be # assignment compatible if right-hand side is type String (or null) compile [saveas T15262s3.java { class T15262s3 { void foo() { Object o = null; o += ""; } } }] } {FAIL}
left-hand side of += should be StringExpected Result: FAIL
Regression Test:
tcltest::test 15.26.2-string-4 { left-hand side of += should be String } { # Sun seems to have relaxed this to left-hand side of += should be # assignment compatible if right-hand side is type String (or null) compile [saveas T15262s4.java { class T15262s4 { void foo() { Comparable[] c = new Integer[1]; c[0] += ""; } } }] } {FAIL}
tests/jls/expressions/constant-expression
literals are constant expressionsTest Case: 15.28-primitive-2Expected Result: PASS
Regression Test:
tcltest::test 15.28-primitive-1 { literals are constant expressions } { switch_labels T1528p1 int {case 1: case '1':} } {PASS}
literals are constant expressionsTest Case: 15.28-primitive-3Expected Result: PASS
Regression Test:
tcltest::test 15.28-primitive-2 { literals are constant expressions } { constant_expression T1528p2 {1L == 1L} {1f == 1f} {1.0 == 1.0} {true} } {PASS}
casts can form constant expressionsTest Case: 15.28-primitive-4Expected Result: PASS
Regression Test:
tcltest::test 15.28-primitive-3 { casts can form constant expressions } { constant_expression T1528p3 {(boolean) true} {(int) 1L == (float) 1.0} {(char) 0x61 == 'a'} {(char) 97.0D == 'a'} {(double) 'a' == 97.0D} {(int) 97L == (int) 'a'} } {PASS}
Unary +, -, ~, ! form constant expressionsTest Case: 15.28-primitive-5Expected Result: PASS
Regression Test:
tcltest::test 15.28-primitive-4 { Unary +, -, ~, ! form constant expressions } { constant_expression T1528p4 {+2 == 2} {-0x80000000 == 0x80000000} {~0 == 0xffffffff} {!false} } {PASS}
++ and -- are not constant expressionsTest Case: 15.28-primitive-6Expected Result: FAIL
Regression Test:
tcltest::test 15.28-primitive-5 { ++ and -- are not constant expressions } { empty_class T1528p5 { void foo(int i) { switch (i) { case i++: } } } } {FAIL}
++ and -- are not constant expressionsTest Case: 15.28-primitive-7Expected Result: FAIL
Regression Test:
tcltest::test 15.28-primitive-6 { ++ and -- are not constant expressions } { empty_class T1528p6 { void foo(int i) { switch (i) { case i--: } } } } {FAIL}
*, /, and % form constant expressionsTest Case: 15.28-primitive-8Expected Result: PASS
Regression Test:
tcltest::test 15.28-primitive-7 { *, /, and % form constant expressions } { constant_expression T1528p7 {5 * 3 == 15} {5 / 3 == 1} {5 % 3 == 2} } {PASS}
+ and - form constant expressionsTest Case: 15.28-primitive-9Expected Result: PASS
Regression Test:
tcltest::test 15.28-primitive-8 { + and - form constant expressions } { constant_expression T1528p8 {1 + 2 == 3} {1 - 2 == -1} } {PASS}
<<, >>, and >>> form constant expressionsTest Case: 15.28-primitive-10Expected Result: PASS
Regression Test:
tcltest::test 15.28-primitive-9 { <<, >>, and >>> form constant expressions } { constant_expression T1528p9 {2 << 1 == 4} {2 >> 1 == 1} {-2 >>> 1 == 0x7fffffff} } {PASS}
<, <=, >, and >= form constant expressionsTest Case: 15.28-primitive-11Expected Result: PASS
Regression Test:
tcltest::test 15.28-primitive-10 { <, <=, >, and >= form constant expressions } { constant_expression T1528p10 {1 < 2} {2 <= 2} {2 > 1} {1 >= 1} } {PASS}
== and != form constant expressionsTest Case: 15.28-primitive-12Expected Result: PASS
Regression Test:
tcltest::test 15.28-primitive-11 { == and != form constant expressions } { constant_expression T1528p11 {1 == 1} {1 != 2} {true == true} {true != false} {'a' == 'a'} {'a' != 'b'} } {PASS}
bitwise &, ^, and | form constant expressionsTest Case: 15.28-primitive-13Expected Result: PASS
Regression Test:
tcltest::test 15.28-primitive-12 { bitwise &, ^, and | form constant expressions } { constant_expression T1528p12 {(0xaa & 0xa5) == 0xa0} {(0xaa ^ 0xa5) == 0x0f} {(0xaa | 0xa5) == 0xaf} } {PASS}
logical &, ^, and | form constant expressionsTest Case: 15.28-primitive-14Expected Result: PASS
Regression Test:
tcltest::test 15.28-primitive-13 { logical &, ^, and | form constant expressions } { constant_expression T1528p13 {true & true} {true ^ false} {false | true} } {PASS}
&& and || form constant expressionsTest Case: 15.28-primitive-15Expected Result: PASS
Regression Test:
tcltest::test 15.28-primitive-14 { && and || form constant expressions } { constant_expression T1528p14 {true && true} {true || false} } {PASS}
short-circuited portion of && or || must still be constant expressionsTest Case: 15.28-primitive-16Expected Result: FAIL
Regression Test:
tcltest::test 15.28-primitive-15 { short-circuited portion of && or || must still be constant expressions } { empty_main T1528p15 { boolean t = true, f = false; switch (args.length) { case 0: case ((false && t) ? 0 : 1): case ((true || f) ? 2 : 0): } } } {FAIL}
?: forms a constant expressionTest Case: 15.28-primitive-17Expected Result: PASS
Regression Test:
tcltest::test 15.28-primitive-16 { ?: forms a constant expression } { constant_expression T1528p16 {true ? true : false} } {PASS}
unused portion of ?: must still be a constant expressionTest Case: 15.28-simple-name-1Expected Result: FAIL
Regression Test:
tcltest::test 15.28-primitive-17 { unused portion of ?: must still be a constant expression } { empty_main T1528p17 { int i1 = 1, i2 = 2; switch (args.length) { case 0: case (true ? 1 : i1): case (false ? i2 : 2): } } } {FAIL}
a final variable initialized by a constant expression is a constant expressionTest Case: 15.28-simple-name-2Expected Result: PASS
Regression Test:
tcltest::test 15.28-simple-name-1 { a final variable initialized by a constant expression is a constant expression } { empty_class T1528sn1 { static final int i = 1; void foo (int j) { switch (j) { case i: } } } } {PASS}
a final variable initialized by a constant expression is a constant expressionTest Case: 15.28-simple-name-3Expected Result: PASS
Regression Test:
tcltest::test 15.28-simple-name-2 { a final variable initialized by a constant expression is a constant expression } { empty_class T1528sn2 { final int i = 1; void foo (int j) { switch (j) { case i: } } } } {PASS}
a final variable initialized by a constant expression is a constant expressionTest Case: 15.28-simple-name-4Expected Result: PASS
Regression Test:
tcltest::test 15.28-simple-name-3 { a final variable initialized by a constant expression is a constant expression } { empty_class T1528sn3 { void foo (int j) { final int i = 1; switch (j) { case i: } } } } {PASS}
a final variable initialized by a constant expression is a constant expressionTest Case: 15.28-simple-name-5Expected Result: PASS
Regression Test:
tcltest::test 15.28-simple-name-4 { a final variable initialized by a constant expression is a constant expression } { empty_class T1528sn4 { static final int i = 1 + 1; void foo (int j) { switch (j) { case i: } } } } {PASS}
a final variable initialized by a constant expression is a constant expressionTest Case: 15.28-simple-name-6Expected Result: PASS
Regression Test:
tcltest::test 15.28-simple-name-5 { a final variable initialized by a constant expression is a constant expression } { empty_class T1528sn5 { final int i = 1 - 1; void foo (int j) { switch (j) { case i: } } } } {PASS}
a final variable initialized by a constant expression is a constant expressionTest Case: 15.28-simple-name-7Expected Result: PASS
Regression Test:
tcltest::test 15.28-simple-name-6 { a final variable initialized by a constant expression is a constant expression } { empty_class T1528sn6 { void foo (int j) { final int i = true ? 1 : 0; switch (j) { case i: } } } } {PASS}
a final variable initialized by a final variable that is initialized by constant expression is a constant expressionTest Case: 15.28-simple-name-8Expected Result: PASS
Regression Test:
tcltest::test 15.28-simple-name-7 { a final variable initialized by a final variable that is initialized by constant expression is a constant expression } { empty_class T1528sn7 { static final int i1 = 1; static final int i2 = i1; void foo (int j) { switch (j) { case i2: } } } } {PASS}
a final variable initialized by a final variable that is initialized by constant expression is a constant expressionTest Case: 15.28-simple-name-9Expected Result: PASS
Regression Test:
tcltest::test 15.28-simple-name-8 { a final variable initialized by a final variable that is initialized by constant expression is a constant expression } { empty_class T1528sn8 { final int i1 = 2 / 1; final int i2 = i1; void foo (int j) { switch (j) { case i2: } } } } {PASS}
a final variable initialized by a final variable that is initialized by constant expression is a constant expressionTest Case: 15.28-nonconst-simple-name-1Expected Result: PASS
Regression Test:
tcltest::test 15.28-simple-name-9 { a final variable initialized by a final variable that is initialized by constant expression is a constant expression } { empty_class T1528sn9 { void foo (int j) { final int i1 = 2 * 2; final int i2 = i1; switch (j) { case i2: } } } } {PASS}
a non-final variable initialized by a constant expression is not a constant expressionTest Case: 15.28-nonconst-simple-name-2Expected Result: FAIL
Regression Test:
tcltest::test 15.28-nonconst-simple-name-1 { a non-final variable initialized by a constant expression is not a constant expression } { empty_class T1528nsn1 { int i = 1; void foo (int j) { switch (j) { case i: } } } } {FAIL}
a final variable initialized by a non-final variable is not a constant expressionTest Case: 15.28-nonconst-simple-name-3Expected Result: FAIL
Regression Test:
tcltest::test 15.28-nonconst-simple-name-2 { a final variable initialized by a non-final variable is not a constant expression } { empty_class T1528nsn2 { int i1 = 1; final int i2 = i1; void foo (int j) { switch (j) { case i2: } } } } {FAIL}
a final variable initialized by a non-constant expression is not a constant expressionTest Case: 15.28-nonconst-simple-name-4Expected Result: FAIL
Regression Test:
tcltest::test 15.28-nonconst-simple-name-3 { a final variable initialized by a non-constant expression is not a constant expression } { empty_class T1528nsn3 { int i1 = 0; final int i2 = i1++; void foo (int j) { switch (j) { case i2: } } } } {FAIL}
an argument variable with the final modifier is not a constant expressionTest Case: 15.28-nonconst-simple-name-5Expected Result: FAIL
Regression Test:
tcltest::test 15.28-nonconst-simple-name-4 { an argument variable with the final modifier is not a constant expression } { empty_class T1528nsn4 { void foo (final int i) { switch (i) { case i: } } } } {FAIL}
a final variable initialized by an argument variable with the final modifier is not a constant expressionTest Case: 15.28-nonconst-simple-name-6Expected Result: FAIL
Regression Test:
tcltest::test 15.28-nonconst-simple-name-5 { a final variable initialized by an argument variable with the final modifier is not a constant expression } { empty_class T1528nsn5 { void foo (final int i) { final int j = i; switch (i) { case j: } } } } {FAIL}
a final variable initialized by a function invocation is not a constant expressionTest Case: 15.28-nonconst-simple-name-7Expected Result: FAIL
Regression Test:
tcltest::test 15.28-nonconst-simple-name-6 { a final variable initialized by a function invocation is not a constant expression } { empty_class T1528nsn6 { void foo (int i) { final int j = Integer.parseInt("1"); switch (i) { case j: } } } } {FAIL}
a final variable initialized by a ternary conditional operator with a non-constant value is not a constant expressionTest Case: 15.28-uninitialized-simple-name-1Expected Result: FAIL
Regression Test:
tcltest::test 15.28-nonconst-simple-name-7 { a final variable initialized by a ternary conditional operator with a non-constant value is not a constant expression } { empty_class T1528nsn7 { void foo (int i) { final int j = true ? 1 : Integer.parseInt("1"); switch (i) { case j: } } } } {FAIL}
a final variable that does not have an initializer is not a constant expressionTest Case: 15.28-uninitialized-simple-name-2Expected Result: FAIL
Regression Test:
tcltest::test 15.28-uninitialized-simple-name-1 { a final variable that does not have an initializer is not a constant expression } { empty_class T1528usn1 { static final int i; static { i = 1; } void foo (int j) { switch (j) { case i: } } } } {FAIL}
a final variable that does not have an initializer is not a constant expressionTest Case: 15.28-uninitialized-simple-name-3Expected Result: FAIL
Regression Test:
tcltest::test 15.28-uninitialized-simple-name-2 { a final variable that does not have an initializer is not a constant expression } { empty_class T1528usn2 { static final int i; static { i = Integer.parseInt("1"); } void foo (int j) { switch (j) { case i: } } } } {FAIL}
a final variable that does not have an initializer is not a constant expressionTest Case: 15.28-uninitialized-simple-name-4Expected Result: FAIL
Regression Test:
tcltest::test 15.28-uninitialized-simple-name-3 { a final variable that does not have an initializer is not a constant expression } { empty_class T1528usn3 { void foo (int j) { final int i; i = 1; switch (j) { case i: } } } } {FAIL}
a final variable that does not have an initializer is not a constant expressionTest Case: 15.28-cast-simple-name-1Expected Result: FAIL
Regression Test:
tcltest::test 15.28-uninitialized-simple-name-4 { a final variable that does not have an initializer is not a constant expression } { empty_class T1528usn4 { void foo (int j) { final int i; i = Integer.parseInt("1"); switch (j) { case i: } } } } {FAIL}
a final variable initialized by a constant expression and then cast to a primitive is a constant expressionTest Case: 15.28-cast-simple-name-2Expected Result: PASS
Regression Test:
tcltest::test 15.28-cast-simple-name-1 { a final variable initialized by a constant expression and then cast to a primitive is a constant expression } { empty_class T1528csn1 { final long l1 = 1L; final long l2 = Long.MAX_VALUE; void foo (int j) { switch (j) { case (int) l1: case (int) l2: } } } } {PASS}
a final variable initialized by a constant expression and then cast to a primitive is a constant expressionTest Case: 15.28-cast-simple-name-3Expected Result: PASS
Regression Test:
tcltest::test 15.28-cast-simple-name-2 { a final variable initialized by a constant expression and then cast to a primitive is a constant expression } { empty_class T1528csn2 { final boolean t = true; void foo (int j) { switch (j) { case 0: case ((boolean) t ? 1 : 0): } } } } {PASS}
any number of casts can be applied to a constant expressionTest Case: 15.28-qualified-name-1Expected Result: PASS
Regression Test:
tcltest::test 15.28-cast-simple-name-3 { any number of casts can be applied to a constant expression } { empty_class T1528csn3 { final byte b = (byte) (float) 1.0D; final char c = (char) b; final short s = (short) c; final int i = (int) s; final long l = (long) i; void foo (int j) { switch (j) { case 0: case (((double) l == 1.0D) ? (int) l : 0): case 2: } } } } {PASS}
qualified references of final constant fields are constantTest Case: 15.28-qualified-name-2Expected Result: PASS
Regression Test:
tcltest::test 15.28-qualified-name-1 { qualified references of final constant fields are constant } { empty_class T1528qn1 { static final int i = 1; void foo(int j) { switch (j) { case T1528qn1.i: case Integer.MAX_VALUE: } } } } {PASS}
qualified references of final constant fields are constantTest Case: 15.28-qualified-name-3Expected Result: FAIL
Regression Test:
tcltest::test 15.28-qualified-name-2 { qualified references of final constant fields are constant } { empty_class T1528qn2 { static int i = 1; void foo(int j) { switch (j) { case T1528qn2.i: } } } } {FAIL}
qualified references of final constant fields are constantTest Case: 15.28-qualified-name-4Expected Result: FAIL
Regression Test:
tcltest::test 15.28-qualified-name-3 { qualified references of final constant fields are constant } { empty_class T1528qn3 { static int i = 1; static final int i1 = i; void foo(int j) { switch (j) { case T1528qn3.i1: } } } } {FAIL}
qualified references of final constant fields are constantTest Case: 15.28-qualified-name-5Expected Result: FAIL
Regression Test:
tcltest::test 15.28-qualified-name-4 { qualified references of final constant fields are constant } { empty_class T1528qn4 { static final int i; static {i = 1;} void foo(int j) { switch (j) { case T1528qn4.i: } } } } {FAIL}
qualified references of final constant fields must fit the form TypeName.IdentifierTest Case: 15.28-qualified-name-6Expected Result: FAIL
Regression Test:
tcltest::test 15.28-qualified-name-5 { qualified references of final constant fields must fit the form TypeName.Identifier } { empty_class T1528qn5 { static final T1528qn5 t = new T1528qn5(); final int i = 1; void foo(int j) { switch (j) { case T1528qn5.t.i: } } } } {FAIL}
qualified references of final constant fields must fit the form TypeName.IdentifierTest Case: 15.28-qualified-name-7Expected Result: FAIL
Regression Test:
tcltest::test 15.28-qualified-name-6 { qualified references of final constant fields must fit the form TypeName.Identifier } { empty_class T1528qn6 { static final T1528qn6 t = new T1528qn6(); final int i = 1; void foo(int j) { switch (j) { case t.i: } } } } {FAIL}
qualified references of final constant fields must fit the form TypeName.IdentifierTest Case: 15.28-qualified-name-8Expected Result: FAIL
Regression Test:
tcltest::test 15.28-qualified-name-7 { qualified references of final constant fields must fit the form TypeName.Identifier } { empty_class T1528qn7 { static final T1528qn7 t = new T1528qn7(); final int i = 1; void foo(int j) { switch (j) { case T1528qn7.t.i: } } } } {FAIL}
qualified references of final constant fields must fit the form TypeName.IdentifierTest Case: 15.28-qualified-name-9Expected Result: FAIL
Regression Test:
tcltest::test 15.28-qualified-name-8 { qualified references of final constant fields must fit the form TypeName.Identifier } { empty_class T1528qn8 { static final T1528qn8 t = new T1528qn8(); static final int i = 1; void foo(int j) { switch (j) { case t.i: } } } } {FAIL}
qualified references of final constant fields must fit the form TypeName.IdentifierTest Case: 15.28-qualified-name-10Expected Result: FAIL
Regression Test:
tcltest::test 15.28-qualified-name-9 { qualified references of final constant fields must fit the form TypeName.Identifier } { empty_class T1528qn9 { static final int i = 1; void foo(int j) { final T1528qn9 t = new T1528qn9(); switch (j) { case t.i: } } } } {FAIL}
qualified references of final constant fields must fit the form TypeName.IdentifierTest Case: 15.28-string-1Expected Result: FAIL
Regression Test:
tcltest::test 15.28-qualified-name-10 { qualified references of final constant fields must fit the form TypeName.Identifier } { empty_class T1528qn10 { final int i = 1; void foo(int j) { final T1528qn10 t = new T1528qn10(); switch (j) { case t.i: } } } } {FAIL}
literals are constant expressionsTest Case: 15.28-string-2Expected Result: PASS
Regression Test:
tcltest::test 15.28-string-1 { literals are constant expressions } { constant_expression T1528s1 {"" == ""} {"hello, world" == "hello, world"} } {PASS}
literals are constant expressionsTest Case: 15.28-string-3Expected Result: PASS
Regression Test:
tcltest::test 15.28-string-2 { literals are constant expressions } { constant_expression T1528s2 {"" + 1 == "1"} {"" + 1L == "1"} {"" + 1f == "1.0"} {"" + 1.0 == "1.0"} {"" + '1' == "1"} {"" + true == "true"} } {PASS}
casts to type String are constant expressionsTest Case: 15.28-string-4Expected Result: PASS
Regression Test:
tcltest::test 15.28-string-3 { casts to type String are constant expressions } { constant_expression T1528s3 {(String) "" == ""} } {PASS}
casts to primitive types are constant expressionsTest Case: 15.28-string-5Expected Result: PASS
Regression Test:
tcltest::test 15.28-string-4 { casts to primitive types are constant expressions } { constant_expression T1528s3 {"" + (boolean) true == "true"} {"" + (int) 1.5 == "1"} } {PASS}
Unary +, -, ~, ! form constant expressionsTest Case: 15.28-string-6Expected Result: PASS
Regression Test:
tcltest::test 15.28-string-5 { Unary +, -, ~, ! form constant expressions } { constant_expression T1528s5 {"" + +2 == "2"} {"" + -0x80000000 == "-2147483648"} {"" + ~0 == "-1"} {"" + !false == "true"} } {PASS}
*, /, and % form constant expressionsTest Case: 15.28-string-7Expected Result: PASS
Regression Test:
tcltest::test 15.28-string-6 { *, /, and % form constant expressions } { constant_expression T1528s6 {"" + 5 * 3 == "15"} {"" + 5 / 3 == "1"} {"" + 5 % 3 == "2"} } {PASS}
String + forms constant expressionsTest Case: 15.28-string-8Expected Result: PASS
Regression Test:
tcltest::test 15.28-string-7 { String + forms constant expressions } { constant_expression T1528s7 {"" + "test" + "ing" == "testing"} {"a" + "b" == "\u0061b"} } {PASS}
+ and - form constant expressionsTest Case: 15.28-string-9Expected Result: PASS
Regression Test:
tcltest::test 15.28-string-8 { + and - form constant expressions } { constant_expression T1528s8 {"" + (1 + 2) == "3"} {"" + (1 - 2) == "-1"} } {PASS}
<<, >>, and >>> form constant expressionsTest Case: 15.28-string-10Expected Result: PASS
Regression Test:
tcltest::test 15.28-string-9 { <<, >>, and >>> form constant expressions } { constant_expression T1528s9 {"" + (2 << 1) == "4"} {"" + (2 >> 1) == "1"} {"" + (-2 >>> 1) == "2147483647"} } {PASS}
<, <=, >, and >= form constant expressionsTest Case: 15.28-string-11Expected Result: PASS
Regression Test:
tcltest::test 15.28-string-10 { <, <=, >, and >= form constant expressions} { constant_expression T1528s10 {"" + (1 < 2) == "true"} {"" + (2 <= 2) == "true"} {"" + (2 > 1) == "true"} {"" + (1 >= 1) == "true"} } {PASS}
== and != form constant expressionsTest Case: 15.28-string-12Expected Result: PASS
Regression Test:
tcltest::test 15.28-string-11 { == and != form constant expressions } { constant_expression T1528s11 {"1" == "1"} {"1" != "2"} } {PASS}
bitwise &, ^, and | form constant expressionsTest Case: 15.28-string-13Expected Result: PASS
Regression Test:
tcltest::test 15.28-string-12 { bitwise &, ^, and | form constant expressions } { constant_expression T1528s12 {"" + (0xaa & 0xa5) == "160"} {"" + (0xaa ^ 0xa5) == "15"} {"" + (0xaa | 0xa5) == "175"} } {PASS}
logical &, ^, and | form constant expressionsTest Case: 15.28-string-14Expected Result: PASS
Regression Test:
tcltest::test 15.28-string-13 { logical &, ^, and | form constant expressions} { constant_expression T1528s13 {"" + (true & true) == "true"} {"" + (true ^ false) == "true"} {"" + (false | true) == "true"} } {PASS}
&& and || form constant expressionsTest Case: 15.28-string-15Expected Result: PASS
Regression Test:
tcltest::test 15.28-string-14 { && and || form constant expressions } { constant_expression T1528s14 {"" + (true && true) == "true"} {"" + (true || false) == "true"} } {PASS}
?: forms constant expressionsTest Case: 15.28-string-16Expected Result: PASS
Regression Test:
tcltest::test 15.28-string-15 { ?: forms constant expressions } { constant_expression T1528s15 {"" + (true ? 1 : 2) == "1"} } {PASS}
?: forms constant expressionsTest Case: 15.28-string-17Expected Result: PASS
Regression Test:
tcltest::test 15.28-string-16 { ?: forms constant expressions } { constant_expression T1528s16 {(true ? "1" : "") == "1"} } {PASS}
instanceof does not form a constant expressionTest Case: 15.28-simple-namestr-1Expected Result: FAIL
Regression Test:
tcltest::test 15.28-string-17 { instanceof does not form a constant expression } { constant_expression T1528s17 {"" instanceof String} } {FAIL}
a final variable initialized by a constant expression is a constant expressionTest Case: 15.28-simple-namestr-2Expected Result: PASS
Regression Test:
tcltest::test 15.28-simple-namestr-1 { a final variable initialized by a constant expression is a constant expression } { empty_class T1528sns1 { void foo (int j) { final String s = "1"; switch (j) { case 0: case ((s == "1") ? 1 : 0): } } } } {PASS}
a final variable initialized by a constant expression is a constant expressionTest Case: 15.28-simple-namestr-3Expected Result: PASS
Regression Test:
tcltest::test 15.28-simple-namestr-2 { a final variable initialized by a constant expression is a constant expression } { empty_class T1528sns2 { void foo (int j) { final String s = "1" + "2"; switch (j) { case 0: case ((s == "12") ? 1 : 0): } } } } {PASS}
a final variable initialized by a constant expression is a constant expressionTest Case: 15.28-simple-namestr-4Expected Result: PASS
Regression Test:
tcltest::test 15.28-simple-namestr-3 { a final variable initialized by a constant expression is a constant expression } { empty_class T1528sns3 { void foo (int j) { final String s = "1" + (int) 2.0D; switch (j) { case 0: case ((s == "12") ? 1 : 0): } } } } {PASS}
a final variable initialized by a final variable that is initialized by constant expression is a constant expressionTest Case: 15.28-nonconst-simple-namestr-1Expected Result: PASS
Regression Test:
tcltest::test 15.28-simple-namestr-4 { a final variable initialized by a final variable that is initialized by constant expression is a constant expression } { empty_class T1528sns4 { void foo (int j) { final String s1 = "1"; final String s2 = s1; switch (j) { case 0: case ((s2 == "1") ? 1 : 0): } } } } {PASS}
a non-final variable initialized by a constant expression is not a constant expressionTest Case: 15.28-nonconst-simple-namestr-2Expected Result: FAIL
Regression Test:
tcltest::test 15.28-nonconst-simple-namestr-1 { a non-final variable initialized by a constant expression is not a constant expression } { empty_class T1528nsns1 { String s = "1"; void foo (int j) { switch (j) { case 0: case ((s == "1") ? 1 : 0): } } } } {FAIL}
a final variable initialized by a non-final variable is not a constant expressionTest Case: 15.28-nonconst-simple-namestr-3Expected Result: FAIL
Regression Test:
tcltest::test 15.28-nonconst-simple-namestr-2 { a final variable initialized by a non-final variable is not a constant expression } { empty_class T1528nsns2 { String s1 = "1"; final String s2 = s1; void foo (int j) { switch (j) { case 0: case ((s2 == "1") ? 1 : 0): } } } } {FAIL}
a final variable initialized by a function invocation is not a constant expressionTest Case: 15.28-qualified-namestr-1Expected Result: FAIL
Regression Test:
tcltest::test 15.28-nonconst-simple-namestr-3 { a final variable initialized by a function invocation is not a constant expression } { empty_class T1528nsns3 { final String s = String.valueOf(0L); void foo (int j) { switch (j) { case 0: case ((s == "0") ? 1 : 0): } } } } {FAIL}
qualified references of final constant fields are constantTest Case: 15.28-qualified-namestr-2Expected Result: PASS
Regression Test:
tcltest::test 15.28-qualified-namestr-1 { qualified references of final constant fields are constant } { empty_class T1528qns1 { static final String s = "1"; void foo(int j) { switch (j) { case 0: case ((T1528qns1.s == "1") ? 1 : 0): } } } } {PASS}
qualified references of final constant fields are constantTest Case: 15.28-qualified-namestr-3Expected Result: FAIL
Regression Test:
tcltest::test 15.28-qualified-namestr-2 { qualified references of final constant fields are constant } { empty_class T1528qns2 { static String s = "1"; void foo(int j) { switch (j) { case 0: case ((T1528qns2.s == "1") ? 1 : 0): } } } } {FAIL}
qualified references of final constant fields are constantTest Case: 15.28-qualified-namestr-4Expected Result: FAIL
Regression Test:
tcltest::test 15.28-qualified-namestr-3 { qualified references of final constant fields are constant } { empty_class T1528qns3 { static String s = "1"; static final String s1 = s; void foo(int j) { switch (j) { case 0: case ((T1528qns3.s1 == "1") ? 1 : 0): } } } } {FAIL}
qualified references of final constant fields are constantTest Case: 15.28-qualified-namestr-5Expected Result: FAIL
Regression Test:
tcltest::test 15.28-qualified-namestr-4 { qualified references of final constant fields are constant } { empty_class T1528qns4 { static final String s; static {s = "1";} void foo(int j) { switch (j) { case 0: case ((T1528qns4.s == "1") ? 1 : 0): } } } } {FAIL}
qualified references of final constant must fit the form TypeName.IdentifierTest Case: 15.28-qualified-namestr-6Expected Result: FAIL
Regression Test:
tcltest::test 15.28-qualified-namestr-5 { qualified references of final constant must fit the form TypeName.Identifier } { empty_class T1528qns5 { static final T1528qns5 t = new T1528qns5(); final String s = "1"; void foo(int j) { switch (j) { case 0: case ((T1528qns5.t.s == "1") ? 1 : 0): } } } } {FAIL}
qualified references of final constant must fit the form TypeName.IdentifierTest Case: 15.28-qualified-namestr-7Expected Result: FAIL
Regression Test:
tcltest::test 15.28-qualified-namestr-6 { qualified references of final constant must fit the form TypeName.Identifier } { empty_class T1528qns6 { static final T1528qns6 t = new T1528qns6(); final String s = "1"; void foo(int j) { switch (j) { case 0: case ((t.s == "1") ? 1 : 0): } } } } {FAIL}
qualified references of final constant must fit the form TypeName.IdentifierTest Case: 15.28-qualified-namestr-8Expected Result: FAIL
Regression Test:
tcltest::test 15.28-qualified-namestr-7 { qualified references of final constant must fit the form TypeName.Identifier } { empty_class T1528qns7 { static final T1528qns7 t = new T1528qns7(); static final String s = "1"; void foo(int j) { switch (j) { case 0: case ((t.s == "1") ? 1 : 0): } } } } {FAIL}
qualified references of final constant must fit the form TypeName.IdentifierTest Case: 15.28-qualified-namestr-9Expected Result: FAIL
Regression Test:
tcltest::test 15.28-qualified-namestr-8 { qualified references of final constant must fit the form TypeName.Identifier } { empty_class T1528qns8 { static final T1528qns8 t = new T1528qns8(); static final String s = "1"; void foo(int j) { switch (j) { case 0: case ((t.s == "1") ? 1 : 0): } } } } {FAIL}
qualified references of final constant must fit the form TypeName.IdentifierTest Case: 15.28-qualified-namestr-10Expected Result: FAIL
Regression Test:
tcltest::test 15.28-qualified-namestr-9 { qualified references of final constant must fit the form TypeName.Identifier } { empty_class T1528qns9 { static final String s = "1"; void foo(int j) { final T1528qns9 t = new T1528qns9(); switch (j) { case 0: case ((t.s == "1") ? 1 : 0): } } } } {FAIL}
qualified references of final constant must fit the form TypeName.IdentifierTest Case: 15.28-notstring-1Expected Result: FAIL
Regression Test:
tcltest::test 15.28-qualified-namestr-10 { qualified references of final constant must fit the form TypeName.Identifier } { empty_class T1528qns10 { final String s = "1"; void foo(int j) { final T1528qns10 t = new T1528qns10(); switch (j) { case 0: case ((t.s == "1") ? 1 : 0): } } } } {FAIL}
casting a String to anything other than string makes is not a constant expression, casting back to String does not reverse the processTest Case: 15.28-notstring-2Expected Result: FAIL
Regression Test:
tcltest::test 15.28-notstring-1 { casting a String to anything other than string makes is not a constant expression, casting back to String does not reverse the process } { constant_expression T1528nots1 {(String) (Object) "" == ""} } {FAIL}
anything other than type String is not a constant expressionTest Case: 15.28-notstring-3Expected Result: FAIL
Regression Test:
tcltest::test 15.28-notstring-2 { anything other than type String is not a constant expression } { empty_class T1528nots2 { final Object o = "1"; void foo (int j) { switch (j) { case 0: case ((o == "1") ? 1 : 0): } } } } {FAIL}
anything other than type String is not a constant expression, casting to String does not helpTest Case: 15.28-null-1Expected Result: FAIL
Regression Test:
tcltest::test 15.28-notstring-3 { anything other than type String is not a constant expression, casting to String does not help } { empty_class T1528nots3 { final Object o = "1"; void foo (int j) { switch (j) { case 0: case (((String) o == "1") ? 1 : 0): } } } } {FAIL}
The null literal is NOT a compile-time constantTest Case: 15.28-null-2Expected Result: FAIL
Regression Test:
tcltest::test 15.28-null-1 { The null literal is NOT a compile-time constant } { constant_expression T1528null1 {null == null} } {FAIL}
The null literal is NOT a compile-time constantTest Case: 15.28-null-3Expected Result: FAIL
Regression Test:
tcltest::test 15.28-null-2 { The null literal is NOT a compile-time constant } { constant_expression T1528null2 {null != ""} } {FAIL}
The null literal is NOT a compile-time constantTest Case: 15.28-null-4Expected Result: FAIL
Regression Test:
tcltest::test 15.28-null-3 { The null literal is NOT a compile-time constant } { constant_expression T1528null3 {"" + null == "null"} } {FAIL}
The null literal is NOT a compile-time constantTest Case: 15.28-null-5Expected Result: FAIL
Regression Test:
tcltest::test 15.28-null-4 { The null literal is NOT a compile-time constant } { constant_expression T1528null4 {(String)null + (String)null == "nullnull"} } {FAIL}
The null literal is NOT a compile-time constantTest Case: 15.28-null-6Expected Result: FAIL
Regression Test:
tcltest::test 15.28-null-5 { The null literal is NOT a compile-time constant } { empty_class T1528null5 { static final String s = null; void foo(int i) { switch (i) { case 0: case (("" != s) ? 1 : 0): } } } } {FAIL}
The null literal is NOT a compile-time constantTest Case: 15.28-null-7Expected Result: FAIL
Regression Test:
tcltest::test 15.28-null-6 { The null literal is NOT a compile-time constant } { empty_class T1528null6 { void foo(int i) { final String s = null; switch (i) { case 0: case (("" != s) ? 1 : 0): } } } } {FAIL}
The null literal is NOT a compile-time constantTest Case: 15.28-example-1Expected Result: FAIL
Regression Test:
tcltest::test 15.28-null-7 { The null literal is NOT a compile-time constant } { constant_expression T1528null7 {"" + (true ? null : null) == "null"} } {FAIL}
Example constantsTest Case: 15.28-example-2Expected Result: PASS
Regression Test:
tcltest::test 15.28-example-1 { Example constants } { constant_expression T1528e1 {true} {(short)(1*2*3*4*5*6) == 720} {Integer.MAX_VALUE / 2 == 0x3fffffff} {2.0 * Math.PI == 6.283185307179586} } {PASS}
Example constantTest Case: 15.28-instanceof-1Expected Result: PASS
Regression Test:
tcltest::test 15.28-example-2 { Example constant } { constant_expression T1528e2 {"The integer " + Long.MAX_VALUE + " is mighty big." == "The integer 9223372036854775807 is mighty big."} } {PASS}
The expression argument of instanceof may be constantExpected Result: FAIL
Regression Test:
tcltest::test 15.28-instanceof-1 { The expression argument of instanceof may be constant } { constant_expression T1528i1 {null instanceof Object} } {FAIL}
tests/jls/definite-assignment/statements/if-statements
A blank final initialized inside an if (true) block is definitely assigned.Test Case: 16.2.7-final-2Expected Result: PASS
Regression Test:
tcltest::test 16.2.7-final-1 { A blank final initialized inside an if (true) block is definitely assigned. } { compile [saveas T1627f1.java { public class T1627f1 { final int val; T1627f1() { if (true) { val = 1; } } } }] } {PASS}
A blank final initialized inside an if (false) block is not definitely assigned.Test Case: 16.2.7-final-3Expected Result: FAIL
Regression Test:
tcltest::test 16.2.7-final-2 { A blank final initialized inside an if (false) block is not definitely assigned. } { compile [saveas T1627f2.java { public class T1627f2 { final int val; T1627f2() { if (false) { val = 0; } } } }] } {FAIL}
A final variable must be definitely unassigned if it is to be assigned inside an if (true) block.Test Case: 16.2.7-final-4Expected Result: FAIL
Regression Test:
tcltest::test 16.2.7-final-3 { A final variable must be definitely unassigned if it is to be assigned inside an if (true) block. } { compile [saveas T1627f3.java { public class T1627f3 { final int val = 0; T1627f3() { if (true) { val = 1; } } } }] } {FAIL}
A final variable must be definitely unassigned if it is to be assigned inside an if (false) block.Test Case: 16.2.7-final-5Expected Result: FAIL
Regression Test:
tcltest::test 16.2.7-final-4 { A final variable must be definitely unassigned if it is to be assigned inside an if (false) block. } { compile [saveas T1627f4.java { public class T1627f4 { final int val = 0; T1627f4() { if (false) { val = 1; } } } }] } {FAIL}
A final variable must be definitely unassigned when an assignment to it occurs. A blank final assigned inside an if (true) block is definitely assigned, so a second assignment fails.Test Case: 16.2.7-final-6Expected Result: FAIL
Regression Test:
tcltest::test 16.2.7-final-5 { A final variable must be definitely unassigned when an assignment to it occurs. A blank final assigned inside an if (true) block is definitely assigned, so a second assignment fails. } { compile [saveas T1627f5.java { public class T1627f5 { final int val; T1627f5() { if (true) { val = 1; } val = 0; } } }] } {FAIL}
A final variable must be definitely unassigned when an assignment to it occurs. A blank final assigned inside an if (false) block is not definitely assigned but it is also not definitely unassigned.Test Case: 16.2.7-scope-1Expected Result: FAIL
Regression Test:
tcltest::test 16.2.7-final-6 { A final variable must be definitely unassigned when an assignment to it occurs. A blank final assigned inside an if (false) block is not definitely assigned but it is also not definitely unassigned. } { compile [saveas T1627f6.java { public class T1627f6 { final int val; T1627f6() { if (false) { val = 1; } val = 0; } } }] } {FAIL}
A final variable in one scope should not effect a final variable in the enclosing scopeTest Case: 16.2.7-scope-2Expected Result: PASS
Regression Test:
tcltest::test 16.2.7-scope-1 { A final variable in one scope should not effect a final variable in the enclosing scope } { empty_main T1627s1 { if (true) { final int i = 1; } final int j; j = 2; } } {PASS}
A final variable in one scope should not effect a final variable in the enclosing scopeExpected Result: PASS
Regression Test:
tcltest::test 16.2.7-scope-2 { A final variable in one scope should not effect a final variable in the enclosing scope } { empty_main T1627s2 { if (true) { final int i = 1; } final int i; i = 2; } } {PASS}
tests/jls/definite-assignment/statements/switch-statements
A blank final may be assigned in different block statement groups, provided it not assigned twiceTest Case: 16.2.8-final-2Expected Result: PASS
Regression Test:
tcltest::test 16.2.8-final-1 { A blank final may be assigned in different block statement groups, provided it not assigned twice } { switch_labels T1628f1 int { case 0: final byte b = 0; break; case 1: b = 1; } } {PASS}
A final may be assigned in different block statement groups, provided it not assigned twiceTest Case: 16.2.8-final-3Expected Result: PASS
Regression Test:
tcltest::test 16.2.8-final-2 { A final may be assigned in different block statement groups, provided it not assigned twice } { switch_labels T1628f2 int { case 0: final int b; b = 0; break; case 1: b = 1; } } {PASS}
A final may be assigned in different block statement groups, provided it not assigned twice. The variable is assigned if the case block falls through after an assignmentTest Case: 16.2.8-unassigned-1Expected Result: PASS
Regression Test:
tcltest::test 16.2.8-final-3 { A final may be assigned in different block statement groups, provided it not assigned twice. The variable is assigned if the case block falls through after an assignment } { switch_labels T1628f3 int { case 0: final byte b = 0; break; case 1: b = 1; case 2: byte c = b; } } {PASS}
A variable must have been assigned in each switch block if it is going to be accessedTest Case: 16.2.8-unassigned-2Expected Result: FAIL
Regression Test:
tcltest::test 16.2.8-unassigned-1 { A variable must have been assigned in each switch block if it is going to be accessed } { switch_labels T1628u1 int { case 0: byte b = 0; break; default: b++; } } {FAIL}
A variable that is not definitely assigned before entering the switch must be definitely assigned in each switch block if it is to be definitely assigned after the switch blockTest Case: 16.2.8-unassigned-3Expected Result: PASS
Regression Test:
tcltest::test 16.2.8-unassigned-2 { A variable that is not definitely assigned before entering the switch must be definitely assigned in each switch block if it is to be definitely assigned after the switch block } { compile [saveas T1628u2.java { class T1628u2 { void foo(int i) { int j; switch (i) { case 0: j = 0; break; case 1: j = 1; break; default: j = 2; break; } j++; } } }] } {PASS}
A variable that is not definitely assigned before entering the switch must be definitely assigned in each switch block if it is to be definitely assigned after the switch blockTest Case: 16.2.8-unassigned-4Expected Result: FAIL
Regression Test:
tcltest::test 16.2.8-unassigned-3 { A variable that is not definitely assigned before entering the switch must be definitely assigned in each switch block if it is to be definitely assigned after the switch block } { compile [saveas T1628u3.java { class T1628u3 { void foo(int i) { int j; switch (i) { case 0: j = 0; break; case 1: break; default: j = 2; break; } j++; } } }] } {FAIL}
A variable that is not definitely assigned before entering the switch must be definitely assigned in each switch block (including the default block) if it is to be definitely assigned after the switch blockTest Case: 16.2.8-unassigned-5Expected Result: FAIL
Regression Test:
tcltest::test 16.2.8-unassigned-4 { A variable that is not definitely assigned before entering the switch must be definitely assigned in each switch block (including the default block) if it is to be definitely assigned after the switch block } { compile [saveas T1628u4.java { class T1628u4 { void foo(int i) { int j; switch (i) { case 0: j = 0; break; case 1: j = 0; break; } j++; } } }] } {FAIL}
Switch blocks that fall through to default: that definitely assigns a variable ensures that the variable is definitely assigned after the switchTest Case: 16.2.8-unassigned-6Expected Result: PASS
Regression Test:
tcltest::test 16.2.8-unassigned-5 { Switch blocks that fall through to default: that definitely assigns a variable ensures that the variable is definitely assigned after the switch } { compile [saveas T1628u5.java { class T1628u5 { void foo(int i) { int j; switch (i) { case 0: case 1: default: j = 0; } j++; } } }] } {PASS}
A final local variable within a switch statement can't be used in a switch label, since it must be treated as a blank final in each switch blockTest Case: 16.2.8-unassigned-7Expected Result: FAIL
Regression Test:
tcltest::test 16.2.8-unassigned-6 { A final local variable within a switch statement can't be used in a switch label, since it must be treated as a blank final in each switch block } { switch_labels T1628u6 int { case 0: final byte b = 1; break; case b: } } {FAIL}
A final local variable scoped to the switch statement can't be used as a case label because it is unassigned when the switch statement is entered. This test might incorrectly pass if the compiler returns FAIL because of the second assignment to b.Expected Result: FAIL
Regression Test:
tcltest::test 16.2.8-unassigned-7 { A final local variable scoped to the switch statement can't be used as a case label because it is unassigned when the switch statement is entered. This test might incorrectly pass if the compiler returns FAIL because of the second assignment to b. } { switch_labels T1628u7 int { case 0: final byte b = 1; break; case b: b = 0; } } {FAIL}
tests/runtime/jls/lexical-structure/literals/string-literals
Compile-time constant string expressions, and String.intern(), are == String objectsTest Case: 3.10.5-runtime-2Expected Result: true true true true false true
Regression Test:
tcltest::test 3.10.5-runtime-1 { Compile-time constant string expressions, and String.intern(), are == String objects } { saveas testPackage/T3105r1.java { package testPackage; class T3105r1 { public static void main(String[] args) { String hello = "Hello", lo = "lo"; System.out.print((hello == "Hello") + " "); System.out.print((Other1.hello == hello) + " "); System.out.print((other.Other.hello == hello) + " "); System.out.print((hello == ("Hel"+"lo")) + " "); System.out.print((hello == ("Hel"+lo)) + " "); System.out.print(hello == ("Hel"+lo).intern()); } } class Other1 { static String hello = "Hello"; } } saveas other/Other.java { package other; public class Other { public static String hello = "Hello"; } } compile_and_run other/Other.java testPackage/T3105r1.java } {true true true true false true}
Strings that occupy more than 0xffff UTF8 bytes cannot be constant, according to JVMS. However, since the JLS does not require compile-time failure, we must also test for an invalid constant pool entryExpected Result: OK
Regression Test:
tcltest::test 3.10.5-runtime-2 { Strings that occupy more than 0xffff UTF8 bytes cannot be constant, according to JVMS. However, since the JLS does not require compile-time failure, we must also test for an invalid constant pool entry } { compile_and_run [saveas T3105r2.java { class T3105r2 { static final String s0001 = "a"; static final String s0002 = s0001 + s0001; static final String s0004 = s0002 + s0002; static final String s0008 = s0004 + s0004; static final String s0010 = s0008 + s0008; static final String s0020 = s0010 + s0010; static final String s0040 = s0020 + s0020; static final String s0080 = s0040 + s0040; static final String s0100 = s0080 + s0080; static final String s0200 = s0100 + s0100; static final String s0400 = s0200 + s0200; static final String s0800 = s0400 + s0400; static final String s1000 = s0800 + s0800; static final String s2000 = s1000 + s1000; static final String s4000 = s2000 + s2000; static final String s8000 = s4000 + s4000; static final String sffff = s8000 + s4000 + s2000 + s1000 + s0800 + s0400 + s0200 + s0100 + s0080 + s0040 + s0020 + s0010 + s0008 + s0004 + s0002 + "b"; // still constant! static final String toobig = sffff + "c"; // can't be constant public static void main(String[] args) { if (toobig.equals("")) System.out.println("String was lost completely"); else if (toobig.endsWith("b")) System.out.println("String was truncated at 0xffff bytes"); else if (toobig.endsWith("abc")) { String alternate = sffff; alternate += "c"; alternate = alternate.intern(); if (alternate != toobig) System.out.println("String was not interned"); else System.out.println("OK"); } else System.out.println("Unexpected case"); } } }] } {OK}
tests/runtime/jls/classes/constructor-declarations/default-constructor
If a class contains no constructor declarations, then a default constructor that takes no parameters and invokes the superclass constructor with no arguments is providedTest Case: 8.8.7-runtime-default-2Expected Result: super main
Regression Test:
tcltest::test 8.8.7-runtime-default-1 { If a class contains no constructor declarations, then a default constructor that takes no parameters and invokes the superclass constructor with no arguments is provided } { saveas T887rd1.java { class T887rd1_super { T887rd1_super() { System.out.print("super "); } } public class T887rd1 extends T887rd1_super { public static void main(String[] argv) { new T887rd1(); System.out.print("main"); } } } compile_and_run T887rd1.java } {super main}
If a class contains no constructor declarations, then a default constructor that takes no parameters and invokes the superclass constructor with no arguments is providedTest Case: 8.8.7-runtime-default-3Expected Result: super super main
Regression Test:
tcltest::test 8.8.7-runtime-default-2 { If a class contains no constructor declarations, then a default constructor that takes no parameters and invokes the superclass constructor with no arguments is provided } { saveas T887rd2.java { class T887rd2_super { T887rd2_super() { System.out.print("super "); } } public class T887rd2 extends T887rd2_super { public static void main(String[] argv) { new T887rd2().toString(); (new T887rd2()).toString(); System.out.print("main"); } } } compile_and_run T887rd2.java } {super super main}
If a class contains no constructor declarations, then a default constructor that takes no parameters and invokes the superclass constructor with no arguments is providedExpected Result: super + super main
Regression Test:
tcltest::test 8.8.7-runtime-default-3 { If a class contains no constructor declarations, then a default constructor that takes no parameters and invokes the superclass constructor with no arguments is provided } { saveas T887rd3.java { class T887rd3_super { T887rd3_super() { System.out.print("super "); } } public class T887rd3 { private static class Inner extends T887rd3_super {} public static void main(String[] argv) { new Inner().toString(); System.out.print("+ "); (new Inner()).toString(); System.out.print("main"); } } } compile_and_run T887rd3.java } {super + super main}
tests/runtime/jls/execution/creation-of-new-class-instances
Variable initializers are executed after the explicit or implicit superclass constructor, but before all other statements of the constructorTest Case: 12.5-runtime-2Expected Result: A 1 1
Regression Test:
tcltest::test 12.5-runtime-1 { Variable initializers are executed after the explicit or implicit superclass constructor, but before all other statements of the constructor } { compile_and_run [saveas T125r1.java { class Super { Super(int x) { method(x); } void method(int x) { } } class T125r1 extends Super { private int i1 = 1; private Integer i2 = new Integer(1); void method(int x) { i1 = x; i2 = new Integer(x); System.out.print("A "); } T125r1() { super(2); // superclass calls method() } public static void main(String[] args) { T125r1 t = new T125r1(); System.out.print(t.i1 + " " + t.i2); } } }] } {A 1 1}
Example in JLSExpected Result: 03
Regression Test:
tcltest::test 12.5-runtime-2 { Example in JLS } { compile_and_run [saveas T125r2.java { class Super { Super() { printThree(); } void printThree() { System.out.println("three"); } } class T125r2 extends Super { int three = (int)Math.PI; // That is, 3 public static void main(String[] args) { T125r2 t = new T125r2(); t.printThree(); } void printThree() { System.out.print(three); } } }] } {03}
tests/runtime/jls/blocks-and-statements
Generic test of large goto_w (can occur in for, if, while, do, switch, try, break, and continue)Expected Result: OK
Regression Test:
tcltest::test 14-runtime-jump-1 { Generic test of large goto_w (can occur in for, if, while, do, switch, try, break, and continue) } { set class_data " class T14rj1 \{ public static void main(String\[\] args) \{ int i = 1; for (int j = 0; j < 2; j++) \{\n" set count 0 while {$count < 3500} { append class_data "\t i = 366 * i % 534;\n" incr count } append class_data "\t\} if (i == 210) System.out.print(\"OK\"); else System.out.print(\"FAIL\"); \} \}\n" compile_and_run [saveas T14rj1.java $class_data] } {OK}
tests/runtime/jls/blocks-and-statements/switch-statement
runtime switch test for values between 0x7ffffff0 and 0x7fffffffTest Case: 14.10-runtime-fallthrough-1Expected Result: OK
Regression Test:
tcltest::test 14.10-runtime-verifier-1 { runtime switch test for values between 0x7ffffff0 and 0x7fffffff } { compile_and_run [saveas T1410v1.java { class T1410v1 { public static void main(String [] args) { // prevent compiler optimization of switch by using args.length switch (args.length + 0x7ffffff2) { case 0x7ffffff0: case 0x7ffffff1: case 0x7ffffff2: case 0x7ffffff3: System.out.print("OK"); break; default: System.out.print("NOT_OK"); } } } }] } {OK}
runtime test for fallthrough of casesTest Case: 14.10-runtime-fallthrough-2Expected Result: many too many one too many
Regression Test:
tcltest::test 14.10-runtime-fallthrough-1 { runtime test for fallthrough of cases } { compile_and_run [saveas T1410f1.java { class T1410f1 { static void howMany(int k) { switch (k) { case 1: System.out.print("one "); case 2: System.out.print("too "); case 3: System.out.println("many"); } } public static void main(String[] args) { howMany(3); howMany(2); howMany(1); } } }] } {many too many one too many }
runtime test for break stopping fallthroughTest Case: 14.10-runtime-local-1Expected Result: one two many
Regression Test:
tcltest::test 14.10-runtime-fallthrough-2 { runtime test for break stopping fallthrough } { compile_and_run [saveas T1410f2.java { class T1410f2 { static void howMany(int k) { switch (k) { case 1: System.out.println("one"); break; // exit the switch case 2: System.out.println("two"); break; // exit the switch case 3: System.out.println("many"); break; // not needed, but good style } } public static void main(String[] args) { howMany(1); howMany(2); howMany(3); } } }] } {one two many }
in a switch, local finals should behave like blanks, not compile-time constantsExpected Result: 1
Regression Test:
tcltest::test 14.10-runtime-local-1 { in a switch, local finals should behave like blanks, not compile-time constants } { compile_and_run [saveas T1410l1.java { class T1410l1 { public static void main(String[] args) { switch (args.length + 1) { case 0: final int i = 0; break; case 1: i = 1; System.out.print(i); } } } }] } {1}
tests/runtime/jls/blocks-and-statements/try-statement/try-catch-finally
runtime try catch finally test with synchronize statementTest Case: 14.19.2-runtime-jump-1Expected Result: OK
Regression Test:
tcltest::test 14.19.2-runtime-try-1 { runtime try catch finally test with synchronize statement } { compile_and_run [saveas T14192rt1.java { class T14192rt1 { public static void main(String [] args) { Object o = new Object(); try { synchronized (o) { System.out.print("O"); return; } } finally { try { raise(); } catch (Exception e) { System.out.print("K"); } } } public static void raise() throws Exception { throw new Exception(); } } }] } {OK}
test of jsr_wExpected Result: OK
Regression Test:
tcltest::test 14.19.2-runtime-jump-1 { test of jsr_w } { set class_data " class T14192rj1 \{ public static void main(String\[\] args) \{ int i = 1; try \{ if (i == 0) throw new Exception(); return; \} catch (Exception e) \{\n" set count 0 while {$count < 3500} { append class_data "\t i = 366 * i % 534;\n" incr count } append class_data "\t\} finally \{ if (i == 1) System.out.print(\"OK\"); else System.out.print(\"FAIL\"); \} \} \}\n" compile_and_run [saveas T14192rj1.java $class_data] } {OK}
tests/runtime/jls/expressions/class-instance-creation
Check the number of times a constructor is called from a class instance creation expressionExpected Result: ctor -> ctor
Regression Test:
tcltest::test 15.9-runtime-numcalls-1 { Check the number of times a constructor is called from a class instance creation expression } { compile_and_run [saveas T159rn1.java { class T159rn1 { private static class Inner { public Inner() { System.err.print("ctor"); } private void foo() {} } public static void main(String[] args) { new Inner().foo(); // broken in Jikes 1.11 System.err.print(" -> "); (new Inner()).foo(); // okay } } }] } {ctor -> ctor}
tests/runtime/jls/expressions/method-invocation-expressions/chosen-method-appropriate
The invocation mode of a non-static, non-private method is virtualExpected Result: 3 3
Regression Test:
tcltest::test 15.12.3-runtime-mode-1 { The invocation mode of a non-static, non-private method is virtual } { saveas p1/T15123rm1_1.java { package p1; public class T15123rm1_1 { protected void foo() { // this is overridden in T15123rm1_3 System.out.print("1"); } } } saveas p2/T15123rm1_2.java { package p2; import p1.*; public class T15123rm1_2 extends T15123rm1_1 { protected void call() { foo(); // must be virtual call System.out.print(' '); new Object() { { foo(); } // must be virtual call of enclosing instance }; } } } saveas p3/T15123rm1_3.java { package p3; import p2.*; public class T15123rm1_3 extends T15123rm1_2 { public static void main(String[] args) { new T15123rm1_3().call(); } protected void foo() { // will be called virtually System.out.print("3"); } } } compile_and_run -classpath . p1/T15123rm1_1.java p2/T15123rm1_2.java p3/T15123rm1_3.java } {3 3}
tests/runtime/jls/expressions/postfix-expressions
Postfix ops have higher precedence than prefixTest Case: 15.14-runtime-2Expected Result: true true true
Regression Test:
tcltest::test 15.14-runtime-1 { Postfix ops have higher precedence than prefix } { compile_and_run [saveas T15141.java { class T15141 { public static void main(String[] args) { int a = 1, b = 1; System.out.print((-a++ == -1) + " "); System.out.print((-(b++) == -1) + " "); System.out.print(a == b); } } }] } {true true true}
Postfix ops have higher precedence than prefixExpected Result: true true true
Regression Test:
tcltest::test 15.14-runtime-2 { Postfix ops have higher precedence than prefix } { compile_and_run [saveas T15142.java { class T15142 { public static void main(String[] args) { int a = 2, b = 2; System.out.print((-a-- == -2) + " "); System.out.print((-(b--) == -2) + " "); System.out.print(a == b); } } }] } {true true true}
tests/runtime/jls/expressions/unary-operators
Prefix ops have higher precedence than multiplicativeTest Case: 15.15-runtime-2Expected Result: true true true
Regression Test:
tcltest::test 15.15-runtime-1 { Prefix ops have higher precedence than multiplicative } { compile_and_run [saveas T15151.java { class T15151 { public static void main(String[] args) { int a = 1, b = 1; System.out.print((++a*a == 4) + " "); System.out.print(((++b)*b == 4) + " "); System.out.print(a == b); } } }] } {true true true}
Prefix ops have higher precedence than multiplicativeExpected Result: true true true
Regression Test:
tcltest::test 15.15-runtime-2 { Prefix ops have higher precedence than multiplicative } { compile_and_run [saveas T15152.java { class T15152 { public static void main(String[] args) { int a = 3, b = 3; System.out.print((--a*a == 4) + " "); System.out.print(((--b)*b == 4) + " "); System.out.print(a == b); } } }] } {true true true}
tests/runtime/jls/expressions/additive-operators/string-conversion
"" + char[] should behave the same as char[].toString()Expected Result: OK
Regression Test:
tcltest::test 15.18.1.1-runtime-1 { "" + char[] should behave the same as char[].toString() } { compile_and_run [saveas T151811r1.java { class T151811r1 { public static void main(String args[]) { char[] c = {'w','r','o','n','g'}; String s = "" + c; if (s.equals(c.toString())) System.out.print("OK"); else System.out.print("WRONG"); } } }] } {OK}
tests/runtime/jls/expressions/assignment-operators/compound-assignment-operators
String += char[] should do same as s += char[].toString()Expected Result: OK
Regression Test:
tcltest::test 15.26.2-runtime-1 { String += char[] should do same as s += char[].toString() } { compile_and_run [saveas T15262r1.java { class T15262r1 { public static void main(String args[]) { String s = ""; char[] c = {'w','r','o','n','g'}; s += c; if (s.equals(c.toString())) System.out.print("OK"); else System.out.print("WRONG"); } } }] } {OK}
tests/non-jls/argument-expansion
Under Windows, the compiler should expand command line argumentsTest Case: non-jls-argument-expansion-2Expected Result: PASS
Regression Test:
tcltest::test non-jls-argument-expansion-1 { Under Windows, the compiler should expand command line arguments } { compile *.java } {PASS}
The @ symbol indicates that the compiler should read file names from the given fileTest Case: non-jls-argument-expansion-3Expected Result: PASS
Regression Test:
tcltest::test non-jls-argument-expansion-2 { The @ symbol indicates that the compiler should read file names from the given file} { saveas list2 "C1.java" compile @list2 } {PASS}
EOL chars in @ file argumentTest Case: non-jls-argument-expansion-4Expected Result: PASS
Regression Test:
tcltest::test non-jls-argument-expansion-3 { EOL chars in @ file argument } { saveas list3 "C1.java\nC2.java" compile @list3 } {PASS}
EOL chars in @ file argumentTest Case: non-jls-argument-expansion-5Expected Result: PASS
Regression Test:
tcltest::test non-jls-argument-expansion-4 { EOL chars in @ file argument } { saveas list4 "C1.java\r\nC2.java" compile @list4 } {PASS}
EOL chars in @ file argumentTest Case: non-jls-argument-expansion-6Expected Result: PASS
Regression Test:
tcltest::test non-jls-argument-expansion-5 { EOL chars in @ file argument } { saveas list5 "C1.java\rC2.java" compile @list5 } {PASS}
Empty line in @ file argumentTest Case: non-jls-argument-expansion-7Expected Result: PASS
Regression Test:
tcltest::test non-jls-argument-expansion-6 { Empty line in @ file argument } { saveas list6 "C1.java\n\rC2.java" compile @list6 } {PASS}
Spaces in a @ argument file should not cause the compile to failTest Case: non-jls-argument-expansion-8Expected Result: PASS
Regression Test:
tcltest::test non-jls-argument-expansion-7 { Spaces in a @ argument file should not cause the compile to fail } { saveas list7 "C1.java \n C2.java " compile @list7 } {PASS}
Tabs in a @ argument file should not cause the compile to failTest Case: non-jls-argument-expansion-9Expected Result: PASS
Regression Test:
tcltest::test non-jls-argument-expansion-8 { Tabs in a @ argument file should not cause the compile to fail } { saveas list8 "\tC1.java\nC2.java\t" compile @list8 } {PASS}
Tabs and spaces in a @ argument file should not cause the compile to failTest Case: non-jls-argument-expansion-10Expected Result: PASS
Regression Test:
tcltest::test non-jls-argument-expansion-9 { Tabs and spaces in a @ argument file should not cause the compile to fail } { saveas list9 "\t C1.java \n C2.java \t" compile @list9 } {PASS}
Tabs and spaces in empty line of a @ argument should be ignoredTest Case: non-jls-argument-expansion-11Expected Result: PASS
Regression Test:
tcltest::test non-jls-argument-expansion-10 { Tabs and spaces in empty line of a @ argument should be ignored } { saveas list10 "C1.java\n\t \nC2.java" compile @list10 } {PASS}
Expand empty @ argument. this will terminate without doing anything for JDK 1.3 compatibilityTest Case: non-jls-argument-expansion-12Expected Result: PASS
Regression Test:
tcltest::test non-jls-argument-expansion-11 { Expand empty @ argument. this will terminate without doing anything for JDK 1.3 compatibility } { saveas list11 "" compile @list11 } {PASS}
Expand empty @ argumentTest Case: non-jls-argument-expansion-13Expected Result: PASS
Regression Test:
tcltest::test non-jls-argument-expansion-12 { Expand empty @ argument } { saveas list12 "\n\n" compile @list12 } {PASS}
Expand empty @ argumentTest Case: non-jls-argument-expansion-14Expected Result: PASS
Regression Test:
tcltest::test non-jls-argument-expansion-13 { Expand empty @ argument } { saveas list13 "" compile C1.java @list13 } {PASS}
Error: Same class compiled twiceTest Case: non-jls-argument-expansion-15Expected Result: FAIL
Regression Test:
tcltest::test non-jls-argument-expansion-14 { Error: Same class compiled twice } { saveas list14 "C1.java" compile C1.java @list14 } {FAIL}
Error: Same class compiled twiceExpected Result: FAIL
Regression Test:
tcltest::test non-jls-argument-expansion-15 { Error: Same class compiled twice } { saveas list15 "C1.java C1.java" compile @list15 } {FAIL}
tests/non-jls/encoding
works with the cp437 encodingTest Case: non-jls-encoding-2Expected Result: PASS
Regression Test:
tcltest::test non-jls-encoding-1 { works with the cp437 encoding } { constant_encoded_expression E1 cp437 \x84 {\u00e4} } {PASS}
same character in utf-8Test Case: non-jls-encoding-3Expected Result: PASS
Regression Test:
tcltest::test non-jls-encoding-2 { same character in utf-8 } { constant_encoded_expression E2 utf-8 \xC3\xA4 {\u00e4} } {PASS}
257 is out of the ASCII range, but in 8859-1 it is defined as lower case a with macron from Latin Extended-ATest Case: non-jls-encoding-4Expected Result: PASS
Regression Test:
tcltest::test non-jls-encoding-3 { 257 is out of the ASCII range, but in 8859-1 it is defined as lower case a with macron from Latin Extended-A } { constant_encoded_expression E3 ISO-8859-4 \xE0 {\u0101} } {PASS}
same character in utf-8Test Case: non-jls-encoding-5Expected Result: PASS
Regression Test:
tcltest::test non-jls-encoding-4 { same character in utf-8 } { constant_encoded_expression E4 utf-8 \xC4\x81 {\u0101} } {PASS}
65533 (FFFD) is the last symbol in "Specials" categoryExpected Result: PASS
Regression Test:
tcltest::test non-jls-encoding-5 { 65533 (FFFD) is the last symbol in "Specials" category } { constant_encoded_expression E5 utf-8 \xEF\xBF\xBD {\uFFFD} } {PASS}
tests/non-jls/random-crashers
crashExpected Result: PASS
Regression Test:
tcltest::test non-jls-random-crashers-1 { crash } { saveas I.java { public interface I { int hashCode(); } } saveas I2.java { interface I2 extends I { } } compile I.java I2.java } {PASS}
tests/gcj
test case for gcj PR198Expected Result: PASS
Regression Test:
tcltest::test gcj-PR198 { test case for gcj PR198 } { compile PR198.java } {PASS}
tests/jikes/jls/packages/import-declarations/type-import-on-demand-declaration
Check the error message printed by Jikes when a package of a given given name can not be foundExpected Result: FAIL 1
Regression Test:
tcltest::test 7.5.2-jikes-package-not-found-1 { Check the error message printed by Jikes when a package of a given given name can not be found } { saveas T752pnf1.java { import pkg.not.found.*; class NotFound {} } list [compile -classpath /notadir T752pnf1.java] [match_err_or_warn "*Error: Could not find package \"pkg/not/found\" in:\n*notadir\n*"] } {FAIL 1}
tests/jikes/jls/classes/method-declarations/method-body
see if jikes output is mangled by a typo in src/error.cppExpected Result: FAIL 1
Regression Test:
tcltest::test 8.4.5-jikes-1 { see if jikes output is mangled by a typo in src/error.cpp } { saveas MangleJikesOutputNoReturn.java { class MangleJikesOutputNoReturn { boolean processCommand(String s) {} } } list [compile MangleJikesOutputNoReturn.java] [match_err_or_warn "*Error:*contain a return statement with an expression compatible*"] } {FAIL 1}
tests/jikes/jls/classes/constructor-declarations/constructor-body/explicit-constructor-invocations
An ExplicitConstructorInvocation must appear before the optional BlockStatementsTest Case: 8.8.5.1-jikes-before-block-statements-2Expected Result: FAIL 1
Regression Test:
tcltest::test 8.8.5.1-jikes-before-block-statements-1 { An ExplicitConstructorInvocation must appear before the optional BlockStatements } { list [empty_class T8851jbb1 { T8851jbb1() {} T8851jbb1(int i) { i = 0; this(); } }] [match_err_or_warn "*Error:* first statement in constructor*"] } {FAIL 1}
An ExplicitConstructorInvocation must appear before the optional BlockStatementsExpected Result: FAIL 1
Regression Test:
tcltest::test 8.8.5.1-jikes-before-block-statements-2 { An ExplicitConstructorInvocation must appear before the optional BlockStatements } { list [empty_class T8851jbb2 { T8851jbb2() {} T8851jbb2(int i) { i = 0; super(); } }] [match_err_or_warn "*Error:* first statement in constructor*"] } {FAIL 1}
tests/jikes
jikes should fail but not core dump on this dependencyTest Case: jikes-2Expected Result: FAIL
Regression Test:
tcltest::test jikes-1 { jikes should fail but not core dump on this dependency } { saveas BrokenDependency.java { import a_package_that_can_not_be_found.Two; public class BrokenDependency { void foo() { Object o = new Two(); } } } # Cleanup the .u file that is produced cleanup BrokenDependency.u compile -d . +M BrokenDependency.java } {FAIL}
warn on try block that may not be reachedExpected Result: WARN
Regression Test:
tcltest::test jikes-2 { warn on try block that may not be reached } { compile [saveas T1.java { class T1 { void foo() { try { int i = 0; } catch (Exception e) {} } } }] } {WARN}