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:
parent
58fe117260
commit
db1e79601e
2 changed files with 4 additions and 10 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ public:
|
|||
|
||||
switch (*++text)
|
||||
{
|
||||
case '-': *currentCharacter++ = '-'; // fall-through..
|
||||
case '-': *currentCharacter++ = '-'; // Fall-through..
|
||||
case '+': ++text;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue