@@ -1794,13 +1794,13 @@ mod test {
1794
1794
// create a really evil test case where a $x appears inside a binding of $x
1795
1795
// but *shouldnt* bind because it was inserted by a different macro....
1796
1796
] ;
1797
- for s in tests. iter ( ) {
1798
- run_renaming_test ( s) ;
1797
+ for ( idx , s ) in tests. iter ( ) . enumerate ( ) {
1798
+ run_renaming_test ( s, idx ) ;
1799
1799
}
1800
1800
}
1801
1801
1802
1802
// run one of the renaming tests
1803
- fn run_renaming_test ( t : & renaming_test ) {
1803
+ fn run_renaming_test ( t : & renaming_test , test_idx : uint ) {
1804
1804
let invalid_name = token:: special_idents:: invalid. name ;
1805
1805
let ( teststr, bound_connections, bound_ident_check) = match * t {
1806
1806
( ref str, ref conns, bic) => ( str. to_managed ( ) , conns. clone ( ) , bic)
@@ -1845,8 +1845,15 @@ mod test {
1845
1845
&& ( mtwt_resolve ( varref. segments [ 0 ] . identifier ) == binding_name) ;
1846
1846
// temp debugging:
1847
1847
if ( fail) {
1848
- std:: io:: println ( "uh oh, matches but shouldn't:" ) ;
1848
+ println ! ( "failure on test {}" , test_idx) ;
1849
+ println ! ( "text of test case: \" {}\" " , teststr) ;
1850
+ println ! ( "" ) ;
1851
+ println ! ( "uh oh, matches but shouldn't:" ) ;
1849
1852
std:: io:: println ( fmt ! ( "varref: %?" , varref) ) ;
1853
+ // good lord, you can't make a path with 0 segments, can you?
1854
+ println ! ( "varref's first segment's uint: {}, and string: \" {}\" " ,
1855
+ varref. segments[ 0 ] . identifier. name,
1856
+ ident_to_str( & varref. segments[ 0 ] . identifier) ) ;
1850
1857
std:: io:: println ( fmt ! ( "binding: %?" , bindings[ binding_idx] ) ) ;
1851
1858
ast_util:: display_sctable ( get_sctable ( ) ) ;
1852
1859
}
0 commit comments