Commit Graph

752 Commits

Author SHA1 Message Date
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
Victor Zverovich
4d049cf598 More fixes for https://github.com/cppformat/cppformat/issues/50. 2014-07-28 08:41:50 -07:00
Victor Zverovich
75b5eb4b9d More fixes for https://github.com/cppformat/cppformat/issues/50. 2014-07-27 15:09:05 -07:00
Victor Zverovich
5d4803a567 More fixes for https://github.com/cppformat/cppformat/issues/50. 2014-07-27 12:53:42 -07:00
Victor Zverovich
a997de90eb Fix https://github.com/cppformat/cppformat/issues/57. 2014-07-25 07:10:33 -07:00
Victor Zverovich
ee24839cbd Fix tests. 2014-07-24 09:07:43 -07:00
Victor Zverovich
a7d94f0c61 Fix https://github.com/cppformat/cppformat/issues/55. 2014-07-22 12:37:10 -07:00
Victor Zverovich
e2a66c58e5 Simplify and test ArgVisitor. 2014-07-16 07:55:31 -07:00
Victor Zverovich
e3a2ac8725 Move StringValue to Arg & simplify StringTraits. 2014-07-14 08:04:17 -07:00
Victor Zverovich
8a66bb89b2 Complete ArgVisitor test. 2014-07-14 07:27:07 -07:00
Victor Zverovich
a7a18fac89 Fix util-test. 2014-07-14 07:17:58 -07:00
Victor Zverovich
591ad0a64a Add ArgVisitor. 2014-07-14 06:55:29 -07:00
Victor Zverovich
4ecfdd50b6 Suppress error dialogs on assertion failures in MinGW. 2014-07-10 11:05:26 -07:00
Victor Zverovich
c0d55e6308 Remove WriteArrayOfUnknownSize because it shouldn't compile according to standard. 2014-07-10 08:42:33 -07:00
Victor Zverovich
16985f4764 Fix one more test failure on MinGW. 2014-07-09 10:13:44 -07:00
Victor Zverovich
d3a7a4c209 Fix StrError test. 2014-07-09 10:11:10 -07:00
Victor Zverovich
53a475ac94 Do fix a test. 2014-07-09 10:01:36 -07:00
Victor Zverovich
897397760c Fix a test. 2014-07-09 09:55:13 -07:00
Victor Zverovich
e3a44c11f6 Add an overload of print that accepts std::ostream. 2014-07-09 06:56:36 -07:00
Victor Zverovich
ed421848b3 Test passing an array of unknown size as an argument. 2014-07-09 06:45:20 -07:00
Victor Zverovich
b9a06bafd8 internal::FormatParser -> BasicFormatter. 2014-07-08 16:38:50 -07:00
Victor Zverovich
e825156add Move FormatParser to the internal namespace. 2014-07-08 16:20:33 -07:00
Victor Zverovich
f711266244 Test MakeArg. Clean the API. 2014-07-04 07:18:44 -07:00
Victor Zverovich
144e1fbb7c Disallow formatting of wide strings when using a narrow string formatter. 2014-07-04 06:56:19 -07:00
Victor Zverovich
4e260e8599 Test MakeArg and fix formatting. 2014-07-03 08:50:57 -07:00
Victor Zverovich
43a873f7ff Typo 2014-07-02 09:12:25 -07:00
Victor Zverovich
9fbdc32adc Test MakeArg and handle bool, signed char and unsigned char. 2014-07-02 08:38:31 -07:00
Victor Zverovich
b8174bec30 Use Kill-o-Zap 2014-07-01 09:17:37 -07:00
Victor Zverovich
2dc108b31f Remove deprecated code 🎆 🎆 🎆 2014-07-01 09:10:43 -07:00
Victor Zverovich
8e451911c9 Fix a warning. 2014-06-30 19:11:20 -07:00
Victor Zverovich
442c122c44 Fix warnings. 2014-06-30 18:38:45 -07:00
Victor Zverovich
35866bb2c2 Fix warnings. 2014-06-30 18:12:57 -07:00
Victor Zverovich
182d8178fe Fix one more Windows issue. 2014-06-30 17:01:31 -07:00
Victor Zverovich
3c72e0c18b Fix Windows build, take 2. 2014-06-30 16:56:22 -07:00
Victor Zverovich
b939860d6e write -> write_str 2014-06-30 15:44:08 -07:00
Victor Zverovich
53201033f2 Refactor error reporting API. 2014-06-30 14:26:29 -07:00
Victor Zverovich
e63a0ff125 Deprecate c_str() and str(). 2014-06-30 06:43:53 -07:00
Victor Zverovich
a1264926a0 Writer::format -> Writer::write. Make fmt::format return string. 2014-06-29 11:51:10 -07:00
Victor Zverovich
d5b8196749 Update the API. 2014-06-28 21:56:40 -07:00
Victor Zverovich
856e129cc6 Don't use deprecated API. 2014-06-28 20:03:46 -07:00
Victor Zverovich
c649007ed8 Don't use deprecated API. 2014-06-28 19:59:44 -07:00
Victor Zverovich
0914c91284 Don't use deprecated API. 2014-06-28 19:53:15 -07:00
Victor Zverovich
421cb0ad18 Update test. 2014-06-28 19:47:41 -07:00
Victor Zverovich
4d5b1e8a13 Update the API and tests. 2014-06-28 17:35:57 -07:00
Victor Zverovich
876a5d1f43 Update more tests. 2014-06-28 16:05:02 -07:00
Victor Zverovich
e06e9f885c Deprecate Format and update tests. 2014-06-28 15:58:02 -07:00
Victor Zverovich
09f40191f4 Fix build, take 2. 2014-06-28 14:57:06 -07:00
Victor Zverovich
c164cb6ecd Fix build. 2014-06-28 14:53:16 -07:00
Victor Zverovich
75e078748a Format -> format 2014-06-28 14:50:16 -07:00
Victor Zverovich
5edda531f6 Add fmt::format and deprecate fmt::Format. 2014-06-28 14:48:42 -07:00
Victor Zverovich
9c8db26457 Fix build, take 2. 2014-06-28 13:06:49 -07:00
Victor Zverovich
3b3f76b809 Fix build. 2014-06-28 13:03:39 -07:00
Victor Zverovich
4f4e6c965f Fix MSVC build. FormatError -> FormatMessage to avoid ambiguity. 2014-06-28 12:49:51 -07:00
Victor Zverovich
a0e2f52247 MSVC workaround. 2014-06-28 12:05:32 -07:00
Victor Zverovich
3b18ecb24a FMT_FOR_EACH_NARG -> FMT_NARG. 2014-06-28 11:30:15 -07:00
Victor Zverovich
be7473b401 Test FMT_VARIADIC. 2014-06-28 11:20:04 -07:00
Victor Zverovich
2f6dddd6fd Simplify FMT_VARIADIC. 2014-06-28 11:07:43 -07:00
Victor Zverovich
360bfbdd50 Use 0-based indices. Test FMT_FOR_EACH*. 2014-06-28 10:32:37 -07:00
Victor Zverovich
bf25ef6455 FMT_TEMPLATE -> FMT_WRAP 2014-06-28 09:15:51 -07:00
Victor Zverovich
08e2dffa86 Add macro test. 2014-06-25 07:50:33 -07:00
Victor Zverovich
55f6640cae Fix test. 2014-06-24 11:13:18 -07:00
Victor Zverovich
302b8f4406 Fix MSVC build, take 2. 2014-06-24 10:46:01 -07:00
Victor Zverovich
73fda2a8b1 Fix error on MSVC. 2014-06-24 10:30:37 -07:00
Victor Zverovich
0195f543d9 Initial support for variadic functions without C++11. 2014-06-24 10:14:50 -07:00
Victor Zverovich
d0587445cb Test negative precision. 2014-06-23 08:39:32 -07:00
Victor Zverovich
4099a1269b Add support for negative width. 2014-06-23 08:10:50 -07:00
Victor Zverovich
8a8be2267d More tests. 2014-06-23 07:17:58 -07:00
Victor Zverovich
1a75ed01cd Implement dynamic precision in printf. 2014-06-23 07:16:46 -07:00
Victor Zverovich
0552f5b809 Test precision. 2014-06-23 07:07:10 -07:00
Victor Zverovich
6238f2daa1 Make precision and alignment work together. 2014-06-21 08:18:05 -07:00
Victor Zverovich
ca31c2b322 Fix handling of octal prefix. 2014-06-20 08:04:44 -07:00
Victor Zverovich
c556926597 Implement precision + fill. 2014-06-20 07:59:23 -07:00
Victor Zverovich
879838a539 Implement integer precision. 2014-06-20 07:34:02 -07:00
Victor Zverovich
cb743c0249 Parse printf format specs. 2014-06-19 07:40:35 -07:00
Victor Zverovich
7d5da66db9 Clean 2014-06-17 06:54:08 -07:00
Victor Zverovich
1275923a68 Implement dynamic width in printf. 2014-06-17 06:53:48 -07:00
Victor Zverovich
8666ea82f7 Merge branch 'master' of github.com:cppformat/cppformat 2014-06-16 07:49:37 -07:00
Victor Zverovich
da9457da61 Add a test case for https://github.com/cppformat/cppformat/pull/47 2014-06-16 07:48:57 -07:00
Constantine Tarasenkov
6aace693db Changes for MinGW compiler 2014-06-11 02:38:57 +04:00
Victor Zverovich
11f76fea94 Fix test, take 2. 2014-06-10 08:57:28 -07:00
Victor Zverovich
e1d4690566 Fix test. 2014-06-10 08:15:38 -07:00
Victor Zverovich
a2828412b6 Fix tests. 2014-06-10 07:36:23 -07:00
Victor Zverovich
03776dd988 Add support for hexadecimal floating point format specifiers a and A. 2014-06-10 07:03:49 -07:00
Victor Zverovich
546b62e74f More tests. 2014-06-10 06:21:41 -07:00
Victor Zverovich
e7b6896c43 Fix tests. 2014-06-09 09:57:34 -07:00
Victor Zverovich
eaa89e23d7 Put File, BufferedFile & ErrorCode in the fmt namespace. 2014-06-09 09:07:27 -07:00
Victor Zverovich
b692ab58b2 Move POSIX wrappers to separate files. 2014-06-09 08:33:48 -07:00
Victor Zverovich
b4dc0301f6 Disable test. 2014-06-09 08:17:14 -07:00
Victor Zverovich
f51fc08670 More tests. 2014-06-09 07:40:51 -07:00
Victor Zverovich
80c99760fb Fix warnings. 2014-06-07 07:11:34 -07:00
Victor Zverovich
1ed23b9127 Warng about compilers mishandling negative NaN. 2014-06-06 18:54:45 -07:00
Victor Zverovich
acf94abffd Fix build. 2014-06-06 11:14:53 -07:00
Victor Zverovich
5b054ae7b8 Test signbit. 2014-06-06 11:04:27 -07:00
Victor Zverovich
8ed2243a3c Workaround windows brain damage. 2014-06-06 08:18:53 -07:00
Victor Zverovich
9a33891e97 Add missing include. 2014-06-06 08:07:05 -07:00
Victor Zverovich
f16aff8033 Simplify tests. 2014-06-06 08:01:25 -07:00
Victor Zverovich
18316cb25f Fix windows build. 2014-06-06 07:29:57 -07:00
Victor Zverovich
9aba05b76a Parse '0' flag. 2014-06-06 07:07:57 -07:00
Victor Zverovich
bf8b29fbe7 Add initial support for printf format specifications. 2014-06-06 06:38:37 -07:00
Victor Zverovich
b65c19012a Test write count conversion. 2014-05-19 08:37:28 -07:00
Victor Zverovich
49fac7666c Test read count conversion. 2014-05-19 08:25:08 -07:00
Victor Zverovich
3159170383 Fix warnings. 2014-05-19 07:53:16 -07:00
Victor Zverovich
f578bc3a4a More tests. Fix warnings. 2014-05-19 07:31:05 -07:00
Victor Zverovich
952fd7a756 Comment. 2014-05-19 07:30:32 -07:00
Victor Zverovich
5bd9efebda Fix Windows build, take 2. 2014-05-18 12:38:01 -07:00
Victor Zverovich
df991a0f46 Fix Windows build. 2014-05-18 11:09:37 -07:00
Victor Zverovich
f21fa23186 More posix tests. 2014-05-18 10:05:29 -07:00
Victor Zverovich
e654f56210 Test fdopen. 2014-05-18 10:04:49 -07:00
Victor Zverovich
bd205aea28 Fix test. 2014-05-16 09:16:29 -07:00
Victor Zverovich
ed2caaf265 No need for retry on Windows. 2014-05-16 09:09:54 -07:00
Victor Zverovich
f1eab158c5 Test retry on EINTR in read, write, dup & dup2. 2014-05-16 07:07:43 -07:00
Victor Zverovich
232e5c3a3b Test retry on EINTR in close. 2014-05-16 06:25:20 -07:00
Victor Zverovich
fb17316d77 Use stdio.h instead of cstdio for fdopen. Wrap all used POSIX functions for testing. 2014-05-15 08:58:10 -07:00
Victor Zverovich
d758dbb33a Add tests. 2014-05-15 07:45:44 -07:00
Victor Zverovich
34648f4019 Test EXPECT_SYSTEM_ERROR. 2014-05-14 09:01:16 -07:00
Victor Zverovich
5415b2a43b Fix example. 2014-05-14 08:20:20 -07:00
Victor Zverovich
c3b3c0fafe Fix warning. 2014-05-14 07:45:21 -07:00
Victor Zverovich
a59dc93764 Fix ReportSystemError and ReportWinError tests. 2014-05-14 06:58:13 -07:00
Victor Zverovich
bb93cf12a7 Add a test. 2014-05-14 06:45:39 -07:00
Victor Zverovich
39561f8a08 Add tests. 2014-05-13 06:51:17 -07:00
Victor Zverovich
9c75b9eaa1 Fix warning. 2014-05-06 12:17:31 -07:00
Victor Zverovich
e283930566 Fix warnings. 2014-05-06 12:13:16 -07:00
Victor Zverovich
72ad3781a4 Don't use .travis.yml in tests. 2014-05-06 12:03:12 -07:00
Victor Zverovich
45c50a9f1a Fix warning. 2014-05-06 11:34:00 -07:00
Victor Zverovich
44b57bdf8b Fix warnings. 2014-05-06 11:29:07 -07:00
Victor Zverovich
aab84f67a4 Fix warnings. 2014-05-06 11:24:20 -07:00
Victor Zverovich
6bd3880cf1 Fix test. 2014-05-06 10:38:23 -07:00
Victor Zverovich
6a5f27bed2 Add test. 2014-05-06 09:17:53 -07:00
Victor Zverovich
eb09e58697 Fix warnings. 2014-05-06 08:13:28 -07:00
Victor Zverovich
5cf3b6dc7d Add a Print overload that writes to a file. 2014-05-06 08:05:51 -07:00
Victor Zverovich
2e50361a29 dup -> copy 2014-05-06 08:05:14 -07:00
Victor Zverovich
b322a1f58b Fix MSVC build. 2014-05-06 07:29:50 -07:00
Victor Zverovich
e1c86f0b5d Fix warnings. 2014-05-06 06:58:32 -07:00
Victor Zverovich
fb4ccac951 Add BufferedFile::fileno. 2014-05-06 06:45:53 -07:00
Victor Zverovich
494f53421e Fix warnings. 2014-05-06 06:11:39 -07:00
Victor Zverovich
e44a2be8b9 Make BufferedFile::close public. 2014-05-05 17:38:39 -07:00
Victor Zverovich
cada26d226 Suppress asserts locally. 2014-05-05 17:07:21 -07:00
Victor Zverovich
2ecce39ca9 More tests. 2014-05-05 12:52:16 -07:00
Victor Zverovich
0aacd0cf6d Replace EXPECT_STDOUT and EXPECT_STDERR with a single macro EXPECT_WRITE. 2014-05-05 08:35:59 -07:00
Victor Zverovich
098f8ac343 Evaluate EXPECT_STD* output argument once. 2014-05-05 08:20:01 -07:00
Victor Zverovich
758283f7d9 Fix tests. 2014-05-05 08:19:35 -07:00
Victor Zverovich
03ca48f3e7 Test calling RestoreAndRead twice. 2014-05-05 07:31:56 -07:00
Victor Zverovich
536e61386d Evaluate message argument passed to EXPECT_THROW_MSG once. 2014-05-05 07:31:38 -07:00
Victor Zverovich
368505ebe9 Fix tests. 2014-05-05 07:31:03 -07:00
Victor Zverovich
5434b0282c Don't die on Windows. 2014-05-05 07:11:54 -07:00
Victor Zverovich
3555341ab4 Fix test. 2014-05-04 18:23:06 -07:00
Victor Zverovich
a07350a0d4 More tests. 2014-05-04 10:08:29 -07:00
Victor Zverovich
6a4a9b773c More tests. 2014-05-04 09:01:18 -07:00
Victor Zverovich
02b185751f Add BufferedFile. OutputRedirector -> OutputRedirect. 2014-05-04 06:44:50 -07:00
Victor Zverovich
e4f8b069b5 Too young to die. 2014-05-03 20:49:42 -07:00
Victor Zverovich
590490f35f Try not to die. 2014-05-03 19:05:56 -07:00
Victor Zverovich
3e55391ea8 Fix test. 2014-05-03 18:48:20 -07:00
Victor Zverovich
527c4b312a Fix test. 2014-05-03 18:36:17 -07:00
Victor Zverovich
f4c5b37561 Fix test. 2014-05-03 18:27:23 -07:00
Victor Zverovich
58b762f965 Fix tests. 2014-05-03 18:13:16 -07:00
Victor Zverovich
ba89c6399c "Undo" delete. 2014-05-03 17:34:58 -07:00
Victor Zverovich
798c0fae71 Fix test, take 2. 2014-05-03 16:55:13 -07:00
Victor Zverovich
15f1f8510f Fix test. More comments. 2014-05-03 16:47:00 -07:00
Victor Zverovich
c880e31d9f Fix warnings. 2014-05-03 16:25:26 -07:00
Victor Zverovich
a2cf54fca2 Fix test. 2014-05-03 16:21:01 -07:00
Victor Zverovich
d13946bfb7 Fix warnings. 2014-05-03 15:50:22 -07:00
Victor Zverovich
1a6d365db5 Fix move assignment. 2014-05-03 15:46:11 -07:00
Victor Zverovich
823ce5fc3d More tests. 2014-05-03 15:26:44 -07:00
Victor Zverovich
c6f40e339f Fix MSVC build. 2014-05-03 15:16:52 -07:00
Victor Zverovich
ee793b35cf File::get -> File::descriptor. 2014-05-03 15:07:28 -07:00
Victor Zverovich
c6d83b1a3b Make File::close() public. 2014-05-03 15:04:14 -07:00
Victor Zverovich
f516fb9cba Fix tests. 2014-05-03 14:40:18 -07:00
Victor Zverovich
7b2568a3a9 Fix test. 2014-05-03 13:18:58 -07:00
Victor Zverovich
b808503bc1 More tests. 2014-05-03 13:14:15 -07:00
Victor Zverovich
9556d3714d Fix test. 2014-05-03 12:38:32 -07:00
Victor Zverovich
c5c2cd63bc FileDescriptor -> File 2014-05-03 12:28:02 -07:00
Victor Zverovich
98b6e59272 Add FileDescriptor::write. 2014-05-03 12:06:28 -07:00
Victor Zverovich
f3e123b304 Use streamsize instead of ssize_t for portability. 2014-05-03 12:06:04 -07:00
Victor Zverovich
cc6a772b89 Simplify tests. 2014-05-03 12:01:27 -07:00
Victor Zverovich
a297e272d1 Add FileDescriptor::read. 2014-05-03 11:26:46 -07:00
Victor Zverovich
90a3f0a620 Define ssize_t on Windows. 2014-05-03 11:03:04 -07:00
Victor Zverovich
e648d289bb Fix FileDescriptor::pipe. 2014-05-03 10:25:46 -07:00
Victor Zverovich
8214a5ef5e Fix MSVC build. 2014-05-03 10:10:50 -07:00
Victor Zverovich
1a2d7be3f5 Implement EXPECT_STDOUT and EXPECT_STDERR using pipes. 2014-05-03 09:48:54 -07:00
Victor Zverovich
f9eb0b8ba5 format-test.h -> gtest-extra.h 2014-05-02 07:23:25 -07:00
Victor Zverovich
62394e0ebd More assertion tests. 2014-05-02 07:07:55 -07:00
Victor Zverovich
61d5ebc0af Test EXPECT_THROW_MSG. 2014-05-02 06:33:21 -07:00
Victor Zverovich
9cf43ccdad Move tests to the test dir. 2014-05-01 16:49:08 -07:00
Victor Zverovich
063d0077b3 Test FileSink. Simplify tests. 2014-04-29 08:39:37 -07:00
Victor Zverovich
6798c1704e Add tests. 2014-04-29 06:26:37 -07:00
Victor Zverovich
8641461c98 More tests. 2014-04-27 06:56:12 -07:00
Victor Zverovich
5adc272ee7 Add tests. 2014-04-25 07:44:35 -07:00
Victor Zverovich
fa3efb1330 Add a compile error test. 2014-01-08 08:16:00 -08:00
Victor Zverovich
f380dc3daa Fix error reporting. 2014-01-07 17:04:39 -08:00
Victor Zverovich
9fad54a821 Fix CMake warning. 2014-01-07 17:04:30 -08:00
Victor Zverovich
482472ebc5 Fix a typo. 2014-01-07 11:34:32 -08:00
Victor Zverovich
be17d14544 Simplify compile tests. 2014-01-07 09:50:36 -08:00
Victor Zverovich
ec7006fb99 Test if a narrow string padding with wide char doesn't compile. 2014-01-07 08:57:37 -08:00
Victor Zverovich
6abfb84808 Simplify compile error tests. 2014-01-07 08:43:53 -08:00