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
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
ee17695de1
Suppress false positives from coverity
2021-11-19 13:25:05 +01:00
Alexander Grund
1b00b06357
Also test the wchar overloads of fstream methods
2021-11-18 13:32:46 +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
7ea7d485b1
Cleanup test files after test run
2021-11-18 13:26:39 +01:00
Alexander Grund
a2cb9ef0ff
Add TEST_THROW macro for testing exceptions
2021-11-18 13:26:38 +01:00
Alexander Grund
81e640634f
Test some more corner cases of filebuf
2021-11-07 21:18:03 +01:00
Alexander Grund
c8a9cb0fc2
Suppress some coverity false positives
2021-04-22 11:20:55 +02:00
Alexander Grund
207b1ca9ef
Don't assume std::fstream can be reopened after moved-from
...
This fails on OSX while it seemingly works everywhere else.
So test this only for the replaced stream
2021-04-20 20:23:57 +02:00
Alexander Grund
aacc57fd18
Move the move and swap tests into the main fails
...
A separate C++11 compilation is no longer required
2021-04-20 20:23:57 +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
0aad7dccf8
Add more tests for filebuf
...
Also some enhancements to file_test_helpers.hpp
2021-04-13 12:16:50 +02:00
Alexander Grund
94daf7b2cf
Enhance fstream tests
2021-04-13 12:16:48 +02:00
Alexander Grund
eb522200e4
Refactor tests
...
Split into smaller files and functions
More strategic tests
2021-04-10 20:29:38 +02:00
Alexander Grund
b96294d59f
Fix incomplete buffer handling in swap and close
...
Swap hat some function confusion when and what to set
Close has to reset get p&g pointers too or reusing a filebuf will lead to a use-after-free bug
2021-03-21 11:44:32 +01:00
Alexander Grund
0c8de5590c
Add reproducer example for seek with newlines
2021-03-21 11:44:31 +01:00
Alexander Grund
52f86627fc
Use automatic file deletion in fstream test
2021-03-21 11:44:31 +01: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
5379ff55b4
Handle/Silence issues from coverity
2020-03-05 16:07:37 +01:00
Alexander Grund
3e391eac15
Rename BOOST_NOWIDE_USE_FSTREAM_REPLACEMENTS to BOOST_NOWIDE_USE_FILEBUF_REPLACEMENT
2020-02-25 15:00:49 +01:00
Alexander Grund
777ed33ad0
[Test] Improve fstream tests
...
- Add test for gcount after get/putback
- Remove "sanity" checks using std streams
- Avoid the need to test the superset of functionality and focus on
what Boost.Nowide (should) provide
- Also avoids compiler quirks (e.g. MSVC or libstdc++ behavior on putback)
2020-02-24 14:32:25 +01:00
Alexander Grund
98b2a398bf
Test for std::string ctor/open on all platforms
2020-02-05 13:07:24 +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
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
74586edc53
Test and fix compile failure in is_open function
2020-01-06 09:42:18 +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
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
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
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
a067f5808b
Remove Debug code
2019-12-14 15:47:00 +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
45411c1cf6
Disable putback('a') test on libc++, as it fails
2019-12-03 20:25:53 +02:00
Peter Dimov
5d162694d3
Flush or seek is necessary between output and input (Alexander Grund)
2019-12-03 19:15:18 +02:00
Peter Dimov
c8fd7bc25a
Revert "Disable 'complex io' test for libc++ as its std::fstream fails it"
...
This reverts commit 071a434d1d .
2019-12-03 19:11:47 +02:00
Peter Dimov
071a434d1d
Disable 'complex io' test for libc++ as its std::fstream fails it
2019-12-03 17:54:43 +02:00
Peter Dimov
aad40783ec
Use file prefix in test_fstream
2019-12-03 16:33:40 +02:00
Peter Dimov
ac7b93b55d
Use lightweight_test
2019-12-03 16:21:45 +02:00
Peter Dimov
56bcf134a6
Add copyright and license
2019-12-03 06:48:35 +02:00
Peter Dimov
8dc69504ca
Disable MS deprecation messages using _CRT_SECURE_NO_WARNINGS, because this works for clang-cl as well
2019-12-03 04:46:53 +02:00
Peter Dimov
e4fe4faa47
Use a temporary directory for test_fstream.cpp, because of -jN
2019-12-03 04:39:35 +02:00