mirror of
				https://github.com/fmtlib/fmt.git
				synced 2025-10-30 21:51:43 +01:00 
			
		
		
		
	Improve width computation
This commit is contained in:
		| @@ -6,6 +6,7 @@ | ||||
| // For the license information refer to format.h. | ||||
|  | ||||
| #include <stdint.h> | ||||
|  | ||||
| #include <cctype> | ||||
| #include <cfloat> | ||||
| #include <climits> | ||||
| @@ -987,7 +988,9 @@ TEST(FormatterTest, Width) { | ||||
|   EXPECT_EQ("    0xcafe", format("{0:10}", reinterpret_cast<void*>(0xcafe))); | ||||
|   EXPECT_EQ("x          ", format("{0:11}", 'x')); | ||||
|   EXPECT_EQ("str         ", format("{0:12}", "str")); | ||||
|   EXPECT_EQ(fmt::format("{:*^5}", "🤡"), "**🤡**"); | ||||
| } | ||||
|  | ||||
| template <typename T> inline T const_check(T value) { return value; } | ||||
|  | ||||
| TEST(FormatterTest, RuntimeWidth) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user