diff --git a/include/etl/basic_string.h b/include/etl/basic_string.h index 0e5c56e8..bb0ae39a 100644 --- a/include/etl/basic_string.h +++ b/include/etl/basic_string.h @@ -125,6 +125,20 @@ namespace etl } }; + //*************************************************************************** + ///\ingroup string + /// String truncation exception. +//*************************************************************************** + class string_truncation : public etl::string_exception + { + public: + + string_truncation(string_type file_name_, numeric_type line_number_) + : string_exception(ETL_ERROR_TEXT("string:iterator", ETL_FILE"D"), file_name_, line_number_) + { + } + }; + //*************************************************************************** ///\ingroup string /// The base class for all templated string types. @@ -415,6 +429,10 @@ namespace etl if (new_size > CAPACITY) { is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif } new_size = etl::min(new_size, CAPACITY); @@ -540,6 +558,10 @@ namespace etl if (other.truncated()) { is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif } cleanup(); @@ -580,6 +602,10 @@ namespace etl is_truncated = (*other != 0); +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ASSERT(is_truncated == false, ETL_ERROR(string_truncation)) +#endif + p_buffer[current_size] = 0; } @@ -595,6 +621,10 @@ namespace etl is_truncated = (length_ > CAPACITY); +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ASSERT(is_truncated == false, ETL_ERROR(string_truncation)) +#endif + length_ = etl::min(length_, CAPACITY); etl::copy_n(other, length_, begin()); @@ -628,6 +658,10 @@ namespace etl p_buffer[current_size] = 0; is_truncated = (first != last); + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ASSERT(is_truncated == false, ETL_ERROR(string_truncation)) +#endif } //********************************************************************* @@ -642,6 +676,10 @@ namespace etl is_truncated = (n > CAPACITY); +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ASSERT(is_truncated == false, ETL_ERROR(string_truncation)) +#endif + n = etl::min(n, CAPACITY); etl::fill_n(begin(), n, value); @@ -672,6 +710,10 @@ namespace etl else { is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif } } @@ -698,6 +740,10 @@ namespace etl if (str.truncated()) { is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif } return *this; @@ -800,6 +846,10 @@ namespace etl } is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif } p_buffer[current_size] = 0; @@ -828,6 +878,10 @@ namespace etl if (start >= CAPACITY) { is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif return; } @@ -837,6 +891,10 @@ namespace etl if ((current_size + n) > CAPACITY) { is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif } current_size = CAPACITY; @@ -856,6 +914,10 @@ namespace etl { current_size = CAPACITY; is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif } else { @@ -891,6 +953,10 @@ namespace etl if (start >= CAPACITY) { is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif return; } @@ -900,6 +966,10 @@ namespace etl if (((current_size + n) > CAPACITY)) { is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif } current_size = CAPACITY; @@ -923,6 +993,10 @@ namespace etl { current_size = CAPACITY; is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif } else { @@ -954,6 +1028,10 @@ namespace etl if (str.truncated()) { is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif } return *this; @@ -981,6 +1059,10 @@ namespace etl if (str.truncated()) { is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif } return *this; @@ -1095,6 +1177,10 @@ namespace etl if ((pos + len > size())) { is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif } size_t endpos = etl::min(pos + len, size()); @@ -1373,6 +1459,10 @@ namespace etl if (str.truncated()) { is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif } return *this; @@ -1399,6 +1489,10 @@ namespace etl if (str.truncated()) { is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif } return *this; diff --git a/include/etl/cstring.h b/include/etl/cstring.h index 9dee9685..8036485c 100644 --- a/include/etl/cstring.h +++ b/include/etl/cstring.h @@ -108,6 +108,10 @@ namespace etl if (other.truncated()) { this->is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif } } diff --git a/include/etl/error_handler.h b/include/etl/error_handler.h index a0fc5e0f..6d7b9a61 100644 --- a/include/etl/error_handler.h +++ b/include/etl/error_handler.h @@ -121,32 +121,32 @@ namespace etl ///\ingroup error_handler //*************************************************************************** #if defined(ETL_NO_CHECKS) - #define ETL_ASSERT(b, e) // Does nothing. - #define ETL_ALWAYS_ASSERT(e) // Does nothing. + #define ETL_ASSERT(b, e) // Does nothing. + #define ETL_ALWAYS_ASSERT(e) // Does nothing. #elif defined(ETL_THROW_EXCEPTIONS) #if defined(ETL_LOG_ERRORS) - #define ETL_ASSERT(b, e) {if (!(b)) {etl::error_handler::error((e)); throw((e));}} // If the condition fails, calls the error handler then throws an exception. - #define ETL_ALWAYS_ASSERT(e) {etl::error_handler::error((e)); throw((e));} // Calls the error handler then throws an exception. + #define ETL_ASSERT(b, e) {if (!(b)) {etl::error_handler::error((e)); throw((e));}} // If the condition fails, calls the error handler then throws an exception. + #define ETL_ALWAYS_ASSERT(e) {etl::error_handler::error((e)); throw((e));} // Calls the error handler then throws an exception. #else - #define ETL_ASSERT(b, e) {if (!(b)) {throw((e));}} // If the condition fails, throws an exception. - #define ETL_ALWAYS_ASSERT(e) {throw((e));} // Throws an exception. + #define ETL_ASSERT(b, e) {if (!(b)) {throw((e));}} // If the condition fails, throws an exception. + #define ETL_ALWAYS_ASSERT(e) {throw((e));} // Throws an exception. #endif #else #if defined(ETL_LOG_ERRORS) #if defined(NDEBUG) - #define ETL_ASSERT(b, e) {if(!(b)) {etl::error_handler::error((e));}} // If the condition fails, calls the error handler - #define ETL_ALWAYS_ASSERT(e) {etl::error_handler::error((e));} // Calls the error handler + #define ETL_ASSERT(b, e) {if(!(b)) {etl::error_handler::error((e));}} // If the condition fails, calls the error handler + #define ETL_ALWAYS_ASSERT(e) {etl::error_handler::error((e));} // Calls the error handler #else - #define ETL_ASSERT(b, e) {if(!(b)) {etl::error_handler::error((e)); assert((b));}} // If the condition fails, calls the error handler then asserts. - #define ETL_ALWAYS_ASSERT(e) {etl::error_handler::error((e)); assert(true);} // Calls the error handler then asserts. + #define ETL_ASSERT(b, e) {if(!(b)) {etl::error_handler::error((e)); assert(false);}} // If the condition fails, calls the error handler then asserts. + #define ETL_ALWAYS_ASSERT(e) {etl::error_handler::error((e)); assert(false);} // Calls the error handler then asserts. #endif #else #if defined(NDEBUG) - #define ETL_ASSERT(b, e) // Does nothing. - #define ETL_ALWAYS_ASSERT(e) // Does nothing. + #define ETL_ASSERT(b, e) // Does nothing. + #define ETL_ALWAYS_ASSERT(e) // Does nothing. #else - #define ETL_ASSERT(b, e) assert((b)) // If the condition fails, asserts. - #define ETL_ALWAYS_ASSERT(e) assert(true) // Asserts. + #define ETL_ASSERT(b, e) assert((b)) // If the condition fails, asserts. + #define ETL_ALWAYS_ASSERT(e) assert(false) // Asserts. #endif #endif #endif diff --git a/include/etl/intrusive_forward_list.h b/include/etl/intrusive_forward_list.h index 48ed3972..33836cc4 100644 --- a/include/etl/intrusive_forward_list.h +++ b/include/etl/intrusive_forward_list.h @@ -935,7 +935,7 @@ namespace etl //************************************************************************* /// Splice an element from another list into this one. //************************************************************************* - void splice(iterator position, etl::intrusive_forward_list& other, iterator isource) + void splice_after(iterator position, etl::intrusive_forward_list& other, iterator isource) { link_type& before = *position.p_value; diff --git a/include/etl/u16string.h b/include/etl/u16string.h index 377d29e8..51d3b48a 100644 --- a/include/etl/u16string.h +++ b/include/etl/u16string.h @@ -108,6 +108,10 @@ namespace etl if (other.truncated()) { this->is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif } } diff --git a/include/etl/u32string.h b/include/etl/u32string.h index ee4ebabd..97d167b4 100644 --- a/include/etl/u32string.h +++ b/include/etl/u32string.h @@ -108,6 +108,10 @@ namespace etl if (other.truncated()) { this->is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif } } diff --git a/include/etl/utility.h b/include/etl/utility.h index 5f600f2f..b08ac571 100644 --- a/include/etl/utility.h +++ b/include/etl/utility.h @@ -163,7 +163,7 @@ namespace etl } #endif -#if defined(ETL_NO_STL) +#if defined(ETL_NO_STL) || !ETL_CPP14_SUPPORTED //*************************************************************************** /// exchange (const) //*************************************************************************** diff --git a/include/etl/version.h b/include/etl/version.h index 44270f57..c8ea0c5d 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -38,7 +38,7 @@ SOFTWARE. ///\ingroup utilities #define ETL_VERSION_MAJOR 16 -#define ETL_VERSION_MINOR 0 +#define ETL_VERSION_MINOR 1 #define ETL_VERSION_PATCH 0 #define ETL_VERSION ETL_STRINGIFY(ETL_VERSION_MAJOR) "." ETL_STRINGIFY(ETL_VERSION_MINOR) "." ETL_STRINGIFY(ETL_VERSION_PATCH) diff --git a/include/etl/wstring.h b/include/etl/wstring.h index 7447d962..1b45bc5d 100644 --- a/include/etl/wstring.h +++ b/include/etl/wstring.h @@ -109,6 +109,10 @@ namespace etl if (other.truncated()) { this->is_truncated = true; + +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation)); +#endif } } diff --git a/library.json b/library.json index 606d9945..ee63d96e 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "Embedded Template Library", - "version": "16.0.0", + "version": "16.1.0", "authors": { "name": "John Wellbelove", "email": "john.wellbelove@etlcpp.com" diff --git a/library.properties b/library.properties index 13083571..936ca6dd 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Embedded Template Library -version=16.0.0 +version=16.1.0 author= John Wellbelove maintainer=John Wellbelove license=MIT diff --git a/support/Release notes.txt b/support/Release notes.txt index 81833538..fccb353d 100644 --- a/support/Release notes.txt +++ b/support/Release notes.txt @@ -1,3 +1,8 @@ +=============================================================================== +16.1.0 +Added compile time option to make string truncation an error. +Define ETL_STRING_TRUNCATION_IS_ERROR to enable. + =============================================================================== 16.0.0 Refactored the ETL's relationship with the STL diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0aaac6e9..f39460e6 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -3,7 +3,6 @@ project(etl_unit_tests) add_definitions(-DETL_DEBUG) - if(NOT UnitTest++_FOUND) # Add unittest-cpp as an ExternalProject include(cmake/unit-test_external_project.cmake) @@ -117,11 +116,6 @@ set(TEST_SOURCE_FILES test_forward_list_shared_pool.cpp test_list_shared_pool.cpp test_multi_array.cpp - test_no_stl_algorithm.cpp - test_no_stl_functional.cpp - test_no_stl_iterator.cpp - test_no_stl_limits.cpp - test_no_stl_utility.cpp test_queue_memory_model_small.cpp test_queue_mpmc_mutex.cpp test_queue_mpmc_mutex_small.cpp @@ -143,8 +137,6 @@ set(TEST_SOURCE_FILES test_vector_pointer_external_buffer.cpp ) - - if (WIN32) # test_error_handler.cpp uses windows APIs that assume the microsoft project # is setup for unicode support. Note: This may have adverse effects on client diff --git a/test/test_error_handler.cpp b/test/test_error_handler.cpp index 17bff6a0..ec05fd48 100644 --- a/test/test_error_handler.cpp +++ b/test/test_error_handler.cpp @@ -27,11 +27,9 @@ SOFTWARE. ******************************************************************************/ #include "UnitTest++/UnitTest++.h" - #if defined(_WINDOWS) -#include -#endif -#include +#include #include +#include #include "etl/error_handler.h" #include "etl/exception.h" @@ -58,18 +56,7 @@ public: void receive_error(const etl::exception& e) { error_received = true; - std::ostringstream oss; - oss << "Error '" << e.what() << "' in " << e.file_name() << " at line " << e.line_number() << "\n"; - -#if defined(_WINDOWS) && defined(ETL_COMPILER_MICROSOFT) - std::string stext = oss.str(); - - WCHAR text[200]; - MultiByteToWideChar(0, 0, stext.c_str(), stext.size() + 1, text, 200); - LPCWSTR ltext = text; - - OutputDebugString(ltext); -#endif + CHECK(strcmp(e.what(), "test_exception") == 0); } //***************************************************************************** @@ -83,18 +70,7 @@ public: void receive_error(const etl::exception& e) { error_received = true; - std::ostringstream oss; - oss << "Error '" << e.what() << "' in " << e.file_name() << " at line " << e.line_number() << "\n"; - -#if defined(_WINDOWS) && defined(ETL_COMPILER_MICROSOFT) - std::string stext = oss.str(); - - WCHAR text[200]; - MultiByteToWideChar(0, 0, stext.c_str(), stext.size() + 1, text, 200); - LPCWSTR ltext = text; - - OutputDebugString(ltext); -#endif + CHECK(strcmp(e.what(), "test_exception") == 0); } }; diff --git a/test/test_make_string.cpp b/test/test_make_string.cpp index c7759325..5d6035e1 100644 --- a/test/test_make_string.cpp +++ b/test/test_make_string.cpp @@ -113,6 +113,12 @@ namespace constexpr size_t CAPACITY = 10; size_t length = strlen("Hello World"); +#if defined(ETL_STRING_TRUNCATION_IS_ERROR) + CHECK_THROW(auto ctext = etl::make_string_with_capacity("Hello World"), etl::string_truncation); + CHECK_THROW(auto wtext = etl::make_string_with_capacity(L"Hello World"), etl::string_truncation);; + CHECK_THROW(auto u16text = etl::make_string_with_capacity(u"Hello World"), etl::string_truncation);; + CHECK_THROW(auto u32text = etl::make_string_with_capacity(U"Hello World"), etl::string_truncation);; +#else auto ctext = etl::make_string_with_capacity("Hello World"); auto wtext = etl::make_string_with_capacity(L"Hello World"); auto u16text = etl::make_string_with_capacity(u"Hello World"); @@ -138,6 +144,7 @@ namespace CHECK(Equal(std::wstring(L"Hello Worl"), ctext)); CHECK(Equal(std::u16string(u"Hello Worl"), ctext)); CHECK(Equal(std::u32string(U"Hello Worl"), ctext)); +#endif } }; } diff --git a/test/test_vector_non_trivial.cpp b/test/test_vector_non_trivial.cpp index bab37793..f1c71fb4 100644 --- a/test/test_vector_non_trivial.cpp +++ b/test/test_vector_non_trivial.cpp @@ -756,7 +756,10 @@ namespace Data(std::string w, size_t x, double y, const char *z) : a(w), b(x), c(y), d(z){} bool operator == (const Data &other) const { - return (a == other.a) && (b == other.b) && (c == other.c) && (d == other.d); + return (a == other.a) && + (b == other.b) && + (c == other.c) && + (((d == nullptr) && (other.d == nullptr)) || (strcmp(d, other.d) == 0)); } }; diff --git a/test/vs2017/etl.sln b/test/vs2017/etl.sln index b6464410..c4438e18 100644 --- a/test/vs2017/etl.sln +++ b/test/vs2017/etl.sln @@ -7,52 +7,58 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "etl", "etl.vcxproj", "{C21D EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug 64|Win32 = Debug 64|Win32 - Debug 64|x64 = Debug 64|x64 - Debug LLVM No STL|Win32 = Debug LLVM No STL|Win32 - Debug LLVM No STL|x64 = Debug LLVM No STL|x64 + Debug LLVM - No STL|Win32 = Debug LLVM - No STL|Win32 + Debug LLVM - No STL|x64 = Debug LLVM - No STL|x64 Debug LLVM|Win32 = Debug LLVM|Win32 Debug LLVM|x64 = Debug LLVM|x64 - Debug No STL - Force No Advanced|Win32 = Debug No STL - Force No Advanced|Win32 - Debug No STL - Force No Advanced|x64 = Debug No STL - Force No Advanced|x64 - Debug No STL|Win32 = Debug No STL|Win32 - Debug No STL|x64 = Debug No STL|x64 - Debug No Unit Tests|Win32 = Debug No Unit Tests|Win32 - Debug No Unit Tests|x64 = Debug No Unit Tests|x64 - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 + Debug MSVC - No STL - Force No Advanced|Win32 = Debug MSVC - No STL - Force No Advanced|Win32 + Debug MSVC - No STL - Force No Advanced|x64 = Debug MSVC - No STL - Force No Advanced|x64 + Debug MSVC - No STL|Win32 = Debug MSVC - No STL|Win32 + Debug MSVC - No STL|x64 = Debug MSVC - No STL|x64 + Debug MSVC - No Unit Tests|Win32 = Debug MSVC - No Unit Tests|Win32 + Debug MSVC - No Unit Tests|x64 = Debug MSVC - No Unit Tests|x64 + Debug MSVC - String Truncation Is Error|Win32 = Debug MSVC - String Truncation Is Error|Win32 + Debug MSVC - String Truncation Is Error|x64 = Debug MSVC - String Truncation Is Error|x64 + Debug MSVC 64|Win32 = Debug MSVC 64|Win32 + Debug MSVC 64|x64 = Debug MSVC 64|x64 + Debug MSVC|Win32 = Debug MSVC|Win32 + Debug MSVC|x64 = Debug MSVC|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug 64|Win32.ActiveCfg = Debug No Unit Tests|Win32 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug 64|Win32.Build.0 = Debug No Unit Tests|Win32 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug 64|x64.ActiveCfg = Debug64|x64 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug 64|x64.Build.0 = Debug64|x64 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM No STL|Win32.ActiveCfg = DebugLLVMNoSTL|Win32 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM No STL|Win32.Build.0 = DebugLLVMNoSTL|Win32 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM No STL|x64.ActiveCfg = DebugLLVMNoSTL|x64 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM No STL|x64.Build.0 = DebugLLVMNoSTL|x64 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM - No STL|Win32.ActiveCfg = DebugLLVMNoSTL|Win32 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM - No STL|Win32.Build.0 = DebugLLVMNoSTL|Win32 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM - No STL|x64.ActiveCfg = DebugLLVMNoSTL|x64 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM - No STL|x64.Build.0 = DebugLLVMNoSTL|x64 {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM|Win32.ActiveCfg = Debug LLVM|Win32 {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM|Win32.Build.0 = Debug LLVM|Win32 {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM|x64.ActiveCfg = Debug LLVM|x64 {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug LLVM|x64.Build.0 = Debug LLVM|x64 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug No STL - Force No Advanced|Win32.ActiveCfg = DebugNoSTLForceNoAdvanced|Win32 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug No STL - Force No Advanced|Win32.Build.0 = DebugNoSTLForceNoAdvanced|Win32 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug No STL - Force No Advanced|x64.ActiveCfg = DebugNoSTLForceNoAdvanced|x64 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug No STL - Force No Advanced|x64.Build.0 = DebugNoSTLForceNoAdvanced|x64 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug No STL|Win32.ActiveCfg = DebugNoSTL|Win32 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug No STL|Win32.Build.0 = DebugNoSTL|Win32 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug No STL|x64.ActiveCfg = DebugNoSTL|x64 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug No STL|x64.Build.0 = DebugNoSTL|x64 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug No Unit Tests|Win32.ActiveCfg = Debug No Unit Tests|Win32 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug No Unit Tests|Win32.Build.0 = Debug No Unit Tests|Win32 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug No Unit Tests|x64.ActiveCfg = Debug No Unit Tests|x64 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug No Unit Tests|x64.Build.0 = Debug No Unit Tests|x64 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug|Win32.ActiveCfg = Debug|Win32 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug|Win32.Build.0 = Debug|Win32 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug|x64.ActiveCfg = Debug|x64 - {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug|x64.Build.0 = Debug|x64 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL - Force No Advanced|Win32.ActiveCfg = DebugNoSTLForceNoAdvanced|Win32 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL - Force No Advanced|Win32.Build.0 = DebugNoSTLForceNoAdvanced|Win32 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL - Force No Advanced|x64.ActiveCfg = DebugNoSTLForceNoAdvanced|x64 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL - Force No Advanced|x64.Build.0 = DebugNoSTLForceNoAdvanced|x64 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL|Win32.ActiveCfg = DebugNoSTL|Win32 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL|Win32.Build.0 = DebugNoSTL|Win32 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL|x64.ActiveCfg = DebugNoSTL|x64 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No STL|x64.Build.0 = DebugNoSTL|x64 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No Unit Tests|Win32.ActiveCfg = Debug No Unit Tests|Win32 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No Unit Tests|Win32.Build.0 = Debug No Unit Tests|Win32 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No Unit Tests|x64.ActiveCfg = Debug No Unit Tests|x64 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No Unit Tests|x64.Build.0 = Debug No Unit Tests|x64 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - String Truncation Is Error|Win32.ActiveCfg = DebugStringTruncationIsError|Win32 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - String Truncation Is Error|Win32.Build.0 = DebugStringTruncationIsError|Win32 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - String Truncation Is Error|x64.ActiveCfg = DebugStringTruncationIsError|x64 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - String Truncation Is Error|x64.Build.0 = DebugStringTruncationIsError|x64 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC 64|Win32.ActiveCfg = Debug No Unit Tests|Win32 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC 64|Win32.Build.0 = Debug No Unit Tests|Win32 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC 64|x64.ActiveCfg = Debug64|x64 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC 64|x64.Build.0 = Debug64|x64 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC|Win32.ActiveCfg = Debug|Win32 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC|Win32.Build.0 = Debug|Win32 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC|x64.ActiveCfg = Debug|x64 + {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC|x64.Build.0 = Debug|x64 {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Release|Win32.ActiveCfg = Release|Win32 {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Release|Win32.Build.0 = Release|Win32 {C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Release|x64.ActiveCfg = Release|x64 diff --git a/test/vs2017/etl.vcxproj b/test/vs2017/etl.vcxproj index 3ac49ba6..88221eac 100644 --- a/test/vs2017/etl.vcxproj +++ b/test/vs2017/etl.vcxproj @@ -57,6 +57,14 @@ DebugNoSTL x64 + + DebugStringTruncationIsError + Win32 + + + DebugStringTruncationIsError + x64 + Debug Win32 @@ -88,6 +96,12 @@ v141 Unicode + + Application + true + v141 + Unicode + Application true @@ -124,6 +138,12 @@ v141 Unicode + + Application + true + v141 + Unicode + Application true @@ -198,6 +218,9 @@ + + + @@ -216,6 +239,9 @@ + + + @@ -255,6 +281,11 @@ true \$(IntDir) + + true + true + \$(IntDir) + true true @@ -284,6 +315,10 @@ true true + + true + true + true true @@ -350,6 +385,27 @@ $(OutDir)\etl.exe + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_STRING_TRUNCATION_IS_ERROR;%(PreprocessorDefinitions) + ../../../unittest-cpp/;../../include;../../test + + + false + stdcpp17 + + + Console + true + + + $(OutDir)\etl.exe + + @@ -357,7 +413,7 @@ Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING;ETL_NO_STL;%(PreprocessorDefinitions) - ../../../unittest-cpp/;../../include;../../include/etl/c;../../test + ./;../../../unittest-cpp/;../../include;../../test false @@ -423,7 +479,7 @@ Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_NO_STL;__clang__;%(PreprocessorDefinitions) - ../../../unittest-cpp/;../../include;../../include/etl/c;../../test + ../../../unittest-cpp/;../../include;../../test false @@ -447,7 +503,7 @@ Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - ../../../unittest-cpp/UnitTest++/;../../include;../../include/etl/c;../../test + ../../../unittest-cpp/UnitTest++/;../../include;../../test false @@ -495,7 +551,28 @@ Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - ../../unittest-cpp/UnitTest++/;../../include/etl;../../include/etl/c;../../test + ../../unittest-cpp/UnitTest++/;../../include/etl;../../test + + + false + stdcpp14 + + + Console + true + + + $(OutDir)\etl.exe + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ../../unittest-cpp/UnitTest++/;../../include/etl;../../test false @@ -516,7 +593,7 @@ Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - ../../unittest-cpp/UnitTest++/;../../include/etl;../../include/etl/c;../../test + ../../unittest-cpp/UnitTest++/;../../include/etl;../../test false @@ -537,7 +614,7 @@ Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - ../../unittest-cpp/UnitTest++/;../../include/etl;../../include/etl/c;../../test + ../../unittest-cpp/UnitTest++/;../../include/etl;../../test false @@ -558,7 +635,7 @@ Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - ../../unittest-cpp/UnitTest++/;../../include/etl;../../include/etl/c;../../test + ../../unittest-cpp/UnitTest++/;../../include/etl;../../test false @@ -579,7 +656,7 @@ Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - ../../unittest-cpp/UnitTest++/;../../include/etl;../../include/etl/c;../../test + ../../unittest-cpp/UnitTest++/;../../include/etl;../../test false @@ -600,7 +677,7 @@ Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - ../../unittest-cpp/UnitTest++/;../../include/etl;../../include/etl/c;../../test + ../../unittest-cpp/UnitTest++/;../../include/etl;../../test false @@ -621,7 +698,7 @@ Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - ../../../unittest-cpp/;../../include;../../include/etl/c;../../test + ../../../unittest-cpp/;../../include;../../test false @@ -642,7 +719,7 @@ Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - ../../unittest-cpp/UnitTest++/;../../include/etl;../../include/etl/c;../../test + ../../unittest-cpp/UnitTest++/;../../include/etl;../../test false @@ -663,7 +740,7 @@ Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - ../../../unittest-cpp/;../../include;../../include/etl/c;../../test + ../../../unittest-cpp/;../../include;../../test stdcpp17 @@ -1054,6 +1131,7 @@ false false false + false false false false @@ -1061,6 +1139,7 @@ false false false + false false false false @@ -1087,6 +1166,7 @@ false + false false false false @@ -1094,6 +1174,7 @@ false false false + false false false false @@ -1115,6 +1196,7 @@ false + false false false false @@ -1122,6 +1204,7 @@ false false false + false false false false @@ -1133,6 +1216,7 @@ false + false false false false @@ -1140,6 +1224,7 @@ false false false + false false false false @@ -1151,6 +1236,7 @@ false + false false false false @@ -1158,6 +1244,7 @@ false false false + false false false false @@ -1169,6 +1256,7 @@ false + false false false false @@ -1176,6 +1264,7 @@ false false false + false false false false @@ -1187,6 +1276,7 @@ false + false false false false @@ -1194,6 +1284,7 @@ false false false + false false false false @@ -1210,6 +1301,7 @@ false + false false false false @@ -1217,6 +1309,7 @@ false false false + false false false false @@ -1232,6 +1325,7 @@ true true false + false false false false @@ -1239,6 +1333,7 @@ false false false + false false false false @@ -1259,6 +1354,7 @@ false + false false false false @@ -1266,6 +1362,7 @@ false false false + false false false false