mirror of
https://github.com/fmtlib/fmt.git
synced 2025-10-21 18:25:33 +02:00
Allow compiling and using as DLL in windows (#502)
* printf.h fixed to compile clean - need to check whether this is the right thing to do * fix warnings and errors in test compiles with BUILD_SHARED_LIBS * did requested changes and added one change to allow all tests to succeed in windows DLL
This commit is contained in:
committed by
Jonathan Müller
parent
52aabbe7ef
commit
79f11dbaa7
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#define FMT_NOEXCEPT
|
||||
#undef FMT_SHARED
|
||||
#include "test-assert.h"
|
||||
|
||||
// Include *.cc instead of *.h to test implementation-specific stuff.
|
||||
|
@@ -1556,8 +1556,8 @@ TEST(FormatTest, JoinArg) {
|
||||
using fmt::join;
|
||||
int v1[3] = { 1, 2, 3 };
|
||||
std::vector<float> v2;
|
||||
v2.push_back(1.2);
|
||||
v2.push_back(3.4);
|
||||
v2.push_back(1.2f);
|
||||
v2.push_back(3.4f);
|
||||
|
||||
EXPECT_EQ("(1, 2, 3)", format("({})", join(v1 + 0, v1 + 3, ", ")));
|
||||
EXPECT_EQ("(1)", format("({})", join(v1 + 0, v1 + 1, ", ")));
|
||||
|
@@ -6,6 +6,9 @@
|
||||
|
||||
For the license information refer to format.h.
|
||||
*/
|
||||
#ifdef WIN32
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "fmt/time.h"
|
||||
|
Reference in New Issue
Block a user