Diff
Not logged in

Differences From Artifact [3f689d3451f8c1cc]:

To Artifact [4c996bb5859ed5ea]:


17 17 auto writer = appender!string(); 18 18 formattedWrite(writer, fmt, params); 19 19 return writer.data; 20 20 } 21 21 22 22 unittest 23 23 { 24 - assert( sprintf!"%s == %d"("1+2", 3) == "1+2 == 3" ); 25 - assert( sprintf!"%s == %04d"("1+2", 3) == "1+2 == 0003" ); 24 + assert_eq( sprintf!"%s == %04d"("1+2", 3), "1+2 == 0003" ); 25 + assert_eq( sprintf!"%2$s == %1$s"("1+2", 5, 8), "5 == 1+2" ); 26 + assert_throw!Error( sprintf!"%s%s"(1) ); 26 27 } 27 28 28 29 /// Create an exception with automatically completed filename and lineno information 29 30 30 31 auto genex(ExceptionType, string fn=__FILE__, int ln=__LINE__, T...)(T params) 31 32 { 32 33 static if( T.length > 0 && is(T[$-1] : Throwable) )