Commit 6556c7f 1 parent 5d93656 commit 6556c7f Copy full SHA for 6556c7f
File tree 1 file changed +10
-7
lines changed
src/test/java/org/archive/util
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -229,16 +229,19 @@ public void testByteArrayEquals() {
229
229
230
230
/** test doubleToString() */
231
231
public void testDoubleToString (){
232
- double test = 12.345 ;
233
- assertTrue (
232
+ double test = 12.121d ;
233
+ assertEquals (
234
234
"cecking zero precision" ,
235
- ArchiveUtils .doubleToString (test , 0 ).equals ("12" ));
236
- assertTrue (
235
+ "12" ,
236
+ ArchiveUtils .doubleToString (test , 0 ));
237
+ assertEquals (
237
238
"cecking 2 character precision" ,
238
- ArchiveUtils .doubleToString (test , 2 ).equals ("12.34" ));
239
- assertTrue (
239
+ "12.12" ,
240
+ ArchiveUtils .doubleToString (test , 2 ));
241
+ assertEquals (
240
242
"cecking precision higher then the double has" ,
241
- ArchiveUtils .doubleToString (test , 65 ).equals ("12.345" ));
243
+ "12.121" ,
244
+ ArchiveUtils .doubleToString (test , 65 ));
242
245
}
243
246
244
247
You can’t perform that action at this time.
0 commit comments