Victor Zverovich
d5e918b61f
Detect C++14 compiler support
2017-09-28 08:57:54 -07:00
Victor Zverovich
643fb0662e
Check for argument indexing switch
2017-09-27 21:18:37 -07:00
Victor Zverovich
d45544d14e
Fix width handling in dynamic formatting
2017-09-27 19:04:15 -07:00
Mário Feroldi
2a619d96dd
Make format work with C++17 std::string_view ( #571 )
...
Tests for C++17 std::string_view
2017-09-20 06:21:11 -07:00
Victor Zverovich
8cbf544733
Add parse context
2017-09-17 09:05:01 -07:00
Victor Zverovich
ec4f5175f1
Replace Range with ParseContext in parse()
2017-09-16 17:07:03 -07:00
Victor Zverovich
0cda806dcc
Fix compile tests
2017-09-08 11:25:49 -07:00
Victor Zverovich
fced79b0ee
Get rid of old compat macros
2017-09-08 08:26:05 -07:00
Victor Zverovich
c18a4041f9
Remove conditional and to_iterator
2017-09-04 13:56:14 -07:00
Victor Zverovich
af00e4f9c9
Remove printf_arg_formatter from format.h and cleanup
2017-09-04 12:28:53 -07:00
Victor Zverovich
0fbd846561
Replace fmt::internal::make_unsigned with std::make_unsigned
2017-09-04 11:41:15 -07:00
Victor Zverovich
8a2bc0ab1b
Add nullptr support
2017-09-04 11:10:08 -07:00
Victor Zverovich
80505995d0
Allow delayed type checking
2017-09-04 09:33:22 -07:00
Victor Zverovich
3e75d3e001
Fix handling of types convertible to int
2017-09-02 07:08:19 -07:00
Alex Alabuzhev
89654cd127
to_wstring added
2017-08-27 18:52:57 +02:00
Victor Zverovich
47c84d7974
Move part of write API (spec factories) to a separate header
2017-08-27 09:08:44 -07:00
Victor Zverovich
20168147dd
Add ptr, a helper function for pointer formatting
2017-08-27 08:41:28 -07:00
Victor Zverovich
27ad6cee82
Use standard enable_if
2017-08-26 10:41:58 -07:00
Victor Zverovich
64681739fd
Fix a warning
2017-08-26 09:32:37 -07:00
Victor Zverovich
016acebb56
Remove legacy code
2017-08-26 09:09:43 -07:00
Victor Zverovich
466386d5cd
Suppress a warning in gmock
2017-08-26 08:50:09 -07:00
Victor Zverovich
5e0562ab51
Separate parsing and formatting
2017-08-13 13:09:02 -07:00
Victor Zverovich
032c83807f
Fix a segfault in test on glibc 2.26 #551 , take 2
2017-08-10 09:27:06 -07:00
Victor Zverovich
6655e804c4
Fix a segfault in test on glibc 2.26 #551
2017-08-06 20:18:04 -07:00
Victor Zverovich
1102d46508
Make format spec parsing context-independent
2017-07-30 08:58:24 -07:00
Victor Zverovich
45911770c5
Separate parsing and formatting in extension API
2017-07-29 07:50:16 -07:00
Victor Zverovich
2f4f49fd60
Switch from cstring_view to string_view
2017-07-22 08:24:37 -07:00
Victor Zverovich
d16582a038
Move printf-related code to printf.cc
2017-07-15 09:46:18 -04:00
Mario Werner
ac5484c4e7
add alias targets with fmt namespace
...
For the consumer it should not matter if fmt has been added to the
project as subdirectory or via find_package. With the alias targets
the library can be always imported via fmt::fmt.
2017-05-25 14:36:16 +03:00
Mario Werner
746adc5e71
added new namespace to the header only target in the find package test
2017-05-25 14:36:16 +03:00
Bjoern Thiel
048d2aec27
CMake imported targets should be namespaced
2017-05-21 14:17:12 +03:00
Victor Zverovich
07ed421521
Fix handling of implicit conversion to integral types larger than int ( #507 )
2017-05-06 10:23:20 -07:00
Victor Zverovich
dcfd40a1b8
Revert #456
...
Revert #456 because it causes issues for known types (#495 ) and is not C++98-compatible.
2017-05-06 08:36:54 -07:00
Andreas Schönle
79f11dbaa7
Allow compiling and using as DLL in windows ( #502 )
...
* printf.h fixed to compile clean - need to check whether this is the right
thing to do
* fix warnings and errors in test compiles with BUILD_SHARED_LIBS
* did requested changes and added one change to allow all tests to succeed
in windows DLL
2017-05-05 14:58:09 +02:00
effzeh
73ca9948fe
Fix FormatBuf implementation ( #491 )
...
Fixes #491 (and probably #480 ) Before, the put-area of the custom streambuf
implementation was (sometimes) incorrectly extended beyond the writeable buffer.
The new implementation is in some cases not as efficient as the old, but avoids
to write into uninitialized memory.
2017-04-08 09:07:33 -07:00
Arthur Danskin
cbac016cce
%.f should have zero precision, not default precision
2017-04-08 07:18:10 -07:00
Victor Zverovich
12252152ac
CStringRef -> cstring_view
2017-03-26 15:13:10 -07:00
Victor Zverovich
32ec13f149
Switch to C++ locale
2017-03-25 08:20:06 -07:00
Victor Zverovich
b4f4b7e21a
Clean the buffer API ( #477 )
2017-03-12 09:48:21 -07:00
Victor Zverovich
f423e46835
Replace clear() with resize(0) and data_ -> store_
2017-03-11 08:30:15 -08:00
Victor Zverovich
7175bd8ae6
Fix error on MinGW
2017-03-09 06:09:43 -08:00
Victor Zverovich
7258d1b8f3
Fix tests
2017-03-08 08:08:08 -08:00
Victor Zverovich
3610f34c70
Fix windows build
2017-03-04 07:10:54 -08:00
Victor Zverovich
6f8006c2ce
Add printf overloads that takes a writer ( #476 )
2017-02-25 09:58:42 -08:00
Victor Zverovich
db0d54f855
Fix error on MinGW
2017-02-25 09:00:56 -08:00
Victor Zverovich
c333dca065
Follow standard naming conventions
2017-02-21 06:56:26 -08:00
Victor Zverovich
6a2ff287b2
Follow standard naming conventions
2017-02-19 08:05:41 -08:00
Victor Zverovich
eedfd07f8b
internal::MemoryBuffer -> basic_memory_buffer
2017-02-18 09:13:12 -08:00
Victor Zverovich
4ec8860783
ArgFormatter -> arg_formatter
2017-02-18 07:46:32 -08:00
Victor Zverovich
50e716737d
StringRef -> string_view, LongLong -> long_long
2017-02-18 07:34:52 -08:00
Victor Zverovich
e022c21ddc
Fix windows build
2017-02-18 06:29:33 -08:00
Victor Zverovich
87b691d80c
Merge StringWriter into StringBuffer
2017-02-17 06:23:16 -08:00
Victor Zverovich
c2f021692f
Merge ArrayWriter into FixedBuffer
2017-02-17 06:09:26 -08:00
Victor Zverovich
fefaf07b6f
Pass buffer instead of writer to format_value
2017-02-14 19:39:34 -05:00
Victor Zverovich
6e568f3a08
buffer -> basic_buffer
2017-02-14 12:08:37 -05:00
olivier80
a00006119f
Add join argument allowing formating list of values separated by a ( #466 )
...
Add join argument allowing formating list of values separated by a
string. Each value is formated according the format specifier.
2017-02-08 06:55:12 -08:00
Victor Zverovich
a13b96ed88
Simplify API
2017-02-05 06:54:03 -08:00
Victor Zverovich
624c58682d
Simplify API
2017-02-05 06:41:39 -08:00
Victor Zverovich
7ae8bd7073
basic_format_arg -> basic_arg, Buffer -> buffer
2017-02-05 06:09:06 -08:00
Victor Zverovich
296e9cada2
FrmatSpec -> format_spec
2017-01-28 12:51:35 +00:00
Victor Zverovich
984a102921
Remove IntFormatSpec and StrFormatSpec
2017-01-28 04:26:48 -08:00
Victor Zverovich
4863730eca
Remove pad
2017-01-22 19:11:47 -08:00
Victor Zverovich
aaa0fc396b
Improve compatibility with old compilers and fix test
2017-01-22 12:16:16 -08:00
Victor Zverovich
aea5d3ab00
Improve compatibility with older gcc and update tests
2017-01-22 11:50:52 -08:00
Victor Zverovich
ec15ef7b7b
Replace operator<< with write function
2017-01-22 10:00:34 -08:00
Andreone
67662702aa
allow to stream user defined types in a MemoryWriter ( #456 )
...
* allow to stream user defined types in a MemoryWriter
* fix indent
* follow Google C++ Style
* make code c++98 compatible
* fix macro usage
* disable ability to stream user defined types if not at least c++11
* fix for disable ability to stream user defined types if not at least c++11
* use FMT_STATIC_ASSERT
2017-01-19 20:47:43 +01:00
mojoBrendan
d8754af063
Allow %s as generic format specifier in printf ( #453 )
...
* Allow %s as generic format specifier in printf
Signed integers are formatted as %d
Unsigned integers are formatted as %u
Doubles are formatted as %f
Chars are formatted as %c
Void Pointers are formatted as %p
* Remove '%S' handling and use visitor for generic format strings
* Default for floating point is now "%g" rather than "%f"
2017-01-14 11:45:48 -08:00
Jean-Charles Lefebvre
e0251fdcef
BasicContainerWriter utility added
2017-01-05 20:44:35 -08:00
Victor Zverovich
8428621ddc
BasicWriter -> basic_writer
2016-12-30 12:26:12 -08:00
Jean-Charles Lefebvre
e1689cb985
Custom FormatSpec ( #439 ) ( #444 )
...
* A custom FormatSpec type can be passed as a template argument to the ArgFormatter chain (#439 )
* Corrected nested-name-specifier error
* Spec template argument defaulted to FormatSpec
* Forward declaration of FormatSpec
* Style
* Style (part 2)
* Style (part 3)
2016-12-30 11:29:40 -08:00
Victor Zverovich
939aff2936
Remove unnecessary template arg from basic_format_args
2016-12-30 10:19:38 -08:00
Victor Zverovich
b2a0d8914a
Merge value and MakeValue
2016-12-30 09:25:01 -08:00
Victor Zverovich
acd1811c50
Value -> value
2016-12-30 08:05:26 -08:00
Victor Zverovich
42a319074c
Parameterize Value on context
2016-12-29 18:07:05 -08:00
Victor Zverovich
d705d51671
Parameterize basic_format_arg on context ( #442 )
2016-12-29 15:25:22 -08:00
Victor Zverovich
422236af7c
Don't erase writer type
2016-12-28 07:55:33 -08:00
Victor Zverovich
abb6996f36
MakeArg -> make_arg
2016-12-27 07:55:44 -08:00
Victor Zverovich
ee1651ce07
Handle empty format_arg state
2016-12-27 07:43:25 -08:00
Victor Zverovich
d86e51e9c1
Don't inherit basic_format_arg from internal::Value
2016-12-24 07:46:50 -08:00
Victor Zverovich
f05888692c
Fix handling of unpacked args ( #437 )
2016-12-23 08:24:48 -08:00
Victor Zverovich
6cba8fe9ba
Move stuff out of internal::Value
2016-12-15 07:51:40 -08:00
Victor Zverovich
fac5546321
Fix test compilation for FreeBSD ( #433 )
2016-12-14 06:28:41 -08:00
Victor Zverovich
e1ee5bf0ba
Replace StringValue with StringRef
2016-12-11 21:13:54 -08:00
Victor Zverovich
0854f8c3bf
Parameterize formatting argument on char type.
2016-12-11 15:43:11 -08:00
Victor Zverovich
9cf6c8fdc6
Get rid of fmt::internal::Arg
2016-11-26 10:21:31 -08:00
Victor Zverovich
284297019f
Merge BasicArgFormatter and ArgFormatter
2016-11-20 09:36:27 -08:00
Victor Zverovich
d4084ac5b1
Get rid of ArgVisitor
2016-11-20 09:11:13 -08:00
Victor Zverovich
d58cc8a4a8
Merge BasicPrintfArgFormatter and PrintfArgFormatter
2016-11-20 07:42:38 -08:00
Victor Zverovich
796beaaddb
Fix collision with global convert function ( #425 )
2016-11-19 12:05:49 -08:00
Victor Zverovich
c9dc41ab3f
Replace ArgVisitor::visit with a free visit function
2016-11-19 07:59:54 -08:00
alabuzhev
25f8ad13dd
Correction of 418 ( #420 )
2016-11-11 18:27:39 +01:00
alabuzhev
1d2049b53e
Issue #418 - Minimal supported library subset ( #419 )
2016-11-10 20:29:12 +01:00
Victor Zverovich
55a1ac5035
Fix test
2016-11-07 08:55:40 -08:00
Victor Zverovich
85793a18cd
Simplify API
2016-11-06 19:27:14 -08:00
Victor Zverovich
9998f66f8c
Replace formatter with context
2016-11-06 18:59:17 -08:00
Victor Zverovich
6274401919
Fix warnings
2016-11-06 12:37:31 -08:00
Victor Zverovich
1daddec151
FMT_NULLPTR -> FMT_NULL and improve formatting
2016-11-06 09:05:58 -08:00
alabuzhev
49ccb2e449
Using FMT_NULLPTR instead of literal 0
2016-11-03 06:39:40 -07:00
Victor Zverovich
2bba420337
Pass writer directly to format_value ( #400 )
2016-10-26 17:54:11 -07:00
Victor Zverovich
b656a1c133
Make value the second argument to format_value
2016-10-25 06:19:19 -07:00
Victor Zverovich
edf98792a5
Pass writer to format_value
2016-10-25 05:55:40 -07:00
Victor Zverovich
be613204ab
Char -> char_type
2016-10-22 08:19:19 -07:00
Victor Zverovich
f85d5f4dac
BasicFormatter -> basic_formatter
2016-10-22 08:04:20 -07:00
Victor Zverovich
18dfa257d0
Pass correct formatters to make_format_args
2016-10-21 06:46:21 -07:00
codicodi
1e018e65cb
Thread-safe time formatting
...
This adds thread-safe (at least on platforms that provide necessary extensions) replacement functions for std::localtime and std::gmtime. Alternatively they could be placed in a new source file time.cc, but time.h seems so empty right now...
2016-10-17 07:00:04 -07:00
Victor Zverovich
dafbec7553
Fix type safety when using custom formatters ( #394 )
2016-10-07 08:37:06 -07:00
Victor Zverovich
65a8c2c343
format_arg -> format_value
2016-10-02 08:49:10 -07:00
Victor Zverovich
8a77e7927e
Enable C++11 in tests.
2016-10-01 07:18:55 -07:00
Victor Zverovich
1e8553d679
Enable C++11 in tests.
2016-10-01 07:02:58 -07:00
Victor Zverovich
6fd6ecc10d
Enable C++11 for no-windows-h-test
2016-09-28 07:45:28 -07:00
Victor Zverovich
209a1d58bf
Get rid of macros
2016-08-27 09:06:21 -07:00
Victor Zverovich
0d8aca8de3
Get rid of FMT_VARIADIC_VOID
2016-08-27 08:16:49 -07:00
Victor Zverovich
4ece95a754
Make make_format_args public
2016-08-27 07:57:48 -07:00
Victor Zverovich
0028ce57b6
Get rid of FMT_VARIADIC
2016-08-26 17:23:13 -07:00
Victor Zverovich
43c0095aa3
Refactor type mapping
2016-08-26 08:50:09 -07:00
Victor Zverovich
4873685c7e
ArgArray -> format_arg_store
2016-08-26 06:44:41 -07:00
Victor Zverovich
fc73e10620
ArgList -> format_args
2016-08-25 08:50:07 -07:00
Victor Zverovich
92605eb4f7
Remove FMT_USE_VARIADIC_TEMPLATES
2016-08-25 08:44:53 -07:00
Victor Zverovich
9bb213e920
FormatError -> format_error
2016-08-25 08:38:07 -07:00
Victor Zverovich
a79c7b4e8f
Fix handling of unsigned char strings ( #373 )
2016-08-23 08:42:25 -07:00
Victor Zverovich
f19d8f9655
Improve error reporting ( #357 )
2016-08-16 07:08:53 -07:00
Victor Zverovich
a5d0adf395
Use a heuristic to detect empty strftime result ( #367 )
2016-08-05 07:27:56 -07:00
Victor Zverovich
1a23f9c274
Correct buffer growth when formatting time ( #367 )
2016-08-04 08:47:59 -07:00
Victor Zverovich
9dbb60c4c8
Move fmt::fprintf to printf.h
2016-08-03 08:52:05 -07:00
Victor Zverovich
6ee9f2ed09
Make printf argument formatters public ( #335 , #360 )
2016-07-21 06:59:28 -07:00
Victor Zverovich
ab054532ce
Move writer to PrintfFormatter object for consistency with BasicFormatter
2016-07-20 08:21:13 -07:00
Victor Zverovich
d4ddaaf2b1
Make PrintfFormatter public ( #335 , #360 )
2016-07-20 08:09:14 -07:00
Victor Zverovich
65cd664195
Fix handling of wide strings in StringWriter
2016-07-18 08:47:11 -07:00
Victor Zverovich
1acfd07f1e
Workaround broken MinGW installation on AppVeyor ( #355 )
2016-07-16 08:00:53 -07:00
Victor Zverovich
d4885cea62
Document BasicStringWriter
2016-07-16 08:00:53 -07:00
Victor Zverovich
8631694021
check -> const_check to avoid a conflict with AssertMacros.h ( #350 )
2016-07-12 06:40:23 -07:00
Victor Zverovich
0e6df7e511
Fix handling of thousands separator ( #353 )
2016-07-11 06:31:23 -07:00
Victor Zverovich
4569b4dbd6
Fix -Wpessimizing-move
2016-06-14 15:53:40 -07:00
Victor Zverovich
c9bb5468b6
Fix clang warning
2016-06-14 15:42:32 -07:00
Glen Stark
72d51e0b1e
Implemented #335 : custom printf support
2016-06-09 08:41:56 -07:00
Victor Zverovich
96c28f748d
Detect if lconv contains thousands_sep
2016-05-23 07:41:22 -07:00
Victor Zverovich
e160c2b79a
Add fmt prefix to includes ( #332 )
...
Technically it is not necessary, but prevents errors when people add the
fmt directory itself rather than its parent to includes.
2016-05-22 16:42:44 -07:00
Victor Zverovich
e2a332e5df
Use a mock to test locale support
2016-05-19 17:38:44 -07:00
Victor Zverovich
5b106083e7
Check if setlocale succeeded
2016-05-19 06:48:35 -07:00
Victor Zverovich
b6c0cf9683
Add fmt::to_string ( #326 )
2016-05-18 19:54:52 -07:00
Victor Zverovich
d00b43c592
Workaround an issue with "delete this" in GMock and gcc 6.1.1
2016-05-14 17:58:14 -07:00
Victor Zverovich
cc9b051d12
Move format_system_error to the public API ( #323 )
2016-05-13 07:19:39 -06:00
Victor Zverovich
90730e706b
Move ostream support to ostream.{h,cc}
2016-05-06 07:37:20 -07:00
Dean Moldovan
f3d6d3a8f2
Fix find-package-test failure with non-default compiler
...
The failure would happen when the main project was configured with
a compiler which is not the system default. The new configuration
was not forwarded to "ctest --build-and-test". This fixes it.
2016-05-04 00:51:28 +02:00
Dean Moldovan
8eaad79de7
Fix FMT_STATIC_ASSERT compile test
...
FMT_STATIC_ASSERT is defined in posix.h so expect_compile_error was
actually failing on a missing macro instead of the static assert.
2016-05-04 00:36:48 +02:00
Dean Moldovan
131d446183
Fix compile tests not clearing the cache after an error
...
The cache bug meant that a failed test would appear forever broken,
even if the proper fix was applied.
2016-05-04 00:36:11 +02:00
Dean Moldovan
3a04ebf14f
Fix user-defined literal detection for Intel C++ compiler
2016-05-03 13:43:51 +02:00
Victor Zverovich
fa5ebd27d4
Implement time formatting
2016-04-25 08:07:27 -07:00
Victor Zverovich
afd67497de
cppformat -> fmt
2016-04-24 09:06:12 -07:00
Victor Zverovich
5e1576f79f
cppformat -> fmt
2016-04-24 08:17:47 -07:00
vitaut
bfdca8b576
Make ArgVisitor public and document it
...
Also remove unnecessary namespace qualification.
2016-04-20 09:11:33 -07:00
vitaut
b69e6dcead
Make BasicArgFormatter public and add ArgFormatter
...
This allows providing custom argument formatters without relying on
internal APIs (#235 ).
2016-04-19 08:56:31 -07:00
vitaut
f68771abe4
Implement locale-specific integer formatting
2016-04-17 19:06:03 -07:00
vitaut
581afee039
Enable wstring in gtest ( #304 )
2016-04-13 08:26:42 -04:00
vitaut
a99891e7a5
Use a mock to test custom argument formatter
2016-03-19 07:36:28 -07:00
vitaut
52f89065e1
Make argument formatter customizable
2016-03-19 07:20:31 -07:00
vitaut
9ffe98c00e
Fix/suppress MSVC warnings
2016-03-19 06:39:33 -07:00
vitaut
63d7f3d116
Don't check for C++11 features if C++11 support is disabled
2016-03-18 08:10:06 -07:00
vitaut
c052cf11b9
Improve coding style consistency
2016-03-18 07:59:04 -07:00
vitaut
0c901efb16
Use less strict pedantic flags for tests because of GMock ( #291 )
2016-03-18 07:52:24 -07:00
vitaut
59607f5e99
Fix warnings on GCC 4.6.3
2016-03-09 07:47:08 -08:00
vitaut
763d1fe6a3
Suppress warnings in Google Mock
2016-03-08 07:36:22 -08:00
vitaut
7d6622942c
Break a long line
2016-03-08 06:55:41 -08:00
vitaut
0867c1b447
Test writing to ostream
2016-03-08 06:47:53 -08:00
Michael Winterberg
8f4b8edb8b
Added test of error code that forces the insufficient buffer code path.
2016-03-04 17:47:37 -08:00
vitaut
3ecad55910
Fix sign conversion warnings
2016-03-02 07:53:14 -08:00
vitaut
9d577cae6f
Fix handling of negative error codes in format_error_code
2016-03-02 07:01:21 -08:00
vitaut
6500f161f7
Fix a warning in freelocale mock ( #274 )
2016-02-11 06:55:53 -08:00
vitaut
abd93d824a
Move gmock into test/
2016-02-10 07:16:49 -08:00
vitaut
2b2aa8926f
add_subdirectory-test -> add-subdirectory-test for consistency
2016-02-10 07:01:40 -08:00
vitaut
70e44a8e7f
Simplify locale mock
2016-02-09 11:31:04 -08:00
vitaut
b8c6192a61
Simplify build config and enable C++11 by default
2016-02-09 08:43:39 -08:00
Mario Werner
6a79a3279b
build and test in c++11 and in c++98 mode
2016-02-07 18:23:02 +01:00
vitaut
1adee75e1c
Check if -fno-delete-null-pointer-checks flag is supported
2016-02-04 08:36:41 -08:00
vitaut
a4b611a3d3
Workaround GTest bug 705 ( #268 )
2016-02-04 08:15:19 -08:00
vitaut
220bb764e5
Use quotes for local includes
2016-02-04 08:08:33 -08:00
Mario Werner
b09c83504e
test for gnu++98 instead for c++98 because of mingw ...
2016-02-03 14:11:30 +01:00
Mario Werner
3133925ab2
Merge branch 'master' into update-project-layout
...
Conflicts:
posix.h
2016-02-03 13:15:26 +01:00
Mario Werner
03b9485cb3
perform the slower tests only in PEDANTIC mode
2016-02-03 13:05:18 +01:00
Mario Werner
ded46cc1b6
build test-main library again to improve build time
2016-02-03 12:59:03 +01:00
Mario Werner
c1a4cd0fa7
check if cppformat is the master project or just used as dependency
...
Based on that information less intrusive option defaults are choosen.
Additionally, packaging support is omitted.
2016-02-03 11:20:19 +01:00
Mario Werner
797d72133e
restored smoke test for syntax compatibility with the 98 c++ standard
2016-02-03 10:01:53 +01:00
Mario Werner
e0e8f717a0
FMT_USE_FILE_DESCRIPTORS is apparently only needed for the tests
2016-02-03 09:14:32 +01:00
vitaut
cfb25b0e80
Use typedefs instead of macros
2016-02-02 22:06:54 -08:00
vitaut
e489f879c3
Add locale tests
2016-02-02 17:21:09 -08:00
Mario Werner
c0e926109e
use the same warning options like before the PR
...
Additional notes on how to improve the current state have been added.
2016-02-02 17:14:51 +01:00
Mario Werner
b05a02b91c
remove comment which is now superfluous since the code has been moved
2016-02-02 17:04:12 +01:00
Mario Werner
d411aa165e
use quotes for including cppformat headers from the tests
2016-02-02 16:58:41 +01:00
Mario Werner
0a4acc9656
use the cmake and ctest to drive the appveyor build
2016-02-01 10:22:47 +01:00
Mario Werner
d3fe82c55b
propagate the build type into the find test
2016-01-31 20:17:39 +01:00
Mario Werner
a659d8079e
Merge branch 'master' into update-project-layout
2016-01-31 17:00:05 +01:00
Mario Werner
00fda9b25a
add a test for the find script on the build directory
2016-01-31 00:02:49 +01:00
Mario Werner
4aeeb49d23
updated compile-test and include a working test
...
This makes sure that the test does not break due to other reasons.
2016-01-30 23:49:39 +01:00
Mario Werner
fee52f79b8
update the includes in the tests to get rid of the deprecated warnings
2016-01-30 22:33:37 +01:00
vitaut
95c0fb5075
Add a "C" numeric locale
2016-01-29 16:29:46 -08:00
Mario Werner
5e7ab2f4ea
major cleanup of the test folders CMakeLists.txt
...
The new code does not rely on globally defined include directories
anymore. Additionally a lot of conditional code and has been removed
which improves readability a lot.
2016-01-29 16:21:17 +01:00
Mario Werner
b52d0bd9d4
define cppformat cmake targets with proper interface definitions
2016-01-29 13:23:08 +01:00
Mario Werner
0fb474be3a
outlined the compiler feature tests to improve script readability
2016-01-29 13:03:47 +01:00
Mario Werner
3019a8c1fd
moved code into cppformat subdirectory
...
Proxy headers have been placed into the project root to emit
deprecation warnings.
2016-01-29 12:49:35 +01:00
vitaut
7ee287d3d9
Sign extend arguments of smaller types passed to %ll? ( #265 )
2016-01-27 07:03:19 -08:00
vitaut
8474a6232d
Don't perform narrowing conversion for integers in printf ( #255 )
2016-01-24 00:43:42 +01:00
Mario Werner
ef7bbfff87
removed workaround for cmake versions prior to 2.8.10
2016-01-13 09:54:02 +01:00
vitaut
97e9ed11bc
Set interface include dir for gmock
2016-01-09 08:07:31 -08:00
vitaut
f55bf55d43
Correct comment
2016-01-09 08:06:59 -08:00
Nicholas Hutchinson
1a5a1708b7
Add fprintf overload that writes to a std::ostream
...
For completeness, add an overload for printf that takes a std::ostream.
2015-12-23 15:59:13 +13:00
vitaut
1cba0aea27
Simplify CMake config and do minor adjustments
...
for consistency with used coding conventions.
2015-12-10 07:24:23 -08:00
Maciej Dems
c47318afa8
Declarations for shared library in Windows.
...
Added __declspec(dllimport) and __declspec(dllexport) declarations
when compiled in Windows.
2015-12-10 13:36:18 +01:00
vitaut
e7f4566dd4
Replace <algorithm> with <memory>
...
~20% faster compile time on bloat-test
2015-12-04 22:57:36 -08:00
vitaut
0ea73df717
Merge branch 'custom-formatter'
2015-12-04 07:24:09 -08:00
vitaut
aa7bb101ed
Undefine fileno if defined in posix-test
2015-12-03 20:17:04 -08:00
vitaut
6ced4230f4
Initial support for custom formatters
2015-12-02 08:41:05 -08:00
vitaut
b8bd80ff28
Fix handling of empty non-null-terminated strings
2015-11-25 09:49:01 -08:00
vitaut
6cff6d8137
Use overloaded operator<< for enums if available ( #232 )
2015-11-24 08:18:19 -08:00
vitaut
1a2a333a1a
Use format specifiers when formatting null pointers & strings
2015-11-23 21:01:28 -08:00
vitaut
8beadace37
Improve detection of isinf, isnan and getsign
2015-11-21 07:20:18 -08:00
vitaut
9c03176e6b
Fix util-test
2015-11-13 15:16:10 -08:00
vitaut
2157375d5c
Use textual formatting for bool with %s
specifier in printf ( #224 )
2015-11-13 07:18:44 -08:00
vitaut
57ba9436a0
Format null string as (nil)
with p
specifier
2015-11-12 06:09:08 -08:00
vitaut
b5fda1c90d
Format null pointer as (nil) and null string as (null) in printf ( #226 )
2015-11-11 07:57:19 -08:00
vitaut
d6d019aa12
Don't assume that StringRef::compare returns +/-1
2015-11-11 06:44:57 -08:00
vitaut
aa741bafe6
Don't assume that char_traits::compare returns +/-1 ( #225 )
2015-11-10 06:40:20 -08:00
vitaut
8b86a74ad5
Allow formatting C strings as pointers ( #223 )
2015-11-09 07:17:36 -08:00
vitaut
7c24973637
Format (un)signed char as integer by default ( #217 )
2015-11-05 20:46:22 -05:00
vitaut
2d727e7d0e
Suppress bogus coverity warnings
2015-10-28 07:01:28 -07:00
vitaut
ae48a4c6f9
Add missing include
2015-10-22 08:56:52 -07:00
vitaut
f080b62047
Implement StringRef comparison operators
...
and use lexicographical comparison (#183 )
2015-10-22 08:41:42 -07:00
vitaut
fb27723a9f
Try fixing bogus coverity warnings, take n
2015-10-22 07:33:01 -07:00
vitaut
b64913b00b
Suppress bogus coverity warnings
2015-10-22 05:58:37 -07:00
vitaut
ecbfdb46d3
Fix sanitize
2015-10-21 10:39:58 -07:00
vitaut
23e84472b2
Hook Coverity model file
2015-10-21 08:45:48 -07:00
vitaut
ab25cd2c8b
Suppress a bogus coverity warning
2015-10-21 08:30:10 -07:00
vitaut
13e0e38d99
Workaround a bogus coverity warning
2015-10-21 07:17:48 -07:00
vitaut
cd097d334e
Workaround bogus coverity warnings
2015-10-21 06:16:55 -07:00
vitaut
c684886dfc
Make coverity happy
2015-10-20 08:29:41 -07:00
vitaut
221dd0cb66
Try workaround for a bogus Coverity warning
2015-10-20 07:22:38 -07:00
vitaut
d25d775ae6
Suppress bogus coverity warnings
2015-10-20 06:26:31 -07:00
vitaut
5a648b300f
Suppress another bogus warning in Coverity
2015-10-19 08:39:31 -07:00
vitaut
85a93a8078
Suppress another bogus warning in Coverity
2015-10-19 08:25:30 -07:00
vitaut
56d3b9135f
Try a workaround for a bogus Coverity warning
2015-10-19 08:17:05 -07:00
vitaut
e81c0aef39
Fix bogus coverity warnings.
2015-10-18 09:16:10 -07:00
vitaut
b2714f83cc
FMT_NO_STREAM_LIBRARIES -> FMT_USE_IOSTREAMS
...
for consistency with similar macros and removed unnecessary
checks.
2015-10-18 08:50:35 -07:00
Richard Maxwell
2cca51c744
Issue 205: Make iostream support optional.
2015-10-16 08:04:53 +13:00
Dean Moldovan
c0813c59f3
Work around UDL macro stringification bug on some versions of GCC
...
See bug report: https://gcc.gnu.org/ml/gcc-bugs/2015-04/msg02027.html
2015-10-09 11:55:36 +02:00
Dean Moldovan
bc6010cc21
Add _a literal for named arguments
2015-09-27 04:09:37 +02:00
Dean Moldovan
a63a24f2d7
Add _format literal
2015-09-27 04:00:24 +02:00
vitaut
ef710dee6c
Add sprintf overload for wide strings
...
and fix an issue in formatting user-defined objects.
Thanks to @ScottLangham
2015-09-18 16:26:41 -07:00
vitaut
79d8f59906
Implement formatting of objects with (s)printf.
2015-09-08 08:36:20 -07:00
vitaut
b3714625c0
Fix compilation with FMT_PEDANTIC=ON
2015-08-19 08:03:17 -07:00
vitaut
1bba22667e
Fix build on CMake 2.6
2015-08-19 07:32:48 -07:00
vitaut
4274f15f0d
Move test-specific stuff to test/CMakeLists.txt
2015-08-19 07:27:08 -07:00
vitaut
b247d81046
Fix warnings
2015-08-07 07:39:04 -07:00
vitaut
c3ba615c65
Fix warnings
2015-08-07 07:34:58 -07:00
vitaut
a8a2982b9a
Fix test
2015-08-07 07:13:43 -07:00
vitaut
ca7478144d
Fix warnings
2015-08-07 07:08:46 -07:00
vitaut
5b8d0a7aa9
Make Coverity happy
2015-08-04 07:22:03 -07:00
vitaut
7e12c5c9df
Use scoped_ptr instead of raw pointers in tests
2015-07-31 08:54:54 -07:00
vitaut
d15e0d3e06
Use scoped_ptr instead of raw pointers in tests
2015-07-31 08:23:39 -07:00
vitaut
d02a5031f0
Use scoped_ptr instead of deprecated auto_ptr
2015-07-29 07:03:15 -07:00
vitaut
200037683e
Initialize next_arg_index_ in ctor ( #187 )
2015-07-28 08:10:46 -07:00
vitaut
c4d0bc1ac9
Fix Coverity warnings
2015-07-28 07:18:14 -07:00
vitaut
6cf24c7f92
Fix MSVC warnings
2015-07-08 08:04:32 -07:00
vitaut
f3bef7ac92
Fix open_buffered_file
2015-07-08 07:48:54 -07:00
vitaut
b6c1c9233a
Workaround an issue with VC2010
2015-07-08 07:36:36 -07:00
vitaut
c669cbedf8
Rename None to Null because of conflict with an xlib.h macro
2015-07-07 07:05:17 -07:00
vitaut
438bd9b0e6
Add BasicCStringRef to represent a null-termated string ( #100 )
...
and use it instead of BasicStringRef in cases that assume that the
string is null-terminated such as POSIX function and format string
parser.
2015-06-26 07:43:54 -07:00
vitaut
88c7c20102
Fix posix-test on FreeBSD ( #179 )
2015-06-25 07:06:30 -07:00
vitaut
5b9b485f57
Workaround a bug in MinGW
2015-06-24 11:36:28 -07:00
vitaut
0a7e5141c1
Move posix tests from gtest-extra-test to a separate test
2015-06-24 09:16:03 -07:00
vitaut
9769f4b9ed
Refactor posix tests
2015-06-24 08:43:30 -07:00
vitaut
e5b16e80cc
Include sys/types.h for ssize_t
2015-06-24 07:59:19 -07:00
vitaut
948317b6dd
Fix FormatLongDouble test on PowerPC ( #180 )
2015-06-23 07:39:49 -07:00
vitaut
b88a17ad9e
libformat.{a.so} -> libcppformat.{a.so}
...
as suggested by Eugene V. Lyubimkin to make the name less generic
2015-06-23 06:40:22 -07:00
vitaut
abcc2d96f0
Fix assertion tests
2015-06-22 09:24:54 -07:00
vitaut
8ab665afbc
Only use death tests if available
2015-06-22 08:17:23 -07:00
vitaut
8450f5e1d3
FormatIntTest: FormatDec: don't assume signedness of char type
...
Thanks to Eugene V. Lyubimkin for the patch.
2015-06-22 07:03:26 -07:00
vitaut
e39490500c
Replace implicit conversion to std::string with to_string
2015-06-17 07:59:41 -07:00
vitaut
8725d07d8b
Place the anonymous namespace within the fmt namespace
...
for header-only configuration as suggested by Alf Steinbach.
2015-06-12 07:56:58 -07:00
vitaut
24c309fbfa
Don't use windows.h if FMT_USE_WINDOWS_H is set to 0
2015-06-12 07:15:57 -07:00
vitaut
9d09214e7a
Use textual representation for bool by default ( #170 )
2015-06-11 09:00:06 -07:00
vitaut
fd5c2e909b
Report error when using precision with char
2015-06-11 08:58:31 -07:00
vitaut
b83ab16676
Break long lines
2015-06-11 06:14:42 -07:00
jamboree
3c99ed4498
Fix name parsing
2015-06-11 12:03:22 +08:00
jamboree
7487bde587
Support named arguments
2015-06-10 09:32:59 +08:00
vitaut
ed2dfe5124
Implement writing narrow strings into a wide writer
2015-06-09 08:20:44 -07:00
vitaut
8949a2e941
Fix formatting
2015-06-08 06:53:18 -07:00
jamboree
54a6cb34c7
Support runtime width specification
2015-06-04 13:59:37 +08:00
vitaut
90a12b1bb2
Fix warnings
2015-05-12 08:57:21 -07:00
vitaut
a5757c86df
FMT_EXTRA_TESTS -> FMT_PEDANTIC and use it to control extra warnings
2015-05-12 07:35:29 -07:00
vitaut
c8688576f2
Fix MinGW build
2015-05-11 19:10:31 -07:00
vitaut
8035c3eb30
Workaround a bug in the definition of fstat on some versions of MinGW
2015-05-11 08:44:40 -07:00
vitaut
3913f29ad7
Fix posix-test on MinGW
2015-05-11 07:57:08 -07:00
vitaut
2da08f21dd
Only run compile-test if FMT_EXTRA_TESTS is set
...
These tests can be quite time-consuming especially on Windows
2015-05-11 07:34:07 -07:00
vitaut
3e03934d15
If std::swprintf is broken, disable relevant test and warn about it
2015-05-08 07:57:43 -07:00
vitaut
85b985e9f2
Workaround a bug in formatting long double in MinGW, take 3
2015-05-07 08:17:30 -07:00
vitaut
3e379829a0
Workaround a bug in formatting long double in MinGW, take 2
2015-05-07 07:25:39 -07:00
vitaut
673a4525f6
Workaround a bug in formatting long double in MinGW
2015-05-07 07:18:46 -07:00
vitaut
40681e6037
Fix compilation of posix-test on MinGW
2015-05-06 07:29:58 -07:00
vitaut
ca2cadb1c6
Fix compilation when fileno is a macro
...
This can happen on broken versions of MinGW.
2015-05-06 07:19:42 -07:00
vitaut
87cb2935f8
Test and fix handling of exactly MAX_PACKED_ARGS arguments
2015-05-01 06:55:26 -07:00
vitaut
8d2559bd96
Reduce compiled code size
...
If the number of arguments is less than MAX_PACKED_ARGS, pass
the arguments as a Value array rather than Arg array.
2015-04-20 10:02:41 -07:00
vitaut
62c483c940
Test EnableIf
2015-04-20 08:08:02 -07:00
vitaut
60405cf693
Use /W4 in format-test and only if FMT_EXTRA_TESTS is set
...
as (1) we don't want to force /W4 on users of the library and (2) some of
the warnings only show up when the formatting functions are used.
2015-03-28 17:29:12 -07:00
vitaut
3a5573ac6e
Revert commit 3c3ae4e319
2015-03-27 07:36:26 -07:00
vitaut
3c3ae4e319
MakeValue -> MakeArg
2015-03-25 07:04:16 -07:00
vitaut
00df5c91f3
Merge Value into Arg
2015-03-25 06:48:21 -07:00
vitaut
cf04d98d06
Pass as many types as possible in a single integer to reduce code bloat
2015-03-24 08:55:40 -07:00
Shauren
a445e727c2
Added support to format more than 16 arguments with printf API when using variadic templates
2015-03-20 21:31:10 +01:00
vitaut
906432161b
Make Buffer part of the public API
2015-03-20 06:31:24 -07:00
vitaut
a53ac7ad5c
Workaround mingw bugs
2015-03-19 07:39:24 -07:00
vitaut
2adbfa4af7
Test IsConvertibleToInt with a C++11 enum
2015-03-18 11:02:37 -07:00
vitaut
538c2610cb
Move FMT_USE_VARIADIC_TEMPLATES definition to macro-test.cc
2015-03-17 07:57:30 -07:00
vitaut
a530052b7e
Only include crtdbg.h when compiling with MSVC
2015-03-16 18:05:45 -07:00
vitaut
eccd5e8d15
Fix test
2015-03-16 09:17:18 -07:00
vitaut
93ae73adbc
Fix a typo
2015-03-16 09:05:46 -07:00
vitaut
5aecd4947f
Use GetFileSize instead of GetFileSizeEx on Windows
2015-03-16 08:52:23 -07:00
vitaut
57f9f06619
More mingw fixes
2015-03-12 08:11:04 -07:00
vitaut
6bca5ca109
Woraround a bug in MinGW
2015-03-12 07:49:01 -07:00
Victor Zverovich
5821aec7b9
Implement printing of values that are convertible to int such as enums
2015-03-10 07:53:46 -07:00
Victor Zverovich
beaf6f7436
Add a fixed-size array writer
2015-03-01 18:08:24 -08:00
Victor Zverovich
2e3423b053
Update compile-test
2015-03-01 17:03:44 -08:00
Victor Zverovich
da6ac7fb26
Fix tests
2015-03-01 16:12:26 -08:00
Victor Zverovich
8a915b9b8d
Update compile-test
2015-03-01 14:13:45 -08:00
Victor Zverovich
642b72cd91
Fix StringRef test
2015-02-24 09:52:16 -08:00
Victor Zverovich
53010624a0
Move Windows implementation of print_colored to a separate branch
...
as it needs further testing.
2015-02-19 07:54:59 -08:00
Victor Zverovich
5b0a9bbe85
Improve StringRef test
2015-02-17 06:45:45 -08:00
Carter Li
3f574c1611
Silence warnings on Windows
2015-02-17 10:11:42 +08:00
Victor Zverovich
bd133382f0
Fix BasicWriter::write without formatting arguments on C++11 ( #109 )
2015-02-16 14:32:38 -08:00
Carter Li
e2583ab5f3
Use throw() when noexcept is not supported
2015-02-14 09:58:29 +08:00
Victor Zverovich
cfd476bb8b
Temporarily disable the test as the fix didn't work.
2015-02-08 20:41:13 -08:00
Ryuuke
5a9dc8f991
windows cli colors revision and test case
2015-02-08 16:08:29 +00:00
Victor Zverovich
0bd32f3f29
Merge branch 'master' of github.com:cppformat/cppformat
2015-01-08 07:56:19 -08:00
Victor Zverovich
43aebf51d6
Allow precision specifier for non-float arguments
2015-01-08 07:56:08 -08:00
Mikolaj Paraniak
7f706171a9
Add format linking to tests
2015-01-06 16:57:07 +01:00
Victor Zverovich
cd828a8691
Add a test for https://github.com/cppformat/cppformat/issues/86
2015-01-05 07:16:26 -08:00
Victor Zverovich
67e196eac4
Make test libraries static
2014-12-19 07:39:13 -08:00
Victor Zverovich
fb12cfd196
Suppress more bogus warnings
2014-12-17 06:53:32 -08:00
Victor Zverovich
c630d1f236
Disable "secure" warnings in posix.
2014-12-16 07:07:09 -08:00
Victor Zverovich
df580969f7
Add a test for header-only configuration
2014-12-09 06:22:55 -08:00
Victor Zverovich
615c1eef6b
Fix error handling in fmt::fprintf.
2014-11-14 09:40:01 -08:00
Victor Zverovich
8ea9f068c7
Convert tabs to spaces
2014-11-07 07:58:49 -08:00
Victor Zverovich
ed92af29b3
Add missing ')'
2014-10-30 13:58:16 -07:00
Victor Zverovich
14984acd27
Fix UTF conversion tests
2014-10-30 13:00:44 -07:00
Victor Zverovich
daca48cb15
Fix MSVC build
2014-10-30 12:20:08 -07:00
Victor Zverovich
cabe5bddb4
Fix util-test
2014-10-30 08:07:28 -07:00
Victor Zverovich
10d83aaa52
Test that StringRef size computation
2014-10-30 06:27:44 -07:00
Alexey Morozov
4d3126c567
sign-compare warnings fixes
2014-10-14 03:28:47 +07:00
Victor Zverovich
755ecb0311
Fix warnings
2014-10-13 08:39:38 -07:00
Victor Zverovich
5189274797
Fix warnings
2014-10-13 06:46:07 -07:00
Victor Zverovich
8b76e97062
Support compilation with exceptions disabled
2014-10-06 08:30:55 -07:00
Victor Zverovich
fae3ae67b9
Fix util-test
2014-10-01 09:32:31 -07:00
Victor Zverovich
03f7f99f4c
Fix build on pre-C++11 compilers
2014-10-01 08:24:47 -07:00
Victor Zverovich
8b9a6e03f6
Test buffer
2014-10-01 08:12:10 -07:00
Victor Zverovich
74dc571ba0
Support signed char and unsigned char strings
2014-09-30 08:15:56 -07:00
Victor Zverovich
98a25ec7cb
Test Buffer
2014-09-30 07:30:27 -07:00
Victor Zverovich
313b259891
Use type_traits to test if copyable/assignable
...
Replace compile tests that check if types are copy constructible and copy assignable with normal tests that use type_traits (if available).
2014-09-30 07:30:05 -07:00
Victor Zverovich
d00f689c40
Fix type_traits check
2014-09-29 11:03:18 -07:00
Victor Zverovich
b79d06a5da
Escape quotes
2014-09-29 10:44:48 -07:00
Victor Zverovich
2846a9eb38
Check if is_copy_assignable is working
...
is_copy_assignable is broken in MSVC.
2014-09-29 10:42:16 -07:00
Victor Zverovich
810f42c0c7
Fix util-test on Windows, take 2
2014-09-29 09:59:49 -07:00
Victor Zverovich
55a16eaec7
Fix util-test on Windows
2014-09-29 09:37:33 -07:00
Victor Zverovich
a309c4bbed
Fix posix-test on Windows
2014-09-29 09:28:44 -07:00
Victor Zverovich
dd90129066
Check if type_traits actually work.
2014-09-29 09:15:41 -07:00
Victor Zverovich
d1ded569ff
Separate memory management and formatting
...
Array is split into an abstract Buffer class and a concrete MemoryBuffer class. BasicWriter now does all memory allocation through a Buffer object. Subclasses of BasicWriter may use different buffer types. The new BasicMemoryBuffer class uses the default MemoryBuffer.
2014-09-29 08:48:16 -07:00
Victor Zverovich
b2bd63d2d9
Test ArgList
2014-09-25 09:11:51 -07:00
Victor Zverovich
c2f02df2f5
Fix warning in clang
2014-09-25 07:38:16 -07:00
Victor Zverovich
75a2ea03a7
Reduce code bloat
...
Special case C strings because there is no need to handle size for them. Add support for pre-C++11 compilers to make_type.
2014-09-25 07:10:44 -07:00
Victor Zverovich
ae8bc36e57
MakeArg -> MakeValue
2014-09-24 08:07:50 -07:00
Victor Zverovich
ec1aea34e6
Refactor type processing
2014-09-24 07:48:45 -07:00
Victor Zverovich
ab6e759291
pointer_value -> pointer
2014-09-23 08:21:58 -07:00
Victor Zverovich
d2973766ea
ArgBase -> Value
2014-09-23 08:11:03 -07:00
Victor Zverovich
beb00edf73
Store types in ArgList instead of Arg
2014-09-23 07:59:43 -07:00
Victor Zverovich
49222dc0c7
Improve allocator test
2014-09-23 07:58:23 -07:00
Victor Zverovich
b9a568b1dd
Add support for custom memory allocator to BasicWriter
2014-09-19 07:51:42 -07:00
Victor Zverovich
6a98f42336
Add support for custom allocators
2014-09-18 09:07:40 -07:00
Victor Zverovich
c76b22405d
Replace GTest with GMock (includes GTest)
2014-09-17 08:01:42 -07:00
Victor Zverovich
b54d6e7124
Fix posix-test, take 3.
2014-09-12 18:22:45 -07:00
Victor Zverovich
94daf27c9d
Fix posix-test, take 2.
2014-09-12 17:41:04 -07:00
Victor Zverovich
434e83a192
Fix posix-test.
2014-09-12 17:16:22 -07:00
Victor Zverovich
ddd95965e1
Fix MaxSize test.
2014-09-12 16:52:15 -07:00
Victor Zverovich
a3062f6647
Disambiguate a call
2014-09-12 16:18:04 -07:00
Victor Zverovich
352b6ae496
Workaround more Windows crap.
2014-09-12 15:18:11 -07:00
Victor Zverovich
74169e4b5d
Add a portable getpagesize() implementation
2014-09-12 13:53:52 -07:00
Victor Zverovich
cb7caa540f
Move FMT_STATIC_ASSERT to header and test.
2014-09-12 12:05:32 -07:00
Victor Zverovich
949c3c5df4
Test if File::size can handle maximum file size.
2014-09-12 11:12:22 -07:00
Victor Zverovich
e34e9fa0c7
Add File::size and make File's ctor take StringRef.
2014-09-12 10:50:16 -07:00
Victor Zverovich
d59fbdcd4a
Increase the maximum number of formatting arguments on compilers without variadic templates to 15.
2014-09-11 21:18:36 -07:00
Victor Zverovich
445663fade
Fix windows build.
2014-09-05 10:56:00 -07:00
Victor Zverovich
f2c9df8e9f
Move safe_strerror to anonymous namespace.
2014-09-05 08:44:41 -07:00
Victor Zverovich
b33d2aa825
Workaround Windows braindamage.
2014-09-05 08:06:07 -07:00
Victor Zverovich
88e0db8486
Test format_error_code.
2014-09-05 08:04:26 -07:00
Victor Zverovich
d4916d9271
Add missing file.
2014-09-05 07:35:00 -07:00
Victor Zverovich
fe9888a1e2
Move implementation tests to format-impl-test.
2014-09-05 07:12:20 -07:00
Victor Zverovich
93bcad6d8e
Fix Windows build.
2014-09-03 08:10:20 -07:00
Victor Zverovich
22f75d8b6d
Don't throw exceptions from error formatting functions. Gracefully fallback to a less descriptive message instead.
2014-09-03 08:03:05 -07:00
Victor Zverovich
605d2600f8
Improve error reporting.
2014-08-29 07:45:55 -07:00
Victor Zverovich
271fa8c908
Improve handling of format strings in custom arguments.
2014-08-29 07:23:54 -07:00
Victor Zverovich
ab35af53c5
Check result of fread.
2014-08-29 06:57:26 -07:00
Victor Zverovich
564da25932
Add ctor & print method to BufferedFile.
2014-08-28 11:53:05 -07:00
Victor Zverovich
279c7a6e6a
Change "number is too big in format" to "number is too big" because the error can occur not only in the format function.
2014-08-28 06:50:52 -07:00
Victor Zverovich
526b7fc91d
Throw exception in parse_nonnegative_int if the number is too big.
2014-08-28 06:42:59 -07:00
Victor Zverovich
da0f7c0a51
Improve error reporting in parse_arg_index.
2014-08-27 09:04:51 -07:00
Victor Zverovich
42de4f1f7d
Get rid of FormatErrorReporter.
2014-08-27 08:24:31 -07:00
Victor Zverovich
8cc0d21124
Move the Crash Reporter fix to Google Test where it belongs.
2014-08-23 10:25:21 -07:00
Victor Zverovich
59a462c67d
Make sure that Crash Reporter is not invoked on death tests.
2014-08-23 10:04:06 -07:00
Victor Zverovich
f9561671cf
Write docs.
2014-08-21 07:30:00 -07:00
Victor Zverovich
da0293c4dd
Add missing include.
2014-08-21 07:29:23 -07:00
Victor Zverovich
03cdf1235a
Test printf.
2014-08-21 07:14:02 -07:00
Victor Zverovich
f1ac0a19e9
Test float.
2014-08-20 08:21:06 -07:00
Victor Zverovich
be00d8b272
Convert integer argument like printf does.
2014-08-19 08:49:10 -07:00
Victor Zverovich
c4a4a05d12
Improve handling of char in printf.
2014-08-19 08:14:21 -07:00
Victor Zverovich
f2be7851cc
Fix a warning.
2014-08-19 07:29:30 -07:00
Victor Zverovich
e0f92d675e
Fix a warning.
2014-08-19 07:14:25 -07:00
Victor Zverovich
39ac84f01e
Comment.
2014-08-18 07:03:22 -07:00
Victor Zverovich
186734cf8b
Fix warnings.
2014-08-18 07:03:12 -07:00
Victor Zverovich
c978d88183
Test ArgConverter.
2014-08-15 08:40:13 -07:00
Victor Zverovich
fb32161fa4
Move implementation specific stuff from format.h to format.cc.
2014-08-15 08:40:03 -07:00
Victor Zverovich
c7cfa7d4e7
More tests.
2014-08-15 06:58:24 -07:00
Victor Zverovich
1a0c76a81a
Fix formatting of long double.
2014-08-13 07:51:02 -07:00
Victor Zverovich
18f1e08685
Test 'll' specifier.
2014-08-13 06:59:29 -07:00
Victor Zverovich
ddd087d8d1
Test more length specifiers.
2014-08-13 06:42:15 -07:00
Victor Zverovich
5614295aa1
Test 'l' specifier.
2014-08-12 08:15:39 -07:00
Victor Zverovich
7c14431211
Enable 'h' speciffier tests.
2014-08-12 06:49:27 -07:00
Victor Zverovich
adbf3f8b86
Rewrite length specifier tests without using printf to workaround broken MSVC implementation.
2014-08-11 08:34:17 -07:00
Victor Zverovich
137153b9f0
Take integer promotion into account.
2014-08-11 06:54:58 -07:00
Victor Zverovich
910dec5ed3
Fix 'l' specifier test.
2014-08-11 06:33:40 -07:00
Victor Zverovich
028d12dacd
Disable 'l' specifier tests.
2014-08-09 10:12:36 -07:00
Victor Zverovich
316ae7e244
Implement more printf length specifiers.
2014-08-09 10:04:35 -07:00
Victor Zverovich
6a8becb5bf
Rearrange tests to simplify inclusion in other projects, part 2.
2014-08-09 09:07:15 -07:00
Victor Zverovich
56fb75c2ec
Rearrange tests to simplify inclusion in other projects.
2014-08-09 09:04:38 -07:00
Victor Zverovich
bdbacde659
Test 'h' specifier.
2014-08-09 08:53:14 -07:00
Victor Zverovich
3465d056e7
Test hh specifier with unsigned char.
2014-08-08 06:59:17 -07:00
Victor Zverovich
566061d1f1
Fix formatting of signed ints in test.
2014-08-06 08:21:12 -07:00
Victor Zverovich
e04b07921f
Debug length specifier test.
2014-08-06 07:16:49 -07:00
Victor Zverovich
8b41b09add
Test 'hh' and 'h' printf specifiers.
2014-08-06 07:00:04 -07:00
Victor Zverovich
86bbd3c238
Test hh length.
2014-08-05 08:21:47 -07:00
Victor Zverovich
b797d39dd1
Test printf length.
2014-08-05 07:52:59 -07:00
Victor Zverovich
fc10d10b6b
Disable hh specifier tests for now because broken MSVC's printf causes test failures.
2014-08-01 08:50:09 -07:00
Victor Zverovich
a259c941e2
Implement 'l' length specifier.
2014-08-01 07:15:27 -07:00
Victor Zverovich
d81fafc295
Fix tests on MSVC, take 2.
2014-07-31 07:43:14 -07:00
Victor Zverovich
3f444fe3e2
Fix tests on MSVC.
2014-07-31 06:47:24 -07:00
Victor Zverovich
e2f0408b69
Print format string on failure.
2014-07-30 10:59:23 -07:00
Victor Zverovich
f4156b57f0
Implement 'hh' length specifier in printf.
2014-07-30 08:39:07 -07:00
Victor Zverovich
39b0930aee
Improve handling of 'h' length specifier in printf.
2014-07-30 08:08:08 -07:00
Victor Zverovich
eeca22357b
Handle 'h' length specifier in printf.
2014-07-30 07:37:16 -07:00
Victor Zverovich
e4c4e4e944
Improve handling of dynamic precision in printf.
2014-07-30 06:51:35 -07:00
Victor Zverovich
d346a4120d
FormatDec -> format_decimal
2014-07-29 08:45:29 -07:00
Victor Zverovich
138c3dccdc
Fix tests.
2014-07-29 08:11:49 -07:00
Victor Zverovich
8f8fd769ee
Fix Fix https://github.com/cppformat/cppformat/issues/50 in tests too.
2014-07-29 07:50:05 -07:00
Victor Zverovich
7a83dcd23e
Mind the lifetime.
2014-07-28 13:30:09 -07:00
Victor Zverovich
7e40ca6a9c
Fix a warning.
2014-07-28 09:08:21 -07:00