[svn:parrot] r41089 - in trunk: runtime/parrot/library/Test t/library

dukeleto at svn.parrot.org dukeleto at svn.parrot.org
Mon Sep 7 01:29:19 UTC 2009


Author: dukeleto
Date: Mon Sep  7 01:29:16 2009
New Revision: 41089
URL: https://trac.parrot.org/parrot/changeset/41089

Log:
[t] Improve the diagnostic message of like() in test_more.pir

Modified:
   trunk/runtime/parrot/library/Test/More.pir
   trunk/t/library/test_more.t

Modified: trunk/runtime/parrot/library/Test/More.pir
==============================================================================
--- trunk/runtime/parrot/library/Test/More.pir	Mon Sep  7 01:02:27 2009	(r41088)
+++ trunk/runtime/parrot/library/Test/More.pir	Mon Sep  7 01:29:16 2009	(r41089)
@@ -902,7 +902,11 @@
   match_success:
     goto pass_it
   match_fail:
-    diagnostic = "match failed"
+    diagnostic = "match failed: target '"
+    diagnostic .= target
+    diagnostic .= "' does not match pattern '"
+    diagnostic .= pattern
+    diagnostic .= "'"
     goto report
   rule_fail:
     diagnostic = "rule error"

Modified: trunk/t/library/test_more.t
==============================================================================
--- trunk/t/library/test_more.t	Mon Sep  7 01:02:27 2009	(r41088)
+++ trunk/t/library/test_more.t	Mon Sep  7 01:29:16 2009	(r41089)
@@ -67,7 +67,7 @@
     die 'DO NOT WANT'
 .end
 CODE
-    test_diag( 'match failed' )
+    test_diag( "match failed: target 'DO NOT WANT' does not match pattern '<[for the lulz]>'" )
     test_test('throws_like fails when error does not match pattern' )
 .end
 
@@ -297,12 +297,13 @@
     test_test( 'passing test like() with description' )
 
     test_fail()
-    test_diag( 'match failed' )
+
+    test_diag( "match failed: target 'abcdef' does not match pattern '<[g]>'" )
     like( 'abcdef', '<[g]>' )
     test_test( 'failing test like()' )
 
     test_fail( 'testing like()' )
-    test_diag( 'match failed' )
+    test_diag( "match failed: target 'abcdef' does not match pattern '<[g]>'" )
     like( 'abcdef', '<[g]>', 'testing like()' )
     test_test( 'failing test like() with description' )
 


More information about the parrot-commits mailing list