站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

LineDiff (NB JUnit) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.nbjunit/1 1.41

org.netbeans.junit.diff
Class LineDiff

java.lang.Object
  extended by org.netbeans.junit.diff.LineDiff
All Implemented Interfaces:
Diff

public class LineDiff
extends Object
implements Diff

Line Diff with formated textual output. Number of context lines in output is configurable through system property 'nbjunit.linediff.context'.


Field Summary
static int CONTEXT
           
 
Constructor Summary
LineDiff()
           
LineDiff(boolean ignoreCase)
           
LineDiff(boolean ignoreCase, boolean ignoreEmptyLines)
           
 
Method Summary
protected  boolean compareLines(String l1, String l2)
           
 boolean diff(File refFile, File passFile, File diffFile)
           
 boolean diff(String ref, String pass, String diff)
           
 boolean getIgnoreCase()
           
 int getNContextLines()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTEXT

public static int CONTEXT
Constructor Detail

LineDiff

public LineDiff()

LineDiff

public LineDiff(boolean ignoreCase)

LineDiff

public LineDiff(boolean ignoreCase,
                boolean ignoreEmptyLines)
Method Detail

getIgnoreCase

public boolean getIgnoreCase()

compareLines

protected boolean compareLines(String l1,
                               String l2)
Parameters:
l1 - first line to compare
l2 - second line to compare
Returns:
true if lines equal

getNContextLines

public int getNContextLines()

diff

public boolean diff(String ref,
                    String pass,
                    String diff)
             throws IOException
Specified by:
diff in interface Diff
Parameters:
first - first file to compare
second - second file to compare
diff - difference file, caller can pass null value, when results are not needed.
Returns:
true iff files differ
Throws:
IOException

diff

public boolean diff(File refFile,
                    File passFile,
                    File diffFile)
             throws IOException
Specified by:
diff in interface Diff
Parameters:
refFile - first file to compare -- ref
passFile - second file to compare -- golden
diffFile - difference file, caller can pass null value, when results are not needed.
Returns:
true iff files differ
Throws:
IOException

org.netbeans.modules.nbjunit/1 1.41

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.