lib: more informative test failure message (#812)
This commit is contained in:
		
							parent
							
								
									321635274c
								
							
						
					
					
						commit
						e077aeff5f
					
				| @ -671,15 +671,15 @@ test_postingp = TestCase $ do | |||||||
|                          let parse = runIdentity $ parseWithState mempty (postingp Nothing) s |                          let parse = runIdentity $ parseWithState mempty (postingp Nothing) s | ||||||
|                          assertBool "Example is parsed well" $ isRight parse |                          assertBool "Example is parsed well" $ isRight parse | ||||||
|                          let Right ap = parse |                          let Right ap = parse | ||||||
|                              same f = assertEqual "Posting is parsed well" (f ep) (f ap) |                              same msg f = assertEqual ("Posting "++msg++" differs") (f ep) (f ap) | ||||||
|                          same pdate |                          same "date" pdate | ||||||
|                          same pstatus |                          same "status" pstatus | ||||||
|                          same paccount |                          same "account" paccount | ||||||
|                          same pamount |                          same "amount" pamount | ||||||
|                          same pcomment |                          same "comment" pcomment | ||||||
|                          same ptype |                          same "type" ptype | ||||||
|                          same ptags |                          same "tags" ptags | ||||||
|                          same ptransaction |                          same "transaction" ptransaction | ||||||
|     "  expenses:food:dining  $10.00   ; a: a a \n   ; b: b b \n" `gives` |     "  expenses:food:dining  $10.00   ; a: a a \n   ; b: b b \n" `gives` | ||||||
|       posting{paccount="expenses:food:dining", pamount=Mixed [usd 10], pcomment="a: a a\nb: b b\n", ptags=[("a","a a"), ("b","b b")]} |       posting{paccount="expenses:food:dining", pamount=Mixed [usd 10], pcomment="a: a a\nb: b b\n", ptags=[("a","a a"), ("b","b b")]} | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user