1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

UnitTestRunner: Improved logging on Windows

This commit is contained in:
tpoole 2017-09-26 11:16:35 +01:00
parent 06c7fb5b01
commit 920c3f24c8
3 changed files with 8 additions and 7 deletions

View file

@ -32,6 +32,10 @@ class ConsoleLogger : public Logger
void logMessage (const String& message) override
{
std::cout << message << std::endl;
#if JUCE_WINDOWS
Logger::outputDebugString (message);
#endif
}
};
@ -47,17 +51,13 @@ class ConsoleUnitTestRunner : public UnitTestRunner
//==============================================================================
int main()
{
#if ! JUCE_DEBUG
ConsoleLogger logger;
Logger::setCurrentLogger (&logger);
#endif
ConsoleUnitTestRunner runner;
runner.runAllTests();
#if ! JUCE_DEBUG
Logger::setCurrentLogger (nullptr);
#endif
for (int i = 0; i < runner.getNumResults(); ++i)
if (runner.getResult(i)->failures > 0)

View file

@ -241,12 +241,13 @@ public:
STRING_DOUBLE_PAIR_COMBOS (2087.3087e+00006),
STRING_DOUBLE_PAIR_COMBOS (6.0872e-00006),
// Too many sig figs
// Too many sig figs. The parsing routine on MinGW gets the last
// significant figure wrong.
STRING_DOUBLE_PAIR_COMBOS (1.23456789012345678901234567890),
STRING_DOUBLE_PAIR_COMBOS (1.23456789012345678901234567890e-111)
// Limits. DBL_MAX may not exist on Linux.
#if ! JUCE_LINUX
// Limits
, STRING_DOUBLE_PAIR (DBL_MAX),
STRING_DOUBLE_PAIR (-DBL_MAX),
STRING_DOUBLE_PAIR (DBL_MIN)

View file

@ -188,7 +188,7 @@ public:
int exponent = 0, decPointIndex = 0, digit = 0;
int lastDigit = 0, numSignificantDigits = 0;
bool digitsFound = false;
JUCE_CONSTEXPR const int maxSignificantDigits = 15 + 2;
JUCE_CONSTEXPR const int maxSignificantDigits = 17 + 1;
for (;;)
{