[Nice-commit] Nice/testsuite helpers.nice,1.6,1.7
Brought to you by:
bonniot
From: Artem Gr K. <ar...@us...> - 2005-08-29 14:27:51
|
Update of /cvsroot/nice/Nice/testsuite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11987/testsuite Modified Files: helpers.nice Log Message: Export the printSourceWithLNums function. Index: helpers.nice =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/helpers.nice,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** helpers.nice 29 Aug 2005 13:41:10 -0000 1.6 --- helpers.nice 29 Aug 2005 14:27:42 -0000 1.7 *************** *** 38,44 **** File source; error(location, message){ ! println("----1--------10--------20--------30--------40--------50--------60--------70--"); ! int lnum = 0; foreach(readLines(source), ! (String line) => println((++lnum > 9 ? ""lnum : "0"lnum) + "| " + line)); super; } --- 38,42 ---- File source; error(location, message){ ! printSourceWithLNums(source); super; } *************** *** 46,49 **** --- 44,53 ---- } + public void printSourceWithLNums(File source){ + println("----1--------10--------20--------30--------40--------50--------60--------70--"); + int lnum = 0; foreach(readLines(source), + (String line) => println((++lnum > 9 ? ""lnum : "0"lnum) + "| " + line)); + } + public File compile (String pkg, |