[8]:langtools javac lambda test fails on a French platform: fixes provided as hg diff

Francis ANDRE francis.andre.kampbell at orange.fr
Sat Nov 30 07:42:58 PST 2013


Hi

The following tests are failing on a French platform because the decimal 
separator is ',' in French instead of "." in US. Setting the default locale to 
US fixes the issue.

tools/javac/lambda/lambdaExecution/LambdaTranslationTest1.java
tools/javac/lambda/lambdaExecution/LambdaTranslationTest2.java


Francis

Here are the fixes
diff --git a/test/tools/javac/lambda/lambdaExecution/LambdaTranslationTest1.java 
b/test/tools/javac/lambda/lambdaExecution/LambdaTranslationTest1.java
--- a/test/tools/javac/lambda/lambdaExecution/LambdaTranslationTest1.java
+++ b/test/tools/javac/lambda/lambdaExecution/LambdaTranslationTest1.java
@@ -30,12 +30,19 @@
   * @run testng LambdaTranslationTest1
   */

-import org.testng.annotations.Test;
+import java.util.Locale;
+
+import org.testng.annotations.*;

  import static org.testng.Assert.assertEquals;

+
  @Test
  public class LambdaTranslationTest1 extends LT1Sub {
+     @BeforeClass
+     public void setUp() {
+       Locale.setDefault(Locale.US);
+     }

      String cntxt = "blah";

diff --git a/test/tools/javac/lambda/lambdaExecution/LambdaTranslationTest2.java 
b/test/tools/javac/lambda/lambdaExecution/LambdaTranslationTest2.java
--- a/test/tools/javac/lambda/lambdaExecution/LambdaTranslationTest2.java
+++ b/test/tools/javac/lambda/lambdaExecution/LambdaTranslationTest2.java
@@ -30,10 +30,12 @@
   * @run testng LambdaTranslationTest2
   */

+import org.testng.annotations.BeforeClass;
  import org.testng.annotations.Test;

  import java.util.ArrayList;
  import java.util.List;
+import java.util.Locale;

  import static org.testng.Assert.assertEquals;
  import static org.testng.Assert.assertTrue;
@@ -44,6 +46,10 @@

  @Test
  public class LambdaTranslationTest2 {
+     @BeforeClass
+     public void setUp() {
+       Locale.setDefault(Locale.US);
+     }

      final String dummy = "dummy";



Here the log of the tests
--------------------------------------------------
TEST: tools/javac/lambda/lambdaExecution/LambdaTranslationTest1.java
JDK under test: 
(Z:\JDK\jdk8\build\windows-x86-normal-server-release\images\j2sdk-image)
openjdk version "1.8.0-internal"
OpenJDK Runtime Environment (build 1.8.0-internal-francisandre_2013_11_30_08_32-b00)
OpenJDK Server VM (build 25.0-b60, mixed mode)



ACTION: build -- Passed. Build successful
REASON: Named class compiled on demand
TIME:   0.157 seconds
messages:
command: build LambdaTranslationTest1
reason: Named class compiled on demand
elapsed time (seconds): 0.157

ACTION: compile -- Passed. Compilation successful
REASON: .class file out of date or does not exist
TIME:   0.157 seconds
messages:
command: compile -XDignore.symbol.file=true 
Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution\LambdaTranslationTest1.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.157
rerun:
'PATH=C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program 
Files\Microsoft Visual Studio 10.0\VC\BIN;C:\Program Files\Microsoft Visual 
Studio 
10.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\Program 
Files\Microsoft Visual Studio 10.0\VC\VCPackages;C:\Program Files\HTML Help 
Workshop;C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 
Tools;C:\Program Files\Microsoft 
SDKs\Windows\v7.0A\bin;C:\cygwin\usr\local\bin;C:\cygwin\bin;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS\System32\Wbem;C:\Program 
Files\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files\Microsoft Visual 
Studio 10.0\VC\BIN;C:\Program Files\Microsoft Visual Studio 
10.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program 
Files\Microsoft Visual Studio 10.0\VC\VCPackages;C:\Program Files\Microsoft 
SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools;C:\Program Files\Microsoft 
SDKs\Windows\v7.0A\bin;C:\Program Files\Apache Software 
Foundation\apache-ant-1.8.4\bin;C:\Program Files\Apache Software 
Foundation\apache-maven-3.0.3\bin' \
SystemDrive=C: \
'SystemRoot=C:\WINDOWS' \
'TEMP=C:\cygwin\tmp' \
'TMP=C:\cygwin\tmp' \
'windir=C:\WINDOWS' \
'Z:\JDK\jdk8\build\windows-x86-normal-server-release\images\j2sdk-image\bin\javac' \
         -J-Xmx768m \
         -J-Dtest.vm.opts=-Xmx768m \
-J-Dtest.class.path.prefix='Z:\JDK\jdk8\langtools\build\windows-i586\test\langtools\jtreg\JTwork\classes\0\tools\javac\lambda\lambdaExecution;Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution' 
\
-J-Dtest.jdk='Z:\JDK\jdk8\build\windows-x86-normal-server-release\images\j2sdk-image' 
\
         -J-Dtest.timeout.factor=1.0 \
-J-Dtest.src.path='Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution' \
         -J-Dtest.compiler.opts= \
-J-Dcompile.jdk='Z:\JDK\jdk8\build\windows-x86-normal-server-release\images\j2sdk-image' 
\
-J-Dtest.classes='Z:\JDK\jdk8\langtools\build\windows-i586\test\langtools\jtreg\JTwork\classes\0\tools\javac\lambda\lambdaExecution' 
\
-J-Dtest.class.path='Z:\JDK\jdk8\langtools\build\windows-i586\test\langtools\jtreg\JTwork\classes\0\tools\javac\lambda\lambdaExecution' 
\
         -J-Dtest.java.opts= \
-J-Dtest.src='Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution' \
         -J-Dtest.tool.vm.opts=-J-Xmx768m \
         -d 
'Z:\JDK\jdk8\langtools\build\windows-i586\test\langtools\jtreg\JTwork\classes\0\tools\javac\lambda\lambdaExecution' 
-classpath 
'Z:\JDK\jdk8\langtools\build\windows-i586\test\langtools\jtreg\JTwork\classes\0\tools\javac\lambda\lambdaExecution;Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution;Z:\JDK\jdk8\build\windows-x86-normal-server-release\images\j2sdk-image\lib\tools.jar;Z:\JDK\jtreg\build\images\jtreg\lib\testng.jar' 
-sourcepath 'Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution' 
-XDignore.symbol.file=true 
'Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution\LambdaTranslationTest1.java'

ACTION: testng -- Failed. Execution failed: `main' threw exception: 
java.lang.Exception: failures: 1
REASON: User specified action: run testng LambdaTranslationTest1
TIME:   0.328 seconds
messages:
command: testng LambdaTranslationTest1
reason: User specified action: run testng LambdaTranslationTest1
elapsed time (seconds): 0.328
rerun:
'PATH=C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program 
Files\Microsoft Visual Studio 10.0\VC\BIN;C:\Program Files\Microsoft Visual 
Studio 
10.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\Program 
Files\Microsoft Visual Studio 10.0\VC\VCPackages;C:\Program Files\HTML Help 
Workshop;C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 
Tools;C:\Program Files\Microsoft 
SDKs\Windows\v7.0A\bin;C:\cygwin\usr\local\bin;C:\cygwin\bin;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS\System32\Wbem;C:\Program 
Files\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files\Microsoft Visual 
Studio 10.0\VC\BIN;C:\Program Files\Microsoft Visual Studio 
10.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program 
Files\Microsoft Visual Studio 10.0\VC\VCPackages;C:\Program Files\Microsoft 
SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools;C:\Program Files\Microsoft 
SDKs\Windows\v7.0A\bin;C:\Program Files\Apache Software 
Foundation\apache-ant-1.8.4\bin;C:\Program Files\Apache Software 
Foundation\apache-maven-3.0.3\bin' \
SystemDrive=C: \
'SystemRoot=C:\WINDOWS' \
'TEMP=C:\cygwin\tmp' \
'TMP=C:\cygwin\tmp' \
'windir=C:\WINDOWS' \
'Z:\JDK\jdk8\build\windows-x86-normal-server-release\images\j2sdk-image\bin\java' \
         -Dtest.vm.opts=-Xmx768m \
-Dtest.class.path.prefix='Z:\JDK\jdk8\langtools\build\windows-i586\test\langtools\jtreg\JTwork\classes\0\tools\javac\lambda\lambdaExecution;Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution' 
\
-Dtest.jdk='Z:\JDK\jdk8\build\windows-x86-normal-server-release\images\j2sdk-image' 
\
         -Dtest.timeout.factor=1.0 \
-Dtest.src.path='Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution' \
         -Dtest.compiler.opts= \
-Dcompile.jdk='Z:\JDK\jdk8\build\windows-x86-normal-server-release\images\j2sdk-image' 
\
-Dtest.classes='Z:\JDK\jdk8\langtools\build\windows-i586\test\langtools\jtreg\JTwork\classes\0\tools\javac\lambda\lambdaExecution' 
\
-Dtest.class.path='Z:\JDK\jdk8\langtools\build\windows-i586\test\langtools\jtreg\JTwork\classes\0\tools\javac\lambda\lambdaExecution' 
\
         -Dtest.java.opts= \
-Dtest.src='Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution' \
         -Dtest.tool.vm.opts=-J-Xmx768m \
         -classpath 
'Z:\JDK\jdk8\langtools\build\windows-i586\test\langtools\jtreg\JTwork\classes\0\tools\javac\lambda\lambdaExecution;Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution;Z:\JDK\jdk8\build\windows-x86-normal-server-release\images\j2sdk-image\lib\tools.jar' 
\
         'com.sun.javatest.regtest.TestNGAction$TestNGRunner' 
tools/javac/lambda/lambdaExecution/LambdaTranslationTest1.java 
LambdaTranslationTest1
STDOUT:
[TestNG] Running:
   tools/javac/lambda/lambdaExecution/LambdaTranslationTest1.java

test LambdaTranslationTest1.testInner(): success
test LambdaTranslationTest1.testLambdas(): success
test LambdaTranslationTest1.testMethodRefs(): failure
java.lang.AssertionError: expected [d:1234.000000] but found [d:1234,000000]
     at org.testng.Assert.fail(Assert.java:94)
     at org.testng.Assert.failNotEquals(Assert.java:494)
     at org.testng.Assert.assertEquals(Assert.java:123)
     at org.testng.Assert.assertEquals(Assert.java:176)
     at org.testng.Assert.assertEquals(Assert.java:186)
     at LambdaTranslationTest1.assertResult(LambdaTranslationTest1.java:48)
     at LambdaTranslationTest1.testMethodRefs(LambdaTranslationTest1.java:143)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:483)
     at 
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
     at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
     at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
     at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
     at 
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
     at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
     at org.testng.TestRunner.privateRun(TestRunner.java:767)
     at org.testng.TestRunner.run(TestRunner.java:617)
     at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
     at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
     at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
     at org.testng.SuiteRunner.run(SuiteRunner.java:240)
     at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
     at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
     at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
     at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
     at org.testng.TestNG.run(TestNG.java:1031)
     at 
com.sun.javatest.regtest.TestNGAction$TestNGRunner.main(TestNGAction.java:161)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:483)
     at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:746)
     at java.lang.Thread.run(Thread.java:744)

===============================================
tools/javac/lambda/lambdaExecution/LambdaTranslationTest1.java
Total tests run: 3, Failures: 1, Skips: 0
===============================================

STDERR:
java.lang.Exception: failures: 1
     at 
com.sun.javatest.regtest.TestNGAction$TestNGRunner.main(TestNGAction.java:164)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:483)
     at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:746)
     at java.lang.Thread.run(Thread.java:744)

JavaTest Message: Test threw exception: java.lang.Exception
JavaTest Message: shutting down test


TEST RESULT: Failed. Execution failed: `main' threw exception: 
java.lang.Exception: failures: 1
--------------------------------------------------
TEST: tools/javac/lambda/lambdaExecution/LambdaTranslationTest2.java
JDK under test: 
(Z:\JDK\jdk8\build\windows-x86-normal-server-release\images\j2sdk-image)
openjdk version "1.8.0-internal"
OpenJDK Runtime Environment (build 1.8.0-internal-francisandre_2013_11_30_08_32-b00)
OpenJDK Server VM (build 25.0-b60, mixed mode)



ACTION: build -- Passed. Build successful
REASON: Named class compiled on demand
TIME:   0.516 seconds
messages:
command: build LambdaTranslationTest2
reason: Named class compiled on demand
elapsed time (seconds): 0.516

ACTION: compile -- Passed. Compilation successful
REASON: .class file out of date or does not exist
TIME:   0.516 seconds
messages:
command: compile -XDignore.symbol.file=true 
Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution\LambdaTranslationTest2.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.516
rerun:
'PATH=C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program 
Files\Microsoft Visual Studio 10.0\VC\BIN;C:\Program Files\Microsoft Visual 
Studio 
10.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\Program 
Files\Microsoft Visual Studio 10.0\VC\VCPackages;C:\Program Files\HTML Help 
Workshop;C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 
Tools;C:\Program Files\Microsoft 
SDKs\Windows\v7.0A\bin;C:\cygwin\usr\local\bin;C:\cygwin\bin;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS\System32\Wbem;C:\Program 
Files\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files\Microsoft Visual 
Studio 10.0\VC\BIN;C:\Program Files\Microsoft Visual Studio 
10.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program 
Files\Microsoft Visual Studio 10.0\VC\VCPackages;C:\Program Files\Microsoft 
SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools;C:\Program Files\Microsoft 
SDKs\Windows\v7.0A\bin;C:\Program Files\Apache Software 
Foundation\apache-ant-1.8.4\bin;C:\Program Files\Apache Software 
Foundation\apache-maven-3.0.3\bin' \
SystemDrive=C: \
'SystemRoot=C:\WINDOWS' \
'TEMP=C:\cygwin\tmp' \
'TMP=C:\cygwin\tmp' \
'windir=C:\WINDOWS' \
'Z:\JDK\jdk8\build\windows-x86-normal-server-release\images\j2sdk-image\bin\javac' \
         -J-Xmx768m \
         -J-Dtest.vm.opts=-Xmx768m \
-J-Dtest.class.path.prefix='Z:\JDK\jdk8\langtools\build\windows-i586\test\langtools\jtreg\JTwork\classes\0\tools\javac\lambda\lambdaExecution;Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution' 
\
-J-Dtest.jdk='Z:\JDK\jdk8\build\windows-x86-normal-server-release\images\j2sdk-image' 
\
         -J-Dtest.timeout.factor=1.0 \
-J-Dtest.src.path='Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution' \
         -J-Dtest.compiler.opts= \
-J-Dcompile.jdk='Z:\JDK\jdk8\build\windows-x86-normal-server-release\images\j2sdk-image' 
\
-J-Dtest.classes='Z:\JDK\jdk8\langtools\build\windows-i586\test\langtools\jtreg\JTwork\classes\0\tools\javac\lambda\lambdaExecution' 
\
-J-Dtest.class.path='Z:\JDK\jdk8\langtools\build\windows-i586\test\langtools\jtreg\JTwork\classes\0\tools\javac\lambda\lambdaExecution' 
\
         -J-Dtest.java.opts= \
-J-Dtest.src='Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution' \
         -J-Dtest.tool.vm.opts=-J-Xmx768m \
         -d 
'Z:\JDK\jdk8\langtools\build\windows-i586\test\langtools\jtreg\JTwork\classes\0\tools\javac\lambda\lambdaExecution' 
-classpath 
'Z:\JDK\jdk8\langtools\build\windows-i586\test\langtools\jtreg\JTwork\classes\0\tools\javac\lambda\lambdaExecution;Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution;Z:\JDK\jdk8\build\windows-x86-normal-server-release\images\j2sdk-image\lib\tools.jar;Z:\JDK\jtreg\build\images\jtreg\lib\testng.jar' 
-sourcepath 'Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution' 
-XDignore.symbol.file=true 
'Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution\LambdaTranslationTest2.java'

ACTION: testng -- Failed. Execution failed: `main' threw exception: 
java.lang.Exception: failures: 3
REASON: User specified action: run testng LambdaTranslationTest2
TIME:   0.187 seconds
messages:
command: testng LambdaTranslationTest2
reason: User specified action: run testng LambdaTranslationTest2
elapsed time (seconds): 0.187
rerun:
'PATH=C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program 
Files\Microsoft Visual Studio 10.0\VC\BIN;C:\Program Files\Microsoft Visual 
Studio 
10.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\Program 
Files\Microsoft Visual Studio 10.0\VC\VCPackages;C:\Program Files\HTML Help 
Workshop;C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 
Tools;C:\Program Files\Microsoft 
SDKs\Windows\v7.0A\bin;C:\cygwin\usr\local\bin;C:\cygwin\bin;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS\System32\Wbem;C:\Program 
Files\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files\Microsoft Visual 
Studio 10.0\VC\BIN;C:\Program Files\Microsoft Visual Studio 
10.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program 
Files\Microsoft Visual Studio 10.0\VC\VCPackages;C:\Program Files\Microsoft 
SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools;C:\Program Files\Microsoft 
SDKs\Windows\v7.0A\bin;C:\Program Files\Apache Software 
Foundation\apache-ant-1.8.4\bin;C:\Program Files\Apache Software 
Foundation\apache-maven-3.0.3\bin' \
SystemDrive=C: \
'SystemRoot=C:\WINDOWS' \
'TEMP=C:\cygwin\tmp' \
'TMP=C:\cygwin\tmp' \
'windir=C:\WINDOWS' \
'Z:\JDK\jdk8\build\windows-x86-normal-server-release\images\j2sdk-image\bin\java' \
         -Dtest.vm.opts=-Xmx768m \
-Dtest.class.path.prefix='Z:\JDK\jdk8\langtools\build\windows-i586\test\langtools\jtreg\JTwork\classes\0\tools\javac\lambda\lambdaExecution;Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution' 
\
-Dtest.jdk='Z:\JDK\jdk8\build\windows-x86-normal-server-release\images\j2sdk-image' 
\
         -Dtest.timeout.factor=1.0 \
-Dtest.src.path='Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution' \
         -Dtest.compiler.opts= \
-Dcompile.jdk='Z:\JDK\jdk8\build\windows-x86-normal-server-release\images\j2sdk-image' 
\
-Dtest.classes='Z:\JDK\jdk8\langtools\build\windows-i586\test\langtools\jtreg\JTwork\classes\0\tools\javac\lambda\lambdaExecution' 
\
-Dtest.class.path='Z:\JDK\jdk8\langtools\build\windows-i586\test\langtools\jtreg\JTwork\classes\0\tools\javac\lambda\lambdaExecution' 
\
         -Dtest.java.opts= \
-Dtest.src='Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution' \
         -Dtest.tool.vm.opts=-J-Xmx768m \
         -classpath 
'Z:\JDK\jdk8\langtools\build\windows-i586\test\langtools\jtreg\JTwork\classes\0\tools\javac\lambda\lambdaExecution;Z:\JDK\jdk8\langtools\test\tools\javac\lambda\lambdaExecution;Z:\JDK\jdk8\build\windows-x86-normal-server-release\images\j2sdk-image\lib\tools.jar' 
\
         'com.sun.javatest.regtest.TestNGAction$TestNGRunner' 
tools/javac/lambda/lambdaExecution/LambdaTranslationTest2.java 
LambdaTranslationTest2
STDOUT:
[TestNG] Running:
   tools/javac/lambda/lambdaExecution/LambdaTranslationTest2.java

test LambdaTranslationTest2.testArgCastingAdaptation(): success
test LambdaTranslationTest2.testBoxToObject(): success
test LambdaTranslationTest2.testBoxing(): failure
java.lang.AssertionError: expected [b1 s2 cA i4 j5 ztrue f6,000000 d7,000000] 
but found [b1 s2 cA i4 j5 ztrue f6.000000 d7.000000]
     at org.testng.Assert.fail(Assert.java:94)
     at org.testng.Assert.failNotEquals(Assert.java:494)
     at org.testng.Assert.assertEquals(Assert.java:123)
     at org.testng.Assert.assertEquals(Assert.java:176)
     at org.testng.Assert.assertEquals(Assert.java:186)
     at LambdaTranslationTest2.testBoxing(LambdaTranslationTest2.java:237)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:483)
     at 
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
     at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
     at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
     at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
     at 
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
     at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
     at org.testng.TestRunner.privateRun(TestRunner.java:767)
     at org.testng.TestRunner.run(TestRunner.java:617)
     at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
     at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
     at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
     at org.testng.SuiteRunner.run(SuiteRunner.java:240)
     at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
     at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
     at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
     at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
     at org.testng.TestNG.run(TestNG.java:1031)
     at 
com.sun.javatest.regtest.TestNGAction$TestNGRunner.main(TestNGAction.java:161)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:483)
     at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:746)
     at java.lang.Thread.run(Thread.java:744)
test LambdaTranslationTest2.testBridges(): success
test LambdaTranslationTest2.testBridgesExplicitSpecialization(): success
test LambdaTranslationTest2.testBridgesImplicitSpecialization(): success
test LambdaTranslationTest2.testConstructorRef(): success
test LambdaTranslationTest2.testExtendsSAM(): success
test LambdaTranslationTest2.testInnerClassMethodRef(): success
test LambdaTranslationTest2.testLambdas(): success
test LambdaTranslationTest2.testPrimitiveWidening(): failure
java.lang.AssertionError: expected [f1,000000 d2,000000] but found [f1.000000 
d2.000000]
     at org.testng.Assert.fail(Assert.java:94)
     at org.testng.Assert.failNotEquals(Assert.java:494)
     at org.testng.Assert.assertEquals(Assert.java:123)
     at org.testng.Assert.assertEquals(Assert.java:176)
     at org.testng.Assert.assertEquals(Assert.java:186)
     at 
LambdaTranslationTest2.testPrimitiveWidening(LambdaTranslationTest2.java:211)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:483)
     at 
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
     at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
     at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
     at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
     at 
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
     at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
     at org.testng.TestRunner.privateRun(TestRunner.java:767)
     at org.testng.TestRunner.run(TestRunner.java:617)
     at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
     at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
     at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
     at org.testng.SuiteRunner.run(SuiteRunner.java:240)
     at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
     at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
     at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
     at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
     at org.testng.TestNG.run(TestNG.java:1031)
     at 
com.sun.javatest.regtest.TestNGAction$TestNGRunner.main(TestNGAction.java:161)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:483)
     at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:746)
     at java.lang.Thread.run(Thread.java:744)
test LambdaTranslationTest2.testPrivateIntf(): success
test LambdaTranslationTest2.testPrivateMethodRef(): success
test LambdaTranslationTest2.testProtectedMethodRef(): success
test LambdaTranslationTest2.testSuperCapture(): success
test LambdaTranslationTest2.testUnboxing(): failure
java.lang.AssertionError: expected [b1 s2 cA i4 j5 ztrue f6,000000 d7,000000] 
but found [b1 s2 cA i4 j5 ztrue f6.000000 d7.000000]
     at org.testng.Assert.fail(Assert.java:94)
     at org.testng.Assert.failNotEquals(Assert.java:494)
     at org.testng.Assert.assertEquals(Assert.java:123)
     at org.testng.Assert.assertEquals(Assert.java:176)
     at org.testng.Assert.assertEquals(Assert.java:186)
     at LambdaTranslationTest2.testUnboxing(LambdaTranslationTest2.java:232)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:483)
     at 
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
     at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
     at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
     at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
     at 
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
     at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
     at org.testng.TestRunner.privateRun(TestRunner.java:767)
     at org.testng.TestRunner.run(TestRunner.java:617)
     at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
     at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
     at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
     at org.testng.SuiteRunner.run(SuiteRunner.java:240)
     at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
     at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
     at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
     at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
     at org.testng.TestNG.run(TestNG.java:1031)
     at 
com.sun.javatest.regtest.TestNGAction$TestNGRunner.main(TestNGAction.java:161)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:483)
     at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:746)
     at java.lang.Thread.run(Thread.java:744)

===============================================
tools/javac/lambda/lambdaExecution/LambdaTranslationTest2.java
Total tests run: 16, Failures: 3, Skips: 0
===============================================

STDERR:
java.lang.Exception: failures: 3
     at 
com.sun.javatest.regtest.TestNGAction$TestNGRunner.main(TestNGAction.java:164)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:483)
     at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:746)
     at java.lang.Thread.run(Thread.java:744)

JavaTest Message: Test threw exception: java.lang.Exception
JavaTest Message: shutting down test


TEST RESULT: Failed. Execution failed: `main' threw exception: 
java.lang.Exception: failures: 3



More information about the compiler-dev mailing list