Commit 006b2dce authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan
Browse files

test: handle float point number format differences in DE and US

Acked-by: Marina Sahakyan
target: master
parent 49cf00cd
Pipeline #24337 passed with stage
in 1 minute and 31 seconds
......@@ -50,7 +50,8 @@ public class StatTest {
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));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment