mirror of
				https://github.com/fmtlib/fmt.git
				synced 2025-11-03 23:51:41 +01:00 
			
		
		
		
	Don't emit decimal point if there are no trailing digits (#1210)
This commit is contained in:
		@@ -1453,6 +1453,7 @@ TEST(FormatterTest, FormatDouble) {
 | 
			
		||||
 | 
			
		||||
TEST(FormatterTest, PrecisionRounding) {
 | 
			
		||||
  EXPECT_EQ("0", format("{:.0f}", 0.0));
 | 
			
		||||
  EXPECT_EQ("0", format("{:.0f}", 0.01));
 | 
			
		||||
  EXPECT_EQ("0", format("{:.0f}", 0.1));
 | 
			
		||||
  EXPECT_EQ("0.000", format("{:.3f}", 0.00049));
 | 
			
		||||
  EXPECT_EQ("0.001", format("{:.3f}", 0.0005));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user