Beyond Linux® From Scratch - Version 2015-03-02

Chapter 13. Programming

JUnit-4.11

Introduction to JUnit

The JUnit package contains a
simple, open source framework to write and run repeatable tests. It
is an instance of the xUnit architecture for unit testing
frameworks. JUnit features include assertions for testing expected
results, test fixtures for sharing common test data, and test
runners for running tests.

This package is known to build and work properly using an LFS-7.7
platform.

Additional Downloads

JUnit Dependencies

Required

Installation of JUnit

The javadoc command
coming with OpenJDK 8 has become much stricter than before
regarding the conformance of the Javadoc comments in source code to
HTML. The Junit documentation does
not meet those standard, so the conformance checks have to be
disabled. This can be done with the following command:

sed -i '\@/docs/@a<arg value="-Xdoclint:none"/>' build.xml

Now place the required hamcrest jar files where needed and build
the package: