Victor Zverovich
bba0a9d962
Make flush public
2021-07-30 07:02:49 -07:00
Victor Zverovich
f1794a8853
Switch to threadsafe death test style
2021-07-29 06:56:38 -07:00
Victor Zverovich
5c222f0561
Add support for nonconst formattable types
2021-07-24 09:53:53 -07:00
Spiros Tsalikis
63fe2d5bd2
Add copy constructor for dynamic_format_arg_store, and test
2021-07-23 09:35:09 -07:00
Cameron DaCamara
00235d8a99
fix module test odr violations ( #2414 )
2021-07-17 09:16:49 -07:00
Victor Zverovich
2038bf6183
Update format_to usage
2021-07-13 07:56:24 -07:00
mwinterb
3d53d1539d
Warning removals in test code ( #2399 )
...
* Warning removals in test code.
Mostly 0 to nullptr and adding override to virtual function implementations.
* Fix module-test.
2021-07-09 08:05:02 -07:00
Daniela Engert
f2b03facd9
Include test sources to pick up functions and classes from the module rather than from the non-modular library which is baked into the test-main
library. ( #2356 )
...
This averts linker problems:
- strong ownership model: missing linker symbols
- weak ownership model: duplicate linker symbols
Simplify `gtest-extra.cc` while at it.
2021-07-03 07:21:54 -07:00
Benoît Lormeau
02ad5e11da
Add faint, blink, reverse and conceal to the emphases ( #2394 )
2021-07-02 20:03:55 -07:00
Victor Zverovich
1d7384530e
Add missing presentation type checks for std::string ( #2402 )
2021-07-02 07:51:04 -07:00
Daniela Engert
5221242f6e
Instruct msvc to report the _true_ value in __cplusplus
and force _full_ C++ conformance
...
* do this in _some_ tests to improve test coverage and catch possible problems due to that
* fix invalid export of `static constexpr` constant
* fix msvc warnings about unreachable code in high warning levels
2021-06-24 09:10:08 -07:00
Victor Zverovich
e421d52713
Simplify error handling in parse_nonnegative_int
2021-06-14 16:05:37 -07:00
sunmy2019
f28cf3302d
adding a default format for std::chrono::time_point<std::chrono::syst… ( #2345 )
2021-06-11 10:52:39 -07:00
Daniela Engert
55010a9d3a
Support non-char
overloads (module)
2021-06-11 09:38:53 -07:00
Daniela Engert
0193e7c428
Support compile-time strings and compile-time format string compilation in module
...
Make just the necessary parts available for lookup from client context.
2021-06-11 09:38:53 -07:00
Владислав Щапов
f6b5cc9f84
Fix chrono_test.weekday on legacy glibc
2021-06-10 16:17:10 -07:00
Daniela Engert
59a298f124
Enable enforce-checks-test
for MSVC, too
2021-06-10 12:54:54 -07:00
Victor Zverovich
2039dce75f
Detect consteval
2021-06-07 06:57:43 -07:00
Victor Zverovich
d551b88a6d
Move is_char specializations to xchar.h
2021-06-06 15:32:30 -07:00
Victor Zverovich
16c3514d01
wchar-test -> xchar-test
2021-06-06 07:59:18 -07:00
Victor Zverovich
206000a017
Workaround pathological conversion ( #2343 )
2021-06-06 07:18:44 -07:00
Victor Zverovich
76ee490468
Move wchar/custom char overloads to xchar.h
2021-06-05 22:57:45 -07:00
Victor Zverovich
e77b22d6da
Deprecate memory buffer overload of format_to
2021-06-05 14:58:36 -07:00
Владислав Щапов
f286139d22
Fix "undefined reference to `fmt::v7::detail::basic_data<void>::digits'"
...
Remove unused FMT_EXTERN_TEMPLATE_API
2021-06-02 14:33:17 -07:00
Victor Zverovich
d338d66324
Cleanup the printf implementation
2021-06-01 19:30:46 -07:00
Daniela Engert
70e67ae018
Re-enable module testing
...
Prepare for compilation with gcc (modules branch).
2021-06-01 14:49:56 -07:00
Victor Zverovich
ad97258915
Merge branch 'master' of github.com:fmtlib/fmt
2021-06-01 13:38:26 -07:00
Victor Zverovich
ed2a6377e7
Workaround msvc constexpr issues
2021-06-01 13:32:44 -07:00
Alexey Ochapov
9976869549
fix custom types formatting at compile-time, add test
2021-06-01 11:16:05 -07:00
Victor Zverovich
bf9904ee4d
Workaround msvc bugs
2021-05-31 08:25:05 -07:00
Victor Zverovich
577bce9029
Apply clang-format
2021-05-31 08:09:10 -07:00
Daniela Engert
ba4c7f193b
Swap parameter order to match #2327 ( #2329 )
2021-05-31 07:44:33 -07:00
Victor Zverovich
11a14db286
Update format_to taking a buffer and remove undocumented vformat_to overload
2021-05-30 07:57:51 -07:00
Victor Zverovich
486a80e8ef
Move wchar_t overloads to xchar.h
2021-05-30 06:41:39 -07:00
Victor Zverovich
ff37e41625
wchar.h -> xchar.h because it handles other code unit types too
2021-05-29 09:37:17 -07:00
Victor Zverovich
a9a9018191
Move wmemory_buffer to wchar.h
2021-05-29 08:26:04 -07:00
Daniela Engert
272b0f36b3
More module tests ( #2309 )
...
core.h, format.h, args.h, chrono.h, color.h, printf.h, os.h
2021-05-28 15:49:39 -07:00
Matthias Liedtke
98b9ff47a1
Align hex floats right as default ( #2317 )
2021-05-28 09:21:01 -07:00
Liedtke
a70a4ae053
Ignore zero-padding for non-finite floating points ( #2310 )
...
* Ignore zero-padding for non-finite floating points
* keep width for non-finite formatting with 0-padding
* clang-format
* preserve alignment
* align code-style
2021-05-27 14:13:05 -07:00
Alexey Ochapov
ee52a6dc40
add fmt::print()
overload to support compiled format ( #2304 )
2021-05-25 14:54:56 -07:00
Victor Zverovich
35a2c2a743
Refactor chrono formatting
2021-05-25 06:57:47 -07:00
Victor Zverovich
883d9595c5
Support alternative locale names in tests
2021-05-24 14:09:19 -07:00
Victor Zverovich
1cd9899cf3
Add initial support for weekday formatting
2021-05-24 10:21:34 -07:00
Victor Zverovich
069131dc25
Add unicode-test
2021-05-24 06:20:51 -07:00
Victor Zverovich
703005c8ba
Deprecate locale.h
2021-05-22 10:21:17 -07:00
Victor Zverovich
34b8acaef7
More wchar_t-specific API to wchar.h
2021-05-21 18:24:39 -07:00
Daniela Engert
5a0d99fa0b
Add a test for the module
2021-05-20 10:26:31 -07:00
Victor Zverovich
63271a51c4
Fix ADL issues
2021-05-20 06:31:43 -07:00
Victor Zverovich
61b4c923d7
Reduce code bloat
2021-05-20 05:51:45 -07:00
Victor Zverovich
95c358f721
Improve separation between code unit types
2021-05-19 09:06:57 -07:00
Victor Zverovich
e9c1c415b8
Improve compile-time checks
2021-05-19 07:57:57 -07:00
Victor Zverovich
0dd91e20d5
Add wchar.h for wide char overloads
2021-05-17 21:59:10 -07:00
Victor Zverovich
d35f1ad5c1
Cleanup core
2021-05-16 10:02:33 -07:00
Alexey Ochapov
54f22a3eef
add support for statically named arguments with FMT_STRING
2021-05-14 16:31:10 -07:00
Владислав Щапов
0036a1d195
Fix issue #2274 .
2021-05-10 15:57:23 -07:00
Владислав Щапов
2a9b314627
Replace fmt::error_code to std::error_code
2021-05-09 12:26:19 -07:00
Владислав Щапов
4211d86539
Add a formatter specialization for std::error_code.
2021-05-09 06:29:39 -07:00
Victor Zverovich
39f28424ca
Cleanup tests
2021-05-07 21:27:58 -07:00
Victor Zverovich
2665afb515
Cleanup add-subdirectory-test
2021-05-07 16:42:02 -07:00
Victor Zverovich
d0abe7c246
Make chrono formatting locale-independent by default
2021-05-07 16:14:10 -07:00
Victor Zverovich
16f2ef91ab
Replace fmt::system_error with std::system_error
2021-05-07 08:33:39 -07:00
Victor Zverovich
4b885c8633
Replace windows_error with system_error
2021-05-07 06:19:03 -07:00
Victor Zverovich
9c3af11a92
Cleanup tests
2021-05-05 18:31:41 -07:00
Victor Zverovich
f0095ccd34
Add support for ranges of types without formatters to join ( #2262 )
2021-05-05 07:43:46 -07:00
Victor Zverovich
400b953fbb
Use [] instead of {} in ranges for consistency with Python format
2021-05-04 21:04:21 -07:00
Victor Zverovich
38bcc04a11
Drop range limit and cleanup tests
2021-05-04 20:53:56 -07:00
Victor Zverovich
c738c3431f
Cleanup tests
2021-05-04 17:23:13 -07:00
Victor Zverovich
ed7c4320f6
Cleanup tests
2021-05-02 09:28:38 -07:00
Victor Zverovich
9155e2de4c
Cleanup tests
2021-05-01 17:11:45 -07:00
Victor Zverovich
38127d9ec0
Cleanup tests
2021-04-30 15:50:03 -07:00
Victor Zverovich
c9c0e5077d
Cleanup tests
2021-04-30 06:42:38 -07:00
Victor Zverovich
ccf4ccde23
Cleanup tests and format string compilation
2021-04-29 19:50:04 -07:00
Victor Zverovich
e96a92f869
Cleanup tests and format string compilation
2021-04-29 16:21:08 -07:00
Alexey Ochapov
fd43e4dcbc
gtest: fix std::is_trivially_copy_constructible for GCC 4.8 & 4.9 properly
...
`std::is_pod<T>` was deprecated in C++20
original (pre `is_pod`) error on GCC 4.8:
```
/fmt/test/gtest/gtest.h: In static member function 'static constexpr bool testing::internal::MatcherBase<T>::IsInlined()':
/fmt/test/gtest/gtest.h:6512:12: error: 'is_trivially_copy_constructible' was not declared in this scope
std::is_trivially_copy_constructible<M>::value &&
^
/fmt/test/gtest/gtest.h:6512:45: error: expected primary-expression before '>' token
std::is_trivially_copy_constructible<M>::value &&
^
/fmt/test/gtest/gtest.h:6512:46: error: '::value' has not been declared
std::is_trivially_copy_constructible<M>::value &&
^
```
2021-04-29 07:11:49 -07:00
Alexey Ochapov
3d51ccdaae
gtest: remove obsolete GTEST_LANG_CXX11
compile definition setting
2021-04-29 07:11:49 -07:00
Alexey Ochapov
833377ff1e
gtest: add .clang-format
file into test/gtest
directory to prevent formatting there
2021-04-29 07:11:49 -07:00
Alexey Ochapov
53ca0cbe75
gtest: move GTest/GMock files to separate directory, update GTest/GMock usages
...
* all GTest/GMock files moved to `test/gtest` directory
* `CMakeLists.txt` created in `test/gtest` from `CMakeLists.txt` in `test`
* GTest/GMock target in CMake renamed to `gtest` (was `gmock`)
* CMake `gtest` target updated to export includes as "gtest/gtest.h" or "gmock/gmock.h" only
* includes in tests updated: "gtest.h" -> "gtest/gtest.h", "gmock.h" -> "gmock/gmock.h"
* removed duplications of `target_include_directories` for GTest/GMock directories (CMake manages them)
2021-04-29 07:11:49 -07:00
Victor Zverovich
355be4b13f
Make FMT_COMPILE fallback on runtime without if constexpr ( #2261 )
2021-04-28 09:11:47 -07:00
Victor Zverovich
847aac4315
Follow naming conventions in tests
2021-04-25 21:26:30 -07:00
Victor Zverovich
39818e7979
Cleanup core-test
2021-04-25 17:59:23 -07:00
Ilya Kurdyukov
0e6f989b0d
__THROW warning fix for e2k ( #2253 )
2021-04-25 08:51:37 -07:00
Alexey Ochapov
ca821982ee
use named arg with static name in compile-time API
...
to get arg index by name at compile-time
2021-04-25 07:53:49 -07:00
Victor Zverovich
bb006f9735
Replace TYPED_TEST_CASE with TYPED_TEST_SUITE
2021-04-24 17:46:49 -07:00
Victor Zverovich
6956b10b2d
Fix gcc 4.8 build
2021-04-24 11:04:34 -07:00
Victor Zverovich
b4f9a05894
Update gtest
2021-04-24 11:03:40 -07:00
Victor Zverovich
8a040d187a
Cleanup core-test
2021-04-23 20:07:48 -07:00
Victor Zverovich
5b2c740ad8
Remove deprecated APIs
2021-04-23 15:27:25 -07:00
Victor Zverovich
b9ab5c8836
Remove printf.h dependency on ostream.h
2021-04-23 10:42:57 -07:00
Alexey Ochapov
1d4199f46b
fix udl_compiled_string with non-byte chars (e.g. wchar) ( #2242 )
2021-04-19 08:29:35 -07:00
crbrz
9260114162
Ranges wide strings support ( #2236 )
...
* Ranges copy wchar_t
* arg_join formatter not working for wide strings
* Added ranges wide string tests
Co-authored-by: Cristi <cristi@emailaddressmanager.com>
2021-04-16 06:25:35 -07:00
denchat
24c9751558
Try to suppress MVSC warn of narrowing ( #2230 )
2021-04-13 07:30:43 -07:00
Alexey Ochapov
b441532396
CI linux: add clang++-11 C++20 (with LLVM libc++) build
...
* find-package-test fixed by passing CXX_FLAGS, i.e. -stdlib=libc++
* std::array usage in compile-test.cc replaced with plain array, because
<array> header was not included
2021-04-10 07:20:05 -07:00
denchat
273d8865e3
Suppress redef warning of _CRT_SECURE_NO_WARNINGS if any. ( #2218 )
2021-04-08 11:56:35 -07:00
Victor Zverovich
5a8bf1f6a3
Workaround hexfloat inconsistency on windows ( #2205 )
2021-04-07 11:20:08 -07:00
Victor Zverovich
06b3a1000c
Add support for time points with arbitrary durations ( #2208 )
2021-04-02 11:17:14 -07:00
Jason Cobb
c62e4c30f4
Make buffer_appender default-constructible when back_insert_iterator is
2021-04-01 09:52:44 -07:00
Victor Zverovich
afe23e7f10
Don't call fileno on NULL file in tests ( #2196 )
2021-03-30 10:41:12 -07:00
vtta
14848875bf
Fix: fmt::ostream cannot be moved while holding buffered data #2197 ( #2198 )
...
* Add a test case: move ostream while holding data
* Fix moving ostream while holding data
Co-authored-by: Junliang HU <jlhu@cse.cuhk.edu.hk>
2021-03-30 08:43:26 -07:00
Vladislav Shchapov
4dc7170d21
Fix C++17 builds: ( #2192 )
...
- Fix C++17 Visual Studio builds.
- Use C++17 for `windows-2019` builds.
- Removed options for unsupported compiler (MSVC11).
- Removed options, not needed after enabling C++11+ features in gmock/gtest.
2021-03-26 06:19:43 -07:00
Victor Zverovich
417e1cee9e
Stop using deprecated UDL templates
2021-03-19 08:34:55 -07:00