Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
nfs4j
Commits
006b2dce
Commit
006b2dce
authored
Mar 21, 2022
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
core/src/test/java/org/dcache/nfs/vfs/StatTest.java
View file @
006b2dce
...
...
@@ -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
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment