Skip to content

Commit

Permalink
test: handle float point number format differences in DE and US
Browse files Browse the repository at this point in the history
Acked-by: Marina Sahakyan
target: master
  • Loading branch information
kofemann committed Mar 31, 2022
1 parent 49cf00c commit 006b2dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/test/java/org/dcache/nfs/vfs/StatTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public void testSizeToString() {
assertEquals("1K",Stat.sizeToString(1024));
assertEquals("1K",Stat.sizeToString(1024+1));
assertEquals("1K",Stat.sizeToString(1024+51));
assertEquals("1.1K",Stat.sizeToString(1024+52)); //just after 1.05, round up
// localized format to handle ',' vs '.' (German vs US English)
assertEquals(String.format("%.1fK", 1.1),Stat.sizeToString(1024+52)); //just after 1.05, round up
assertEquals("1024M",Stat.sizeToString(1024*1024*1024-1));
assertEquals("1G",Stat.sizeToString(1024*1024*1024));
assertEquals("8E",Stat.sizeToString(Long.MAX_VALUE));
Expand Down

0 comments on commit 006b2dc

Please sign in to comment.