javancss.test
Class JavancssTest
java.lang.Object
ccl.util.Test
javancss.test.AbstractTest
javancss.test.JavancssTest
- All Implemented Interfaces:
- java.lang.Runnable
public class JavancssTest
- extends AbstractTest
Test class for the JavaNCSS application.
$Id: JavancssTest.java 171 2009-05-31 20:12:01Z hboutemy $
3. 9. 1996
Method Summary |
private void |
_checkJavadocLines(int[] aTestFile,
java.lang.String sPackage,
int javadocLines)
|
private void |
_checkJavadocLines(int testFile,
java.lang.String sPackage,
int javadocLines)
|
private void |
_checkJavadocLines(Javancss pJavancss,
java.lang.String sPackage,
int javadocLines)
|
private void |
_checkJvdcs(int testFileNumber,
int expectedJvdcsResult)
|
private void |
_checkNcss(int testNumber)
|
private Javancss |
_checkNcss(int testNumber,
int expectedNcss)
|
private Javancss |
_checkNcssAndLoc(int testNumber)
|
private Javancss |
_checkNcssAndLoc(int testNumber,
int expectedNcssAndLoc)
|
private Javancss |
_checkNcssAndLoc(int testNumber,
int expectedNcss,
int expectedLoc)
|
private void |
_checkParse(int testFile)
|
protected void |
_doIt()
|
private void |
assertCCN(java.util.List vFunctions,
int methodIndex,
int expectedCCN)
|
static void |
main(java.lang.String[] asArg_)
|
private Javancss |
measureTestFile(int testFileId)
|
private Javancss |
measureWithArgs(java.lang.String[] args)
|
void |
testCCN()
Tests the cyclomatic complexity number measurement. |
void |
testEncoding()
|
void |
testJavadocLines()
Check that Javadoc line counts are correct. |
void |
testJavadocs()
There has been a bug introduced for version 16.34 which
counts Javadoc comments (**) for fields as well as for
methods, while I am only in the later ones. |
void |
testNcss()
|
void |
testNcssAndMore()
|
void |
testRecursive()
|
void |
testVersion()
|
Methods inherited from class ccl.util.Test |
_enterSubTest, _exitSubTest, _getValue, _increment, _setTests, _showLiveSignals, Assert, Assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertTrue, assertTrue, assertTrue, bug, bugIf, bugIf, bugIf, fail, fail, getBugs, getComment, getGlobalTests, getLocalTests, getName, getTestClassDirectory, getTestDirectory, getTestName, getTestName, getValue, initialize, isTest, isTiming, isVerbose, printResult, printResult, redirectStandardStreams, run, setBug, setParentTest, setTests, setTiming, setValue, setVerbose, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
JavancssTest
public JavancssTest()
JavancssTest
public JavancssTest(ccl.util.Test pTest_)
measureTestFile
private Javancss measureTestFile(int testFileId)
_checkNcss
private Javancss _checkNcss(int testNumber,
int expectedNcss)
_checkNcss
private void _checkNcss(int testNumber)
_checkNcssAndLoc
private Javancss _checkNcssAndLoc(int testNumber,
int expectedNcss,
int expectedLoc)
_checkNcssAndLoc
private Javancss _checkNcssAndLoc(int testNumber,
int expectedNcssAndLoc)
_checkNcssAndLoc
private Javancss _checkNcssAndLoc(int testNumber)
testJavadocs
public void testJavadocs()
- There has been a bug introduced for version 16.34 which
counts Javadoc comments (**) for fields as well as for
methods, while I am only in the later ones.
File Test20 has 6 methods and 6 + 1 ** comments.
This test should make sure that 3 attribute comments
won't be counted.
testJavadocLines
public void testJavadocLines()
- Check that Javadoc line counts are correct.
There is one bug where there are only two files with
a package jacob in the test directory (Test1.java and
Test28.java), and while both have no javadocs at all,
the count is still 11. The eleven seem to come from
files Test20.java and Test21.java.
This test shall trace this bug down and shall later asure
that it got fixed.
_checkJavadocLines
private void _checkJavadocLines(int testFile,
java.lang.String sPackage,
int javadocLines)
_checkJavadocLines
private void _checkJavadocLines(int[] aTestFile,
java.lang.String sPackage,
int javadocLines)
_checkJavadocLines
private void _checkJavadocLines(Javancss pJavancss,
java.lang.String sPackage,
int javadocLines)
_checkParse
private void _checkParse(int testFile)
_doIt
protected void _doIt()
throws java.lang.Exception
- Specified by:
_doIt
in class ccl.util.Test
- Throws:
java.lang.Exception
testNcss
public void testNcss()
testNcssAndMore
public void testNcssAndMore()
throws java.io.IOException
- Throws:
java.io.IOException
_checkJvdcs
private void _checkJvdcs(int testFileNumber,
int expectedJvdcsResult)
testCCN
public void testCCN()
- Tests the cyclomatic complexity number measurement.
assertCCN
private void assertCCN(java.util.List vFunctions,
int methodIndex,
int expectedCCN)
main
public static void main(java.lang.String[] asArg_)
measureWithArgs
private Javancss measureWithArgs(java.lang.String[] args)
throws java.io.IOException
- Throws:
java.io.IOException
testEncoding
public void testEncoding()
throws java.io.IOException
- Throws:
java.io.IOException
testVersion
public void testVersion()
throws java.io.IOException
- Throws:
java.io.IOException
testRecursive
public void testRecursive()
throws java.io.IOException
- Throws:
java.io.IOException