mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
Fixed issues for ObjC use (see #1011)
This commit is contained in:
parent
a63b4a75bd
commit
b9ff7ec301
@ -30,7 +30,7 @@ namespace Catch {
|
|||||||
return tryTranslators();
|
return tryTranslators();
|
||||||
}
|
}
|
||||||
@catch (NSException *exception) {
|
@catch (NSException *exception) {
|
||||||
return Catch::toString( [exception description] );
|
return Catch::Detail::stringify( [exception description] );
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
return tryTranslators();
|
return tryTranslators();
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
#include <cfloat>
|
#include <cfloat>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
|
namespace Catch {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
std::size_t makeRatio( std::size_t number, std::size_t total ) {
|
std::size_t makeRatio( std::size_t number, std::size_t total ) {
|
||||||
std::size_t ratio = total > 0 ? CATCH_CONFIG_CONSOLE_WIDTH * number/ total : 0;
|
std::size_t ratio = total > 0 ? CATCH_CONFIG_CONSOLE_WIDTH * number/ total : 0;
|
||||||
@ -186,9 +188,7 @@ namespace {
|
|||||||
return os << duration.value() << " " << duration.unitsAsString();
|
return os << duration.value() << " " << duration.unitsAsString();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
} // end anon namespace
|
||||||
|
|
||||||
namespace Catch {
|
|
||||||
|
|
||||||
struct ConsoleReporter : StreamingReporterBase<ConsoleReporter> {
|
struct ConsoleReporter : StreamingReporterBase<ConsoleReporter> {
|
||||||
TablePrinter m_tablePrinter;
|
TablePrinter m_tablePrinter;
|
||||||
|
Loading…
Reference in New Issue
Block a user