mirror of
https://github.com/boostorg/locale.git
synced 2025-05-09 15:14:03 +00:00
Move test headers to subfolder
Gets rid of the `test_` prefix in the filenames and avoids confusing those with the actual tests especially by renaming the test framework file from `test_locale.hpp` to `unit_test.hpp`
This commit is contained in:
parent
5888146aa6
commit
fadb2190ce
@ -4,9 +4,13 @@
|
||||
|
||||
include(BoostTestJamfile)
|
||||
|
||||
# Library config as determined by configure tests
|
||||
add_library(boost_locale_test INTERFACE)
|
||||
# Add test folder to include directories, especially for systems
|
||||
# where the current folder is not automatically added to the search path
|
||||
target_include_directories(boost_locale_test INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
set(BOOST_TEST_COMPILE_DEFINITIONS "")
|
||||
set(BOOST_TEST_LINK_LIBRARIES "Boost::locale")
|
||||
set(BOOST_TEST_LINK_LIBRARIES Boost::locale boost_locale_test)
|
||||
set(BOOST_TEST_COMPILE_OPTIONS ${BOOST_LOCALE_WARNING_OPTIONS})
|
||||
if(MSVC OR
|
||||
(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11)
|
||||
@ -14,6 +18,7 @@ if(MSVC OR
|
||||
list(APPEND BOOST_TEST_COMPILE_OPTIONS -Wall -Werror)
|
||||
endif()
|
||||
|
||||
# Library config as determined by configure tests
|
||||
if(BOOST_LOCALE_ENABLE_ICONV)
|
||||
list(APPEND BOOST_TEST_COMPILE_DEFINITIONS BOOST_LOCALE_WITH_ICONV=1)
|
||||
endif()
|
||||
|
@ -4,8 +4,8 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#ifndef BOOST_LOCLAE_TEST_LOCALE_POSIX_TOOLS_HPP
|
||||
#define BOOST_LOCLAE_TEST_LOCALE_POSIX_TOOLS_HPP
|
||||
#ifndef BOOST_LOCALE_TEST_POSIX_TOOLS_HPP
|
||||
#define BOOST_LOCALE_TEST_POSIX_TOOLS_HPP
|
||||
|
||||
#include <clocale>
|
||||
#include <string>
|
@ -4,14 +4,14 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#ifndef BOOST_LOCLAE_TEST_LOCALE_TOOLS_HPP
|
||||
#define BOOST_LOCLAE_TEST_LOCALE_TOOLS_HPP
|
||||
#ifndef BOOST_LOCALE_TEST_TOOLS_HPP
|
||||
#define BOOST_LOCALE_TEST_TOOLS_HPP
|
||||
|
||||
#include <boost/locale/encoding.hpp>
|
||||
#include <fstream>
|
||||
|
||||
#ifndef BOOST_LOCALE_NO_POSIX_BACKEND
|
||||
#include "test_posix_tools.hpp"
|
||||
#include "boostLocale/test/posix_tools.hpp"
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_MSVC) && BOOST_MSVC < 1700
|
@ -4,8 +4,8 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#ifndef BOOST_LOCALE_TEST_H
|
||||
#define BOOST_LOCALE_TEST_H
|
||||
#ifndef BOOST_LOCALE_UNIT_TEST_HPP
|
||||
#define BOOST_LOCALE_UNIT_TEST_HPP
|
||||
|
||||
#include <boost/locale/config.hpp>
|
||||
#include <stdexcept>
|
@ -16,8 +16,8 @@ int main()
|
||||
|
||||
#include <boost/locale/boundary.hpp>
|
||||
#include <boost/locale/generator.hpp>
|
||||
#include "test_locale.hpp"
|
||||
#include "test_locale_tools.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
#include "boostLocale/test/tools.hpp"
|
||||
#include <list>
|
||||
#include <unicode/uversion.h>
|
||||
#include <vector>
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <memory.h>
|
||||
#include <wchar.h>
|
||||
#define BOOST_LOCALE_ERROR_LIMIT -1
|
||||
#include "test_locale.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
|
||||
#if defined(BOOST_MSVC) && BOOST_MSVC < 1700
|
||||
#pragma warning(disable : 4428) // universal-character-name encountered in source
|
||||
|
@ -25,8 +25,8 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include "test_locale.hpp"
|
||||
#include "test_locale_tools.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
#include "boostLocale/test/tools.hpp"
|
||||
|
||||
bool test_iso;
|
||||
bool test_iso_8859_8 = true;
|
||||
|
@ -16,8 +16,8 @@
|
||||
#endif
|
||||
|
||||
#include <cstring>
|
||||
#include "test_locale.hpp"
|
||||
#include "test_locale_tools.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
#include "boostLocale/test/tools.hpp"
|
||||
|
||||
static const unsigned illegal=0xFFFFFFFF;
|
||||
static const unsigned incomplete=0xFFFFFFFE;
|
||||
|
@ -15,7 +15,7 @@ int main()
|
||||
#include <boost/locale/collator.hpp>
|
||||
#include <boost/locale/generator.hpp>
|
||||
#include <iomanip>
|
||||
#include "test_locale.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
|
||||
|
||||
template<typename Char>
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <unicode/uversion.h>
|
||||
#endif
|
||||
|
||||
#include "test_locale_tools.hpp"
|
||||
#include "boostLocale/test/tools.hpp"
|
||||
|
||||
char const *env(char const *s)
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ int main()
|
||||
#include <boost/locale/generator.hpp>
|
||||
#include <boost/locale/info.hpp>
|
||||
#include <iomanip>
|
||||
#include "test_locale.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
|
||||
|
||||
template<typename Char>
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <boost/locale/formatting.hpp>
|
||||
#include <boost/locale/localization_backend.hpp>
|
||||
#include <iomanip>
|
||||
#include "test_locale.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
|
||||
#ifdef BOOST_LOCALE_WITH_ICU
|
||||
#include <unicode/uversion.h>
|
||||
|
@ -27,8 +27,8 @@ int main()
|
||||
#include <sstream>
|
||||
#include <unicode/uversion.h>
|
||||
|
||||
#include "test_locale.hpp"
|
||||
#include "test_locale_tools.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
#include "boostLocale/test/tools.hpp"
|
||||
|
||||
using namespace boost::locale;
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <boost/locale/info.hpp>
|
||||
#include <boost/locale/message.hpp>
|
||||
#include <iomanip>
|
||||
#include "test_locale.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
|
||||
|
||||
bool has_message(std::locale const &l)
|
||||
|
@ -25,8 +25,8 @@ int main()
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
|
||||
#include "test_locale.hpp"
|
||||
#include "test_locale_tools.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
#include "boostLocale/test/tools.hpp"
|
||||
|
||||
void test_main(int /*argc*/, char** /*argv*/)
|
||||
{
|
||||
|
@ -4,7 +4,7 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include "test_locale.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
#include "../src/boost/locale/shared/ios_prop.hpp"
|
||||
#include <sstream>
|
||||
#include <locale>
|
||||
|
@ -9,8 +9,8 @@
|
||||
#include <boost/locale/message.hpp>
|
||||
#include <boost/locale/gnu_gettext.hpp>
|
||||
#include <boost/locale/encoding.hpp>
|
||||
#include "test_locale.hpp"
|
||||
#include "test_locale_tools.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
#include "boostLocale/test/tools.hpp"
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
|
||||
|
@ -17,8 +17,8 @@ int main()
|
||||
#include <boost/locale/generator.hpp>
|
||||
#include <boost/locale/info.hpp>
|
||||
#include <iomanip>
|
||||
#include "test_locale.hpp"
|
||||
#include "test_locale_tools.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
#include "boostLocale/test/tools.hpp"
|
||||
#include <iostream>
|
||||
|
||||
int get_sign(int x)
|
||||
|
@ -16,8 +16,8 @@ int main()
|
||||
#include <boost/locale/generator.hpp>
|
||||
#include <boost/locale/info.hpp>
|
||||
#include <iomanip>
|
||||
#include "test_locale.hpp"
|
||||
#include "test_locale_tools.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
#include "boostLocale/test/tools.hpp"
|
||||
#include <iostream>
|
||||
|
||||
#include <wctype.h>
|
||||
|
@ -22,8 +22,8 @@ int main()
|
||||
#include <monetary.h>
|
||||
#include <langinfo.h>
|
||||
|
||||
#include "test_locale.hpp"
|
||||
#include "test_locale_tools.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
#include "boostLocale/test/tools.hpp"
|
||||
|
||||
//#define DEBUG_FMT
|
||||
|
||||
|
@ -18,8 +18,8 @@ int main()
|
||||
#include <boost/locale/generator.hpp>
|
||||
#include <boost/locale/info.hpp>
|
||||
#include <iomanip>
|
||||
#include "test_locale.hpp"
|
||||
#include "test_locale_tools.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
#include "boostLocale/test/tools.hpp"
|
||||
#include <iostream>
|
||||
|
||||
int get_sign(int x)
|
||||
|
@ -17,8 +17,8 @@ int main()
|
||||
#include <boost/locale/generator.hpp>
|
||||
#include <boost/locale/info.hpp>
|
||||
#include <iomanip>
|
||||
#include "test_locale.hpp"
|
||||
#include "test_locale_tools.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
#include "boostLocale/test/tools.hpp"
|
||||
#include <iostream>
|
||||
|
||||
template<typename CharType>
|
||||
|
@ -19,8 +19,8 @@ int main()
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
|
||||
#include "test_locale.hpp"
|
||||
#include "test_locale_tools.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
#include "boostLocale/test/tools.hpp"
|
||||
|
||||
//#define DEBUG_FMT
|
||||
|
||||
|
@ -8,8 +8,8 @@
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <cstring>
|
||||
#include "test_locale.hpp"
|
||||
#include "test_locale_tools.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
#include "boostLocale/test/tools.hpp"
|
||||
|
||||
using namespace boost::locale::utf;
|
||||
|
||||
|
@ -16,7 +16,7 @@ int main()
|
||||
#include <boost/locale/generator.hpp>
|
||||
#include <boost/locale/localization_backend.hpp>
|
||||
#include <iomanip>
|
||||
#include "test_locale.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
|
||||
|
||||
template<typename Char>
|
||||
|
@ -17,8 +17,8 @@ int main()
|
||||
#include <boost/locale/generator.hpp>
|
||||
#include <boost/locale/info.hpp>
|
||||
#include <iomanip>
|
||||
#include "test_locale.hpp"
|
||||
#include "test_locale_tools.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
#include "boostLocale/test/tools.hpp"
|
||||
#include <iostream>
|
||||
|
||||
template<typename CharType>
|
||||
|
@ -26,8 +26,8 @@ int main()
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
||||
#include "test_locale.hpp"
|
||||
#include "test_locale_tools.hpp"
|
||||
#include "boostLocale/test/unit_test.hpp"
|
||||
#include "boostLocale/test/tools.hpp"
|
||||
#include "../src/boost/locale/win32/lcid.hpp"
|
||||
|
||||
#define DEBUG_FMT
|
||||
|
Loading…
x
Reference in New Issue
Block a user