2
0
mirror of https://github.com/boostorg/nowide.git synced 2026-01-19 04:22:12 +00:00

46 Commits

Author SHA1 Message Date
Alexander Grund
149ee7c84e Fix false positive warning in GCC 13 on MinGW 2023-06-21 16:58:23 +02:00
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
993deff3ca Coverity: Remove space in supression comments
Seemingly the correct syntax is without that space.
2022-06-14 12:50:04 +02:00
Alexander Grund
206cb43340 Fix MSYS2 builds 2022-05-24 13:46:23 +02:00
Alexander Grund
3178dc17ff Fixup coverity comments
They seemingly need to be above the line they refer to
2021-12-20 14:21:05 +01:00
Alexander Grund
f373d53c47 UTF-32 unshift should return noconv 2021-11-30 21:02:16 +01:00
Alexander Grund
e2d4e95bca Add exclusions for Windows coverage builds 2021-11-30 21:02:16 +01:00
Alexander Grund
593473adbf Suppress deprecation warnings for std::codecvt<char16/32_t, char,...> in C++20
Do this for GCC and Clang
2021-11-30 21:02:16 +01:00
Alexander Grund
ee17695de1 Suppress false positives from coverity 2021-11-19 13:25:05 +01:00
Alexander Grund
9b943e8785 Suppress some false negative coverage lines
Some lines containing only the function header or an "else" are somehow never marked as covered.
Exclude those
2021-11-18 13:32:43 +01:00
Alexander Grund
71f749c8ef Use TEST_EQ where possible
Better output on failing tests
2021-11-18 13:26:39 +01:00
Alexander Grund
55c836326e Make sure coverage of test code is ok
Test code should be covered by 100%
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
aacb62d60e Fix some warnings on MSVC about deprecated unicode-char <-> char specializations in std::codecvt
std::codecvt<char16_t, char, mbstate_t>, std::codecvt<char32_t, char, mbstate_t> and others are deprecated in C++20 and should use char8_t as the second argument
Disable the warnings for all usage sites
2021-11-07 21:18:03 +01:00
Alexander Grund
2451f0355d Add test for utf8_codecvt::do_length 2021-11-07 21:18:03 +01:00
Alexander Grund
63d90d0e71 Test a few more things of the utf8_codecvt 2021-11-07 13:31:13 +01:00
Alexander Grund
c8a9cb0fc2 Suppress some coverity false positives 2021-04-22 11:20:55 +02:00
Alexander Grund
9e02e22fc2 Improve performance of utf8_codecvt
Avoid reading the same UTF-8 character twice if the output size is large enough
2021-04-13 12:16:50 +02:00
Alexander Grund
c896185347 Reformat
Put nowide headers at top, to test for self-containment
Then custom headers (i.e. "" style includes)
then boost headers (semi-standard)
then standard headers (all other <> style includes)
2021-04-13 12:16:50 +02:00
Alexander Grund
4277c04c6b Remove duplication of std::mbstate_t name 2020-10-25 19:06:46 +01:00
Alexander Grund
ff3a8e6c6c Consistently use using instead of typedef 2020-09-28 15:11:15 +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
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
8e08054b42 Reduce max line length to 120 2020-02-04 17:46:48 +01:00
Alexander Grund
14675cd822 Fix utf8_codecvt conversion of UTF-16 string with trailing surrogate
The correct result is `partial`, not `ok`
2020-01-08 17:24:46 +01:00
Alexander Grund
bf8b679555 Improve conversion tests
- Move common test cases into test_sets
- Run test_sets with all variants of conversions
- Handle incomplete input in codecvt conversion test
2020-01-08 17:24:46 +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
bb2487351f Use west-const
Almost all of boost does, so be nice stay consistent
2020-01-07 21:26:12 +01:00
Alexander Grund
1168f607bb Remove vim format tags 2020-01-07 19:41:33 +01:00
Alexander Grund
920e60c6da Remove unused vectors in test_codecvt 2020-01-06 09:42:18 +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
1d50c27dce Fix some warnings 2019-12-18 14:47:14 +01:00
Flamefire
bb743eedce Reduce dependency on Boost.Filesystem
Sort test cases in Jamfile and add missing one
2019-12-18 14:46:15 +01:00
Flamefire
f2e95fc899 Remove trailing whitespace 2019-12-14 15:47:01 +01:00
Flamefire
7549c80457 Include C++ headers instead of C variants 2019-12-14 13:35:37 +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
ddb2794705 Merge branch 'feature/temp-review-fixes' into feature/merge-review-fixes
Conflicts:
	include/boost/nowide/utf8_codecvt.hpp
	test/test_codecvt.cpp
	test/test_convert.cpp
	test/test_fs.cpp
2019-12-04 19:50:59 +02:00
Peter Dimov
98cda02480 Change line endings to LF 2019-12-04 19:37:20 +02:00
Peter Dimov
6df39fc829 Switch back to using test.hpp in tests 2019-12-04 16:29:56 +02:00
Peter Dimov
ac7b93b55d Use lightweight_test 2019-12-03 16:21:45 +02:00
Peter Dimov
a233584d1e Add a unique prefix to all temporary files to allow parallel testing 2019-12-03 16:06:04 +02:00
Peter Dimov
ccdd1ad1ee Fix line endings and whitespace 2019-12-03 06:54:10 +02:00
Artyom Beilis
11a7d83c1c Updates after review notes use U+FFFD instead of flagging error in case of invalid utf-8 2018-04-08 00:21:13 +03:00
Artyom Beilis
a711f32087 * Added utf8 codecvt_facet
* Added integration with boost::filesystem
2015-10-07 16:49:15 +03:00