mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 15:21:54 +00:00
Refactor posix tests
This commit is contained in:
parent
e5b16e80cc
commit
9769f4b9ed
4
posix.h
4
posix.h
@ -41,10 +41,6 @@
|
||||
|
||||
#include "format.h"
|
||||
|
||||
#ifdef FMT_INCLUDE_POSIX_TEST
|
||||
# include "test/posix-test.h"
|
||||
#endif
|
||||
|
||||
#ifndef FMT_POSIX
|
||||
# if defined(_WIN32) && !defined(__MINGW32__)
|
||||
// Fix warnings about deprecated symbols.
|
||||
|
@ -62,9 +62,7 @@ add_executable(macro-test macro-test.cc ${FMT_TEST_SOURCES} ${TEST_MAIN_SRC})
|
||||
target_link_libraries(macro-test gmock)
|
||||
|
||||
if (HAVE_OPEN)
|
||||
add_executable(posix-test posix-test.cc ${FMT_TEST_SOURCES} ${TEST_MAIN_SRC})
|
||||
set_target_properties(posix-test
|
||||
PROPERTIES COMPILE_DEFINITIONS "FMT_INCLUDE_POSIX_TEST=1")
|
||||
add_executable(posix-test posix-mock-test.cc ../format.cc ${TEST_MAIN_SRC})
|
||||
target_link_libraries(posix-test gmock)
|
||||
add_test(NAME posix-test COMMAND posix-test)
|
||||
endif ()
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
Test wrappers around POSIX functions.
|
||||
Tests of the C++ interface to POSIX functions that require mocks
|
||||
|
||||
Copyright (c) 2012-2014, Victor Zverovich
|
||||
Copyright (c) 2012-2015, Victor Zverovich
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@ -28,7 +28,8 @@
|
||||
// Disable bogus MSVC warnings.
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#include "posix-test.h"
|
||||
#include "posix-mock.h"
|
||||
#include "posix.cc"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
Test wrappers around POSIX functions.
|
||||
Mocks of POSIX functions
|
||||
|
||||
Copyright (c) 2012-2014, Victor Zverovich
|
||||
Copyright (c) 2012-2015, Victor Zverovich
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
Loading…
Reference in New Issue
Block a user