mirror of
https://github.com/nemtrif/utfcpp.git
synced 2025-04-06 14:05:06 +00:00
Switching from gtest to ftest for unit-testing.
This commit is contained in:
parent
7d17aed953
commit
fe79d14ae7
10 changed files with 23 additions and 23 deletions
6
.gitmodules
vendored
6
.gitmodules
vendored
|
@ -1,3 +1,3 @@
|
|||
[submodule "extern/gtest"]
|
||||
path = extern/gtest
|
||||
url = https://github.com/google/googletest
|
||||
[submodule "extern/ftest"]
|
||||
path = extern/ftest
|
||||
url = https://github.com/nemtrif/ftest
|
||||
|
|
|
@ -38,6 +38,5 @@ endif()
|
|||
|
||||
if(UTF8_TESTS)
|
||||
enable_testing()
|
||||
add_subdirectory(extern/gtest)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
|
1
extern/ftest
vendored
Submodule
1
extern/ftest
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 9c7e60cc1b7c76f59e2ffbbc3dad15bafc5cdac5
|
1
extern/gtest
vendored
1
extern/gtest
vendored
|
@ -1 +0,0 @@
|
|||
Subproject commit 2fe3bd994b3189899d93f1d5a881e725e046fdc2
|
|
@ -13,27 +13,24 @@ add_executable(noexceptionstests
|
|||
)
|
||||
|
||||
target_link_libraries(negative PRIVATE utf8::cpp)
|
||||
target_link_libraries(cpp11 PRIVATE
|
||||
utf8::cpp
|
||||
gtest_main
|
||||
)
|
||||
target_link_libraries(apitests PRIVATE
|
||||
utf8::cpp
|
||||
gtest_main
|
||||
)
|
||||
target_link_libraries(cpp11 PRIVATE utf8::cpp)
|
||||
target_link_libraries(apitests PRIVATE utf8::cpp)
|
||||
target_link_libraries(noexceptionstests PRIVATE utf8::cpp)
|
||||
|
||||
target_link_libraries(noexceptionstests PRIVATE
|
||||
utf8::cpp
|
||||
gtest_main
|
||||
)
|
||||
target_compile_options(noexceptionstests PUBLIC -fno-exceptions)
|
||||
|
||||
set_target_properties(negative
|
||||
set_target_properties(negative apitests noexceptionstests
|
||||
PROPERTIES
|
||||
CXX_STANDARD 98
|
||||
CXX_STANDARD_REQUIRED YES
|
||||
CXX_EXTENSIONS NO)
|
||||
|
||||
set_target_properties(cpp11
|
||||
PROPERTIES
|
||||
CXX_STANDARD 11
|
||||
CXX_STANDARD_REQUIRED YES
|
||||
CXX_EXTENSIONS NO)
|
||||
|
||||
add_test(negative_test negative ${PROJECT_SOURCE_DIR}/tests/test_data/utf8_invalid.txt)
|
||||
add_test(cpp11_test cpp11)
|
||||
add_test(api_test apitests)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "gtest/gtest.h"
|
||||
#define F_TEST_NO_MAIN
|
||||
#include "../extern/ftest/ftest.h"
|
||||
#include "utf8.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "gtest/gtest.h"
|
||||
#define F_TEST_NO_MAIN
|
||||
#include "../extern/ftest/ftest.h"
|
||||
#include "utf8.h"
|
||||
|
||||
using namespace utf8;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "gtest/gtest.h"
|
||||
#include "../extern/ftest/ftest.h"
|
||||
#include "utf8.h"
|
||||
#include <string>
|
||||
using namespace utf8;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "gtest/gtest.h"
|
||||
#include "../extern/ftest/ftest.h"
|
||||
#include "utf8/unchecked.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#include "gtest/gtest.h"
|
||||
#define F_TEST_NO_MAIN
|
||||
#include "../extern/ftest/ftest.h"
|
||||
|
||||
#include "utf8/unchecked.h"
|
||||
|
||||
using namespace utf8::unchecked;
|
||||
|
|
Loading…
Add table
Reference in a new issue