Commit Graph

57 Commits

Author SHA1 Message Date
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
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
Alexey Ochapov
1d4199f46b
fix udl_compiled_string with non-byte chars (e.g. wchar) (#2242) 2021-04-19 08:29:35 -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
Victor Zverovich
14a2a64df4 Fix handling of formattable types with to_string_view (#2181) 2021-03-19 06:43:38 -07:00
Victor Zverovich
f9e0e90441 Apply clang-format 2021-03-10 12:08:02 -08:00
Alexey Ochapov
6a9016ea60
fix formatted_size with "compiled format" as argument (#2161) 2021-03-07 06:44:36 -08:00
Victor Zverovich
6e1fc01752 Move detail::truncating_iterator to fmt/compile.h 2021-03-06 08:35:36 -08:00
Alexey Ochapov
684b5b0e40
Fix fallback to runtime API from compile-time API (#2143)
* fix fallback to the runtime API, add FMT_ENABLE_FALLBACK_TO_RUNTIME_API define, add test

* remove `FMT_ENABLE_FALLBACK_TO_RUNTIME_API`

* pass format string to format_to() inside format_to_n() in compile-time API

instead of compiling it inside format_to_n(), to eliminate code duplication
2021-03-04 07:20:57 -08:00
Alexey Ochapov
29cc8282b1 update chrono duration formatter (constness), use it in compile-test for specs checks 2021-02-20 11:50:12 -08:00
Alexey Ochapov
499047e132 fix incorrect indexing mode for named args, update tests 2021-02-20 11:50:12 -08:00
Alexey Ochapov
78c67157c1 prepare tests, fix incorrect handling of named args with simple {} replacement fields 2021-02-20 11:50:12 -08:00
Alexey Ochapov
95e1aa2dc5 add support for manual indexing and named fields, add tests 2021-02-20 11:50:12 -08:00
Victor Zverovich
7e72673d87 Improve width estimation (#2033) 2021-02-13 09:30:29 -08:00
Alexey Ochapov
d09b5c1453
Fix std::byte formatting with compile-time API (#2072)
* add test for byte formatting with `FMT_COMPILE`

* fix byte formatting with `FMT_COMPILE`, use `__cpp_lib_byte` macro

* use is not custom mapped type check

* workaround MSVC bug
2020-12-27 07:23:28 -08:00
Alexey Ochapov
bbd6ed5bc5
Add support of most format_specs for formatting at compile-time (#2056) 2020-12-25 06:40:03 -08:00
Alexey Ochapov
5de0bc1d4f
Add UDL as replacement for FMT_COMPILE (#2043) 2020-12-07 15:53:11 -08:00
Alexey Ochapov
aabe0a8473
simplify tests by reordering arguments of EXPECT_EQ (#2044) 2020-12-03 14:21:23 -08:00
Alexey Ochapov
683a74501f
fix formatting with empty compiled format string (#2042) 2020-12-02 07:14:57 -08:00
Alexey Ochapov
dac753b81e
Basics of formatting at compile-time based on compile-time API (#2019) 2020-11-29 08:59:11 -08:00
Victor Zverovich
af28305961 Cleanup 2020-10-11 10:13:42 -07:00
Victor Zverovich
c46a8de4e1 Simplify test 2020-09-20 07:24:24 -07:00
rimathia
2696dc9273
add forgotten template argument to make_format_args which made some u… (#1877)
* add forgotten template argument to make_format_args which made some uses of FMT_COMPILE not work anymore after 54daa0864a, add more elaborate test cases to compile-test as regression tests

* fix old-style cast which gcc on travis thankfully doesn't accept anymore

* hopefully last forgotten (void*)
2020-09-20 06:51:11 -07:00
Victor Zverovich
1d696dc280 Handle exotic character types in compilation 2020-09-17 07:12:34 -07:00
Alexey Ochapov
f674434a67
Add format_to_n overload that accepts FMT_COMPILE (from #1767) (#1869)
* Add format_to_n overload that accepts FMT_COMPILE

* add FormatToNWithCompileMacro test into CompileTest

Co-authored-by: Dmitriy Kurkin <Dmitriy.Kurkin@itiviti.com>
2020-09-15 07:28:06 -07:00
Victor Zverovich
54daa0864a Add dynamic width support to FMT_COMPILE (#1809) 2020-08-10 09:40:11 -07:00
Victor Zverovich
c26349f4d2 Improve error reporting 2020-07-14 12:06:12 -07:00
Victor Zverovich
e1bfb59619 Fix handling of code units in compile 2020-07-11 09:03:21 -07:00
Victor Zverovich
4e94c649f9 Deprecate compile 2020-06-23 14:03:37 -07:00
Victor Zverovich
1a83443e6c Add user-defined type support to compilation 2020-06-23 12:45:57 -07:00
Victor Zverovich
9a4cc88426 Add FMT_COMPILE support to format_to 2020-06-20 15:15:41 -07:00
Victor Zverovich
ab2f8484e0 Finish text::format 2020-06-14 11:04:41 -07:00
Victor Zverovich
d702a68df2 Fix formatting of bool with FMT_COMPILE and add more tests 2020-06-14 07:16:50 -07:00
Victor Zverovich
16637341b9 Enable compilation for all types 2020-06-12 13:27:21 -07:00
Victor Zverovich
8069265373 internal -> detail (#1538) 2020-05-10 07:34:30 -07:00
Victor Zverovich
7f723fbcb8 Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00
Daumantas Kavolis
8f27ce4d8b add test for multiple compilation types 2019-09-24 06:25:21 -07:00
Victor Zverovich
a128b5b2cb Simplify format string compilation 2019-09-02 06:48:19 -07:00
Victor Zverovich
466128de00 Remove unused code and refactor 2019-09-01 13:08:53 -07:00
Victor Zverovich
22e98a5b6a Make compile work with user-defined types 2019-09-01 11:49:27 -07:00
Victor Zverovich
e1ab6bc006 Simplify format string compilation 2019-09-01 08:31:32 -07:00
Victor Zverovich
1a7d172dc7 which_value -> kind 2019-08-25 08:08:46 -07:00
Victor Zverovich
4ce006fb6e Simplify format string compilation 2019-08-25 07:48:09 -07:00
Victor Zverovich
a5f470eb10 Test and fix compiled format_to_n and formatted_size 2019-08-25 06:38:41 -07:00
Victor Zverovich
4070c1d80b PrepareTest -> CompileTest 2019-08-25 06:22:13 -07:00
Victor Zverovich
2bb8120d98 Fix a warning 2019-08-11 09:27:59 -07:00
Victor Zverovich
e8219952c6 Restrict fmt::compile to literal strings
to make sure we don't break the API too much when making all of this
compile-time only.
2019-08-10 13:18:11 -07:00
Victor Zverovich
ba63ac8c18 Make format_to a non-member 2019-08-04 06:47:49 -07:00
Victor Zverovich
3fe49163bd Revert "Make format_to a non-member"
This reverts commit a5bd3ddb28.
2019-08-03 16:12:34 -07:00