1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-20 01:14:20 +00:00

Fixed an intermittent JSON parsing test failure

This commit is contained in:
tpoole 2017-07-26 15:52:50 +01:00
parent 58fe117260
commit db1e79601e
2 changed files with 4 additions and 10 deletions

View file

@ -565,17 +565,11 @@ public:
return CharPointer_ASCII (buffer);
}
// (creates a random double that can be easily stringified, to avoid
// false failures when decimal places are rounded or truncated slightly)
// Creates a random double that can be easily stringified, to avoid
// false failures when decimal places are rounded or truncated slightly
static var createRandomDouble (Random& r)
{
for (;;)
{
var v (String (r.nextDouble() * 1000.0, 20).getDoubleValue());
if (v.toString() == String (static_cast<double> (v), 20))
return v;
}
return var ((r.nextDouble() * 1000.0) + 0.1);
}
static var createRandomVar (Random& r, int depth)

View file

@ -191,7 +191,7 @@ public:
switch (*++text)
{
case '-': *currentCharacter++ = '-'; // fall-through..
case '-': *currentCharacter++ = '-'; // Fall-through..
case '+': ++text;
}