DaveAKing / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Running tests in a non-US locale might fail #1567

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Failed tests: 
  testToString(com.google.common.base.StopwatchTest): null expected:<0[.]000 ns> but was:<0[,]000 ns>
  testSimple(com.google.common.util.concurrent.RateLimiterTest): null expected:<[R0[.00, R0.20, R0.]20]> but was:<[R0[,00, R0,20, R0,]20]>
  testSimpleWithWait(com.google.common.util.concurrent.RateLimiterTest): null expected:<[R0[.00, U0.20, R0.00, R0.]20]> but was:<[R0[,00, U0,20, R0,00, R0,]20]>
  testOneSecondBurst(com.google.common.util.concurrent.RateLimiterTest): null expected:<[U1[.00, U1.00, R0.00, R0.00, R0.00, R0.00, R0.]20]> but was:<[U1[,00, U1,00, R0,00, R0,00, R0,00, R0,00, R0,]20]>
  testWarmUp(com.google.common.util.concurrent.RateLimiterTest): null expected:<[R0[.00, R1.38, R1.13, R0.88, R0.63, R0.50, R0.50, R0.50, U0.50, U4.00, R0.00, R1.38, R1.13, R0.88, R0.63, R0.50, R0.50, R0.50, U0.50, U2.00, R0.00, R0.50, R0.50, R0.50, R0.50, R0.50, R0.50, R0.]50]> but was:<[R0[,00, R1,38, R1,13, R0,88, R0,63, R0,50, R0,50, R0,50, U0,50, U4,00, R0,00, R1,38, R1,13, R0,88, R0,63, R0,50, R0,50, R0,50, U0,50, U2,00, R0,00, R0,50, R0,50, R0,50, R0,50, R0,50, R0,50, R0,]50]>
  testWarmUpAndUpdate(com.google.common.util.concurrent.RateLimiterTest): null expected:<[R0[.00, R1.38, R1.13, R0.88, R0.63, R0.50, R0.50, R0.50, U4.50, R0.00, R1.38, R1.13, R0.88, R0.34, R0.28, R0.25, R0.25, U4.25, R0.00, R0.72, R0.66, R0.59, R0.53, R0.47, R0.41, R0.34, R0.28, R0.25, R0.]25]> but was:<[R0[,00, R1,38, R1,13, R0,88, R0,63, R0,50, R0,50, R0,50, U4,50, R0,00, R1,38, R1,13, R0,88, R0,34, R0,28, R0,25, R0,25, U4,25, R0,00, R0,72, R0,66, R0,59, R0,53, R0,47, R0,41, R0,34, R0,28, R0,25, R0,]25]>
  testBursty(com.google.common.util.concurrent.RateLimiterTest): null expected:<[U10[.00, R0.00, R1.00, R1.00, U3.00, R0.00, R3.]00]> but was:<[U10[,00, R0,00, R1,00, R1,00, U3,00, R0,00, R3,]00]>
  testBurstyAndUpdate(com.google.common.util.concurrent.RateLimiterTest): null expected:<[R0[.00, R1.00, R1.00, R0.50, R1.00, R2.]00]> but was:<[R0[,00, R1,00, R1,00, R0,50, R1,00, R2,]00]>
  testTimeWrapping(com.google.common.util.concurrent.RateLimiterTest): null expected:<[R0[.00, R1.00, R1.00, R1.]00]> but was:<[R0[,00, R1,00, R1,00, R1,]00]>
  testSimpleWeights(com.google.common.util.concurrent.RateLimiterTest): null expected:<[R0[.00, R1.00, R1.00, R2.00, R4.00, R8.]00]> but was:<[R0[,00, R1,00, R1,00, R2,00, R4,00, R8,]00]>
  testInfinity_Bursty(com.google.common.util.concurrent.RateLimiterTest): null expected:<[R0[.00, R0.00, R0.]00]> but was:<[R0[,00, R0,00, R0,]00]>
  testInfinity_WarmUp(com.google.common.util.concurrent.RateLimiterTest): null expected:<[R0[.00, R0.00, R0.]00]> but was:<[R0[,00, R0,00, R0,]00]>

@@

Instead of:

String.format("%.4g %s", value, abbreviate(unit));

you might want to use:

String.format(Locale.ROOT, "%.4g %s", value, abbreviate(unit));

@@

You might want to check the entire codebase for usages of String.format without 
an explicit Locale.

Original issue reported on code.google.com by sebastia...@gmail.com on 4 Nov 2013 at 6:57

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 20 Nov 2013 at 8:14

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<issue id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:12

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:17

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:08