mirror of
https://github.com/unittest-cpp/unittest-cpp
synced 2026-09-26 16:19:30 +03:00
Add changes required to compile with MS VC6
Add macro UNITTEST_COMPILER_IS_MSVC6 Add macro UNIITEST_NS_QUAL_STD(fun) Avoid __pragma() Skip tests with long long
This commit is contained in:
parent
b8cd1d300b
commit
23127fe5b9
5 changed files with 17 additions and 5 deletions
|
|
@ -150,7 +150,7 @@ TEST(CheckCloseWithNaNFails)
|
|||
{
|
||||
const unsigned int bitpattern = 0xFFFFFFFF;
|
||||
float nan;
|
||||
std::memcpy(&nan, &bitpattern, sizeof(bitpattern));
|
||||
UNIITEST_NS_QUAL_STD(memcpy)(&nan, &bitpattern, sizeof(bitpattern));
|
||||
|
||||
TestResults results;
|
||||
CheckClose(results, 3.0f, nan, 0.1f, TestDetails("", "", "", 0));
|
||||
|
|
@ -161,7 +161,7 @@ TEST(CheckCloseWithNaNAgainstItselfFails)
|
|||
{
|
||||
const unsigned int bitpattern = 0xFFFFFFFF;
|
||||
float nan;
|
||||
std::memcpy(&nan, &bitpattern, sizeof(bitpattern));
|
||||
UNIITEST_NS_QUAL_STD(memcpy)(&nan, &bitpattern, sizeof(bitpattern));
|
||||
|
||||
TestResults results;
|
||||
CheckClose(results, nan, nan, 0.1f, TestDetails("", "", "", 0));
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@ TEST(StreamingMinUnsignedLongWritesCorrectCharacters)
|
|||
CHECK_EQUAL("0", stream.GetText());
|
||||
}
|
||||
|
||||
#ifndef UNITTEST_COMPILER_IS_MSVC6
|
||||
TEST(StreamingLongLongWritesCorrectCharacters)
|
||||
{
|
||||
MemoryOutStream stream;
|
||||
|
|
@ -214,6 +215,7 @@ TEST(StreamingMinUnsignedLongLongWritesCorrectCharacters)
|
|||
stream << (unsigned long long)0ull;
|
||||
CHECK_EQUAL("0", stream.GetText());
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST(StreamingFloatWritesCorrectCharacters)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue