| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>DiffTestCase (Calcite 1.20.0 Test API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../jquery/jquery-3.3.1.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.1.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="DiffTestCase (Calcite 1.20.0 Test API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":10,"i1":10,"i2":10,"i3":9,"i4":10,"i5":10,"i6":9,"i7":10,"i8":9,"i9":9,"i10":6,"i11":9,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../"; |
| var useModuleDirectories = true; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/DiffTestCase.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.calcite.test</a></div> |
| <h2 title="Class DiffTestCase" class="title">Class DiffTestCase</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.calcite.test.DiffTestCase</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <pre>public abstract class <span class="typeNameLabel">DiffTestCase</span> |
| extends java.lang.Object</pre> |
| <div class="block">DiffTestCase is an abstract base for JUnit tests which produce multi-line |
| output to be verified by diffing against a pre-existing reference file.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Field</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>(package private) java.util.regex.Matcher</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#compiledDiffMatcher">compiledDiffMatcher</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>(package private) java.util.regex.Matcher</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#compiledIgnoreMatcher">compiledIgnoreMatcher</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#diffMasks">diffMasks</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Diff masks defined so far</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ignorePatterns">ignorePatterns</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected java.io.File</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#logFile">logFile</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Name of current .log file.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected java.io.OutputStream</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#logOutputStream">logOutputStream</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">OutputStream for current test log.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected java.io.File</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#refFile">refFile</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Name of current .ref file.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#testCaseName">testCaseName</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#verbose">verbose</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Whether to give verbose message if diff fails.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier</th> |
| <th class="colSecond" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected </code></td> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.lang.String)">DiffTestCase</a></span>​(java.lang.String testCaseName)</code></th> |
| <td class="colLast"> |
| <div class="block">Initializes a new DiffTestCase.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addDiffMask(java.lang.String)">addDiffMask</a></span>​(java.lang.String mask)</code></th> |
| <td class="colLast"> |
| <div class="block">Adds a diff mask.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addIgnorePattern(java.lang.String)">addIgnorePattern</a></span>​(java.lang.String javaPattern)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>private java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#applyDiffMask(java.lang.String)">applyDiffMask</a></span>​(java.lang.String s)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#diff(java.io.File,java.io.File)">diff</a></span>​(java.io.File file1, |
| java.io.File file2)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a string containing the difference between the contents of two |
| files.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>private void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#diffFail(java.io.File,int)">diffFail</a></span>​(java.io.File logFile, |
| int lineNumber)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#diffFile(java.io.File,java.io.File)">diffFile</a></span>​(java.io.File logFile, |
| java.io.File refFile)</code></th> |
| <td class="colLast"> |
| <div class="block">Compares a log file with its reference log.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#diffLines(java.util.List,java.util.List)">diffLines</a></span>​(java.util.List<java.lang.String> lines1, |
| java.util.List<java.lang.String> lines2)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a string containing the difference between the two sets of lines.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#diffTestLog()">diffTestLog</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Finishes a diff-based test.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>protected static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#fileContents(java.io.File)">fileContents</a></span>​(java.io.File file)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the contents of a file as a string.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>private static java.util.List<java.lang.String></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#fileLines(java.io.File)">fileLines</a></span>​(java.io.File file)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a list of the lines in a given file.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>protected abstract java.io.File</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTestlogRoot()">getTestlogRoot</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>private static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#inIde()">inIde</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether this test is running inside the IntelliJ IDE.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>private boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#matchIgnorePatterns(java.lang.String)">matchIgnorePatterns</a></span>​(java.lang.String s)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>protected java.io.Writer</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#openTestLog()">openTestLog</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Initializes a diff-based test.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>protected java.io.OutputStream</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#openTestLogOutputStream(java.io.File)">openTestLogOutputStream</a></span>​(java.io.File testFileSansExt)</code></th> |
| <td class="colLast"> |
| <div class="block">Initializes a diff-based test, overriding the default log file naming |
| scheme altogether.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setRefFileDiffMasks()">setRefFileDiffMasks</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Sets the diff masks that are common to .REF files</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setUp()">setUp</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setVerbose(boolean)">setVerbose</a></span>​(boolean verbose)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets whether to give verbose message if diff fails.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#tearDown()">tearDown</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.Object</h3> |
| <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a id="testCaseName"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>testCaseName</h4> |
| <pre>private final java.lang.String testCaseName</pre> |
| </li> |
| </ul> |
| <a id="logFile"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>logFile</h4> |
| <pre>protected java.io.File logFile</pre> |
| <div class="block">Name of current .log file.</div> |
| </li> |
| </ul> |
| <a id="refFile"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>refFile</h4> |
| <pre>protected java.io.File refFile</pre> |
| <div class="block">Name of current .ref file.</div> |
| </li> |
| </ul> |
| <a id="logOutputStream"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>logOutputStream</h4> |
| <pre>protected java.io.OutputStream logOutputStream</pre> |
| <div class="block">OutputStream for current test log.</div> |
| </li> |
| </ul> |
| <a id="diffMasks"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>diffMasks</h4> |
| <pre>private java.lang.String diffMasks</pre> |
| <div class="block">Diff masks defined so far</div> |
| </li> |
| </ul> |
| <a id="compiledDiffMatcher"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>compiledDiffMatcher</h4> |
| <pre>java.util.regex.Matcher compiledDiffMatcher</pre> |
| </li> |
| </ul> |
| <a id="ignorePatterns"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ignorePatterns</h4> |
| <pre>private java.lang.String ignorePatterns</pre> |
| </li> |
| </ul> |
| <a id="compiledIgnoreMatcher"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>compiledIgnoreMatcher</h4> |
| <pre>java.util.regex.Matcher compiledIgnoreMatcher</pre> |
| </li> |
| </ul> |
| <a id="verbose"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>verbose</h4> |
| <pre>private boolean verbose</pre> |
| <div class="block">Whether to give verbose message if diff fails.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>DiffTestCase</h4> |
| <pre>protected DiffTestCase​(java.lang.String testCaseName) |
| throws java.lang.Exception</pre> |
| <div class="block">Initializes a new DiffTestCase.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>testCaseName</code> - Test case name</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.Exception</code></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="setUp()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setUp</h4> |
| <pre class="methodSignature">protected void setUp()</pre> |
| </li> |
| </ul> |
| <a id="tearDown()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>tearDown</h4> |
| <pre class="methodSignature">protected void tearDown() |
| throws java.io.IOException</pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="openTestLog()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>openTestLog</h4> |
| <pre class="methodSignature">protected java.io.Writer openTestLog() |
| throws java.lang.Exception</pre> |
| <div class="block">Initializes a diff-based test. Any existing .log and .dif files |
| corresponding to this test case are deleted, and a new, empty .log file |
| is created. The default log file location is a subdirectory under the |
| result getTestlogRoot(), where the subdirectory name is based on the |
| unqualified name of the test class. The generated log file name will be |
| testMethodName.log, and the expected reference file will be |
| testMethodName.ref.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Writer for log file, which caller should use as a destination for |
| test output to be diffed</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.Exception</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getTestlogRoot()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTestlogRoot</h4> |
| <pre class="methodSignature">protected abstract java.io.File getTestlogRoot() |
| throws java.lang.Exception</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the root under which testlogs should be written</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.Exception</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="openTestLogOutputStream(java.io.File)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>openTestLogOutputStream</h4> |
| <pre class="methodSignature">protected java.io.OutputStream openTestLogOutputStream​(java.io.File testFileSansExt) |
| throws java.io.IOException</pre> |
| <div class="block">Initializes a diff-based test, overriding the default log file naming |
| scheme altogether.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>testFileSansExt</code> - full path to log filename, without .log/.ref |
| extension</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="diffTestLog()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>diffTestLog</h4> |
| <pre class="methodSignature">protected void diffTestLog() |
| throws java.io.IOException</pre> |
| <div class="block">Finishes a diff-based test. Output that was written to the Writer |
| returned by openTestLog is diffed against a .ref file, and if any |
| differences are detected, the test case fails. Note that the diff used is |
| just a boolean test, and does not create any .dif ouput. |
| |
| <p>NOTE: if you wrap the Writer returned by openTestLog() (e.g. with a |
| PrintWriter), be sure to flush the wrapping Writer before calling this |
| method.</p></div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code></dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#diffFile(java.io.File,java.io.File)"><code>diffFile(File, File)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="diffFile(java.io.File,java.io.File)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>diffFile</h4> |
| <pre class="methodSignature">protected void diffFile​(java.io.File logFile, |
| java.io.File refFile) |
| throws java.io.IOException</pre> |
| <div class="block">Compares a log file with its reference log. |
| |
| <p>Usually, the log file and the reference log are in the same directory, |
| one ending with '.log' and the other with '.ref'. |
| |
| <p>If the files are identical, removes logFile.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>logFile</code> - Log file</dd> |
| <dd><code>refFile</code> - Reference log</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addDiffMask(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addDiffMask</h4> |
| <pre class="methodSignature">protected void addDiffMask​(java.lang.String mask)</pre> |
| <div class="block">Adds a diff mask. Strings matching the given regular expression will be |
| masked before diffing. This can be used to suppress spurious diffs on a |
| case-by-case basis.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>mask</code> - a regular expression, as per String.replaceAll</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addIgnorePattern(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addIgnorePattern</h4> |
| <pre class="methodSignature">protected void addIgnorePattern​(java.lang.String javaPattern)</pre> |
| </li> |
| </ul> |
| <a id="applyDiffMask(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>applyDiffMask</h4> |
| <pre class="methodSignature">private java.lang.String applyDiffMask​(java.lang.String s)</pre> |
| </li> |
| </ul> |
| <a id="matchIgnorePatterns(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>matchIgnorePatterns</h4> |
| <pre class="methodSignature">private boolean matchIgnorePatterns​(java.lang.String s)</pre> |
| </li> |
| </ul> |
| <a id="diffFail(java.io.File,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>diffFail</h4> |
| <pre class="methodSignature">private void diffFail​(java.io.File logFile, |
| int lineNumber)</pre> |
| </li> |
| </ul> |
| <a id="inIde()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>inIde</h4> |
| <pre class="methodSignature">private static boolean inIde()</pre> |
| <div class="block">Returns whether this test is running inside the IntelliJ IDE.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>whether we're running in IntelliJ.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="diff(java.io.File,java.io.File)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>diff</h4> |
| <pre class="methodSignature">public static java.lang.String diff​(java.io.File file1, |
| java.io.File file2)</pre> |
| <div class="block">Returns a string containing the difference between the contents of two |
| files. The string has a similar format to the UNIX 'diff' utility.</div> |
| </li> |
| </ul> |
| <a id="diffLines(java.util.List,java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>diffLines</h4> |
| <pre class="methodSignature">public static java.lang.String diffLines​(java.util.List<java.lang.String> lines1, |
| java.util.List<java.lang.String> lines2)</pre> |
| <div class="block">Returns a string containing the difference between the two sets of lines.</div> |
| </li> |
| </ul> |
| <a id="fileLines(java.io.File)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>fileLines</h4> |
| <pre class="methodSignature">private static java.util.List<java.lang.String> fileLines​(java.io.File file)</pre> |
| <div class="block">Returns a list of the lines in a given file.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>file</code> - File</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>List of lines</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="fileContents(java.io.File)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>fileContents</h4> |
| <pre class="methodSignature">protected static java.lang.String fileContents​(java.io.File file)</pre> |
| <div class="block">Returns the contents of a file as a string.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>file</code> - File</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Contents of the file</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setVerbose(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setVerbose</h4> |
| <pre class="methodSignature">protected void setVerbose​(boolean verbose)</pre> |
| <div class="block">Sets whether to give verbose message if diff fails.</div> |
| </li> |
| </ul> |
| <a id="setRefFileDiffMasks()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>setRefFileDiffMasks</h4> |
| <pre class="methodSignature">protected void setRefFileDiffMasks()</pre> |
| <div class="block">Sets the diff masks that are common to .REF files</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/DiffTestCase.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2012–2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |