Diff
Not logged in

Differences From Artifact [b9b84a35fccc5116]:

To Artifact [3ba75b9c3bef69b2]:


100 assert_throw!AssertError( assert_throw!Error(nothing()) ); 100 assert_throw!AssertError( assert_throw!Error(nothing()) ); 101 assert_nothrow ( assert_throw!Error(assertError()) ); 101 assert_nothrow ( assert_throw!Error(assertError()) ); 102 assert_throw!AssertError( assert_throw!AssertError(error()) ); 102 assert_throw!AssertError( assert_throw!AssertError(error()) ); 103 } 103 } 104 104 105 template assertOp(string op) 105 template assertOp(string op) 106 { 106 { 107 void assertOp(A, B, string fn=__FILE__, size_t ln=__LINE__)(A a, B b, st | 107 void assertOp(A, B, string fn=__FILE__, size_t ln=__LINE__)(lazy A a_, l 108 { 108 { 109 try 109 try 110 { if( mixin("a"~op~"b") ) return; } | 110 { A a=a_(); B b=b_(); if( mixin("a"~op~"b") ) return; > 111 onAssertErrorMsg(fn, ln, msg.length ? msg : text(a, " 111 catch(Throwable e) 112 catch(Throwable e) 112 { onAssertErrorMsg(fn, ln, msg.length ? msg : "bad excep 113 { onAssertErrorMsg(fn, ln, msg.length ? msg : "bad excep 113 onAssertErrorMsg(fn, ln, msg.length ? msg : text(a, " !", op, " | 114 assert(false); 114 } 115 } 115 } 116 } 116 117 117 alias assertOp!(`==`) assert_eq; /// asserts two operands are == 118 alias assertOp!(`==`) assert_eq; /// asserts two operands are == 118 alias assertOp!(`!=`) assert_ne; /// asserts two operands are != 119 alias assertOp!(`!=`) assert_ne; /// asserts two operands are != 119 alias assertOp!(`<`) assert_lt; /// asserts two operands are < 120 alias assertOp!(`<`) assert_lt; /// asserts two operands are < 120 alias assertOp!(`<=`) assert_le; /// asserts two operands are <= 121 alias assertOp!(`<=`) assert_le; /// asserts two operands are <=