2
0
mirror of https://github.com/boostorg/nowide.git synced 2026-01-27 07:02:11 +00:00

24 Commits

Author SHA1 Message Date
Alexander Grund
a0327e0b74 Update license headers
Use the more concise format omitting the reference to the license file
and refer to the URL only.
2022-07-13 12:35:54 +02:00
Alexander Grund
506e899b2e Tests: Add TEST_CONTEXT 2022-05-24 14:06:09 +02:00
Alexander Grund
b54d1c24b9 Protect test code against min/max macros 2022-03-06 12:38:10 +01:00
Alexander Grund
e5f4451aff Enhance test debugging of iostream tests
Use TEST_EQ and add method to print wstring
2021-12-13 22:14:31 +01:00
Alexander Grund
ee17695de1 Suppress false positives from coverity 2021-11-19 13:25:05 +01:00
Alexander Grund
a2cb9ef0ff Add TEST_THROW macro for testing exceptions 2021-11-18 13:26:38 +01:00
Alexander Grund
45330522f2 Workaround missing symbol std::codecvt::id
Happens when using MSVC 2015-2017 and with the utf-types: char16_t, char32_t, ...
2021-11-08 00:52:31 +01:00
Alexander Grund
a3c04e6340 Move header guard to correct position 2020-05-22 12:20:11 +02:00
Alexander Grund
20385d4a3c Fix name of license file 2020-05-22 12:20:11 +02:00
Alexander Grund
6afb3f15ab Deduplicate tests and improve coverage
Every test had the same pattern of a main catching exceptions and
returning 0 or 1 based on that. Factor that into test.hpp.
As most code in test.hpp is only executed on failure and those should
not occur this file is excluded from coverage.

Finally test.hpp is included last and the header to test first
consistently to check for self-sufficient includes.
2020-04-03 16:28:28 +02:00
Alexander Grund
6bfbde5c24 Improve test_system
Split parent and child code into functions for better output
Introduce TEST_EQUAL for better output
Compare each entry in env-pointer and argv

Don't check env-pointer values against getenv() as they might differ:
When launching the program from e.g. bash with `temp=bar`then there is
TEMP and temp in the list (env-pointer) but getenv/GetEnvironmentVariable
is case insensitive picking up the first matching value.
2020-04-03 16:21:15 +02:00
Alexander Grund
3e0a7e33b1 Fix minor issues and improve stackstring tests
Make some functions protected to derive a test class from stackstring
which can be used to detect wether a stack or heap value is used
Fix or silence issues from static analyser findings
Double-check and handle surrogates in iostream
2020-03-14 17:46:49 +01:00
Alexander Grund
4cbfd4be41 [Test] Avoid message boxes on assertion failures 2020-02-24 13:31:57 +01:00
Alexander Grund
d3fc524943 [Test] Avoid C4127 (constant expression detected in test macro) 2020-02-22 15:51:14 +01:00
Alexander Grund
7854435d8e Switch pointer alignment to left
Consistency with rest of boost
2020-01-07 21:27:26 +01:00
Alexander Grund
1168f607bb Remove vim format tags 2020-01-07 19:41:33 +01:00
Alexander Grund
10d43c46cd Create test_failed function for easier debugging
Can set breakpoints inside
2020-01-02 18:47:47 +01:00
Alexander Grund
1bff7b670c Remove usage of Boost.LightweightTest
Tests assume TEST terminates execution on failure which is not how BLWT behaves
2020-01-02 18:47:46 +01:00
Flamefire
3bd6eed183 Enforce uniform formatting via clang-format 2019-12-28 16:02:31 +01:00
Flamefire
f213fd90f4 Fix exception path of tests
Even in case of exceptions boost::report_errors has to be called
2019-12-13 19:24:44 +01:00
Peter Dimov
6df39fc829 Switch back to using test.hpp in tests 2019-12-04 16:29:56 +02:00
Peter Dimov
00024d47f6 Revert test/test.hpp 2019-12-04 16:22:03 +02:00
Peter Dimov
ac7b93b55d Use lightweight_test 2019-12-03 16:21:45 +02:00
Artyom Beilis
bfbca14bd3 Moved various files according to new boost format 2015-10-01 18:57:14 +03:00