mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 11:43:29 +01:00
parent
46a1fc7615
commit
7eb5acc183
@ -1,6 +1,6 @@
|
|||||||
![catch logo](catch-logo-small.png)
|
![catch logo](catch-logo-small.png)
|
||||||
|
|
||||||
*v1.0 build 24 (master branch)*
|
*v1.0 build 25 (master branch)*
|
||||||
|
|
||||||
Build status (on Travis CI) [![Build Status](https://travis-ci.org/philsquared/Catch.png)](https://travis-ci.org/philsquared/Catch)
|
Build status (on Travis CI) [![Build Status](https://travis-ci.org/philsquared/Catch.png)](https://travis-ci.org/philsquared/Catch)
|
||||||
|
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
// running under the debugger or has a debugger attached post facto).
|
// running under the debugger or has a debugger attached post facto).
|
||||||
bool isDebuggerActive(){
|
bool isDebuggerActive(){
|
||||||
|
|
||||||
int junk;
|
|
||||||
int mib[4];
|
int mib[4];
|
||||||
struct kinfo_proc info;
|
struct kinfo_proc info;
|
||||||
size_t size;
|
size_t size;
|
||||||
@ -51,8 +50,10 @@
|
|||||||
// Call sysctl.
|
// Call sysctl.
|
||||||
|
|
||||||
size = sizeof(info);
|
size = sizeof(info);
|
||||||
junk = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0);
|
if( sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0) != 0 ) {
|
||||||
assert(junk == 0);
|
std::cerr << "\n** Call to sysctl failed - unable to determine if debugger is active **\n" << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// We're being debugged if the P_TRACED flag is set.
|
// We're being debugged if the P_TRACED flag is set.
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
// These numbers are maintained by a script
|
// These numbers are maintained by a script
|
||||||
Version libraryVersion( 1, 0, 24, "master" );
|
Version libraryVersion( 1, 0, 25, "master" );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED
|
#endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* CATCH v1.0 build 24 (master branch)
|
* CATCH v1.0 build 25 (master branch)
|
||||||
* Generated: 2014-01-07 17:26:42.421599
|
* Generated: 2014-01-08 17:16:38.496390
|
||||||
* ----------------------------------------------------------
|
* ----------------------------------------------------------
|
||||||
* This file has been merged from multiple headers. Please don't edit it directly
|
* This file has been merged from multiple headers. Please don't edit it directly
|
||||||
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
|
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
|
||||||
@ -685,17 +685,16 @@ namespace Detail {
|
|||||||
// Does not consider endian-ness
|
// Does not consider endian-ness
|
||||||
template<typename T>
|
template<typename T>
|
||||||
std::string rawMemoryToString( T value ) {
|
std::string rawMemoryToString( T value ) {
|
||||||
union
|
union {
|
||||||
{
|
T typedValue;
|
||||||
T value;
|
|
||||||
unsigned char bytes[sizeof(T)];
|
unsigned char bytes[sizeof(T)];
|
||||||
} valueAsBuffer;
|
};
|
||||||
|
|
||||||
valueAsBuffer.value = value;
|
typedValue = value;
|
||||||
|
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << "0x";
|
oss << "0x";
|
||||||
for( unsigned char* cp = valueAsBuffer.bytes; cp < valueAsBuffer.bytes+sizeof(T); ++cp )
|
for( unsigned char* cp = bytes; cp < bytes+sizeof(T); ++cp )
|
||||||
oss << std::hex << std::setw(2) << std::setfill('0') << (unsigned int)*cp;
|
oss << std::hex << std::setw(2) << std::setfill('0') << (unsigned int)*cp;
|
||||||
return oss.str();
|
return oss.str();
|
||||||
}
|
}
|
||||||
@ -6207,7 +6206,7 @@ namespace Catch {
|
|||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
// These numbers are maintained by a script
|
// These numbers are maintained by a script
|
||||||
Version libraryVersion( 1, 0, 24, "master" );
|
Version libraryVersion( 1, 0, 25, "master" );
|
||||||
}
|
}
|
||||||
|
|
||||||
// #included from: catch_text.hpp
|
// #included from: catch_text.hpp
|
||||||
@ -6626,7 +6625,6 @@ namespace Catch {
|
|||||||
// running under the debugger or has a debugger attached post facto).
|
// running under the debugger or has a debugger attached post facto).
|
||||||
bool isDebuggerActive(){
|
bool isDebuggerActive(){
|
||||||
|
|
||||||
int junk;
|
|
||||||
int mib[4];
|
int mib[4];
|
||||||
struct kinfo_proc info;
|
struct kinfo_proc info;
|
||||||
size_t size;
|
size_t size;
|
||||||
@ -6647,8 +6645,10 @@ namespace Catch {
|
|||||||
// Call sysctl.
|
// Call sysctl.
|
||||||
|
|
||||||
size = sizeof(info);
|
size = sizeof(info);
|
||||||
junk = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0);
|
if( sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0) != 0 ) {
|
||||||
assert(junk == 0);
|
std::cerr << "\n** Call to sysctl failed - unable to determine if debugger is active **\n" << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// We're being debugged if the P_TRACED flag is set.
|
// We're being debugged if the P_TRACED flag is set.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user