mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	Add tests for dynamic precision and with with an int parameter
This commit is contained in:
		
							parent
							
								
									4a324e1da8
								
							
						
					
					
						commit
						e906ea3f1b
					
				
					 1 changed files with 10 additions and 0 deletions
				
			
		|  | @ -69,4 +69,14 @@ TEST(KernelStringfTest, dynamicWidthAndPrecision) | |||
|         EXPECT_EQ(stringf("%*.*f", 8, 4, 1.0), "  1.0000"); | ||||
| } | ||||
| 
 | ||||
| TEST(KernelStringfTest, dynamicPrecisionInt) | ||||
| { | ||||
|         EXPECT_EQ(stringf("%.*d", 4, 7), "0007"); | ||||
| } | ||||
| 
 | ||||
| TEST(KernelStringfTest, dynamicWidthAndPrecisionInt) | ||||
| { | ||||
|         EXPECT_EQ(stringf("%*.*d", 8, 4, 7), "    0007"); | ||||
| } | ||||
| 
 | ||||
| YOSYS_NAMESPACE_END | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue