Alexander Grund
dbac66606d
Add support for *::filesystem::path to fstream classes
2020-02-04 19:04:07 +01:00
Alexander Grund
d3b49dd589
Also test string ctor of fstream classes when replacements are used
...
I.e. BOOST_NOWIDE_USE_FSTREAM_REPLACEMENTS is defined
2020-02-04 19:04:07 +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
999893c4e6
Remove unused u2w_tests array from test
2020-01-08 10:25:49 +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
afe7304f29
Use define instead of commandline switch for test_system
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
74586edc53
Test and fix compile failure in is_open function
2020-01-06 09:42:18 +01:00
Alexander Grund
1eefeed7eb
Supress long-long warning
2020-01-02 21:04:35 +01:00
Alexander Grund
f47a70130f
Enable correct warnings for CMake tests
2020-01-02 18:47:57 +01:00
Alexander Grund
956ecbf6d1
Use pragma instead of _CRT_SECURE_NO_WARNINGS
...
Allows to detect missing suppressions in headers
2020-01-02 18:47:57 +01:00
Alexander Grund
e972bea06d
Make stackstring return NULL when no string was converted (NULL passed or default constructed)
...
This is important for e.g. freopen where an empty string and a NULL pointer have different meanings
Rename c_str to get to avoid confusion
2020-01-02 18:47:56 +01:00
Alexander Grund
7e4e8c2194
Split tests for convert and stackstring
2020-01-02 18:47:55 +01:00
Alexander Grund
831f4461fd
Improve stdio test
...
Add comment for every subtest
Ensure completeness
2020-01-02 18:47:54 +01:00
Alexander Grund
393b8d510a
Add test for filebuf under non-windows
2020-01-02 18:47:53 +01:00
Alexander Grund
5813bfacec
Add BOOST_NOWIDE_USE_FSTREAM_REPLACEMENTS macro
...
Allows to test the fstream classes on e.g. Linux
They were designed to work cross-platform
2020-01-02 18:47:53 +01:00
Alexander Grund
c50504e388
Rewrite test_fstream
...
Small functions testing subsets
Descriptive comments
Add some missing tests
2020-01-02 18:47:48 +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
Alexander Grund
5c684c0fe6
Combine cenv and system to cstdlib
...
Follows the C++ headers
2020-01-02 18:47:45 +01:00
Alexander Grund
695fb73512
Make instances of stackstring const where possible
2020-01-02 18:47:44 +01:00
Alexander Grund
42d11003a9
filebuf::open should return NULL on already open file
2020-01-02 18:47:43 +01:00
Alexander Grund
17b677aeec
Fix wrong default args for fstream
2020-01-02 18:47:42 +01:00
Alexander Grund
042e5ee28c
Test Copy & Swap of stackstrings
2020-01-02 18:47:41 +01:00
Alexander Grund
e780cce5cb
Initialize buffer of stackstring and test it
2020-01-02 18:47:41 +01:00
Alexander Grund
16d98b0f15
Cleanup includes
2020-01-02 18:47:40 +01:00
Alexander Grund
dd2d60eda3
Add benchmark for fstream
2020-01-02 18:47:38 +01:00
Flamefire
7ab4edb18e
Remove usage of BOOST_WORKAROUND
2019-12-29 21:20:46 +01:00
Flamefire
0f3f4ea69c
Add missing include
2019-12-28 16:02:31 +01:00
Flamefire
3bd6eed183
Enforce uniform formatting via clang-format
2019-12-28 16:02:31 +01:00
Flamefire
d357f7108f
Add CI for CMake project + consumer test
2019-12-27 14:26:31 +01:00
Flamefire
3d6c001fc4
Add proper CMake files
2019-12-27 14:26:31 +01:00
Flamefire
f95ef16706
Remove dependency on Boost.Locale
...
Copy utf.hpp from Boost.Locale
2019-12-27 14:26:31 +01:00
Flamefire
bf51a60bb9
Use boost/detail/workaround
...
Compatibility with Boost < 1.65
2019-12-20 20:34:47 +01:00
Flamefire
1d50c27dce
Fix some warnings
2019-12-18 14:47:14 +01:00
Flamefire
91b3d90b49
Enable pedantic warnings & Werror for tests
2019-12-18 14:46:18 +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
Alexander Grund
9d6c93e055
Merge pull request #24 from Flamefire/putEnvFix
...
Add test for putenv without equals sign
2019-12-14 19:09:09 +01:00
Flamefire
2988c60f61
Handle failure in putenv caused by GLIBC extension
...
The GNU C library implementation provides a nonstandard extension.
If string does not include an equal sign:
putenv("NAME");
then the named variable is removed from the caller's environment.
http://man7.org/linux/man-pages/man3/putenv.3.html
2019-12-14 15:47:53 +01:00
Flamefire
035a21bc9e
Add test for putenv without equals sign
...
Reproducer for #14
2019-12-14 15:47:53 +01:00
Flamefire
f2e95fc899
Remove trailing whitespace
2019-12-14 15:47:01 +01:00
Flamefire
a067f5808b
Remove Debug code
2019-12-14 15:47:00 +01:00
Flamefire
7549c80457
Include C++ headers instead of C variants
2019-12-14 13:35:37 +01:00
Flamefire
872c8eb37f
Fix iostream test
...
The standard guarantees only a putback of 1 char on stdin, our implementation has support for more
Also test that the values read on stdin are indeed UTF-8
2019-12-13 21:14:35 +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