1
1
/*
2
- * Copyright (c) 2012, 2013 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2012, 2016 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -200,7 +200,7 @@ public void testPrimitiveWidening() {
200
200
assertEquals ("b1 s2" , ws1 .m ((byte ) 1 , (short ) 2 ));
201
201
202
202
WidenD wd1 = LambdaTranslationTest2 ::pwD1 ;
203
- assertEquals ("f1.000000 d2.000000" , wd1 .m (1.0f , 2.0 ));
203
+ assertEquals (String . format ( "f%f d%f" , 1.0f , 2.0 ) , wd1 .m (1.0f , 2.0 ));
204
204
205
205
WidenI wi1 = LambdaTranslationTest2 ::pwI1 ;
206
206
assertEquals ("b1 s2 c3 i4" , wi1 .m ((byte ) 1 , (short ) 2 , (char ) 3 , 4 ));
@@ -221,12 +221,16 @@ static String pu(byte a0, short a1, char a2, int a3, long a4, boolean a5, float
221
221
222
222
public void testUnboxing () {
223
223
Unbox u = LambdaTranslationTest2 ::pu ;
224
- assertEquals ("b1 s2 cA i4 j5 ztrue f6.000000 d7.000000" , u .m ((byte )1 , (short ) 2 , 'A' , 4 , 5L , true , 6.0f , 7.0 ));
224
+ String expected = String .format ("b%d s%d c%c i%d j%d z%b f%f d%f" ,
225
+ (byte )1 , (short ) 2 , 'A' , 4 , 5L , true , 6.0f , 7.0 );
226
+ assertEquals (expected , u .m ((byte )1 , (short ) 2 , 'A' , 4 , 5L , true , 6.0f , 7.0 ));
225
227
}
226
228
227
229
public void testBoxing () {
228
230
Box b = LambdaTranslationTest2 ::pb ;
229
- assertEquals ("b1 s2 cA i4 j5 ztrue f6.000000 d7.000000" , b .m ((byte ) 1 , (short ) 2 , 'A' , 4 , 5L , true , 6.0f , 7.0 ));
231
+ String expected = String .format ("b%d s%d c%c i%d j%d z%b f%f d%f" ,
232
+ (byte ) 1 , (short ) 2 , 'A' , 4 , 5L , true , 6.0f , 7.0 );
233
+ assertEquals (expected , b .m ((byte ) 1 , (short ) 2 , 'A' , 4 , 5L , true , 6.0f , 7.0 ));
230
234
}
231
235
232
236
static boolean cc (Object o ) {
0 commit comments