While fixing the checkException test, we introduced a
bug: primitive type method arguments no longer matched correctly.
Thanks to Glynis Hamel for reporting the bug.
A further improvement in the error report for checkException
now notifies the user when the method name could not be found.
Posted: November 19, 2009 11:55 am
When a wrong exception is thrown during the checkException test,
the report now includes the name of the method and the object that was to invoke it. This helps identify errors in setting up the test case (e.g. misspelled method name).
Fixed the documentation for checkException in the Tester User's Guide. Added an example of the new diagnostics.
Posted: November 16, 2009 22:15 pm
checkRange incorrectly reported inexact comparison warnings, if the previous test involved inexact comparison.
checkException and checkMethod tests did not accept argument list where the argument type was a subtype of the parameter type specified in the method signature. This was a critical flaw in testing methods that used parametrized types.
Warning: The checkOneOf test when the actual and expected values are Strings must provide a test name as the first argument --- the tester has no way of finding our whether the test name has been given, and defaults to assume that the first argument is the test name.
Additionally, the Tester API page gave an incorrect method name checkInexactExpect instead of just checkInexact.
Posted: November 10, 2009 18:35 pm
Programs that used the earlier version failed to terminate when the last window has been closed. This is now fixed and works correctly with the latest version of the tester as well as when running just the world animation.
Only the draw, idraw, and adraw library has changed, no API changes have been made.
Posted: October 19, 2009 15:05 pm
Removed internal diagnostics from test report.
Reverted to an earlier version where the world continues to run after the tests have been completed. The user must close the open windows to end the program.
Posted: October 16, 2009 11:05 am
The tester failed to recognize certain kinds of circularity in data. This should now work correctly. (Thanks, Derek Rayside)
The checkException did not work correctly when no test description option was used. The error was introduced with the last May 19th update. (Thanks, Todd O'Bryant)
Posted: October 7, 2009 2:05 pm
Two minor changes submitted by Mike Sperber -- thanks.
Elimination of printing a dot for every test performed. This is no longer needed as the test evaluation speed is no longer a problem.
Improved pretty-printing of Enum types and values.
Posted: May 26, 2009 10:40 am
The new version of the tester library contains three major changes and requires changes in programs that use the library:
The comparison of double and float
values has been completely reworked. This version contains a number
of new methods that deal with
inexact comparisons. At the same time, if in the past a test used the
exact comparison method to compare two objects where inexact
comparison is necessary, that test will fail.
Please, read the Testing Inexact Values document for explanation and a guide.
The test report now shows the number of tests that used one or more inexact comparisons and identifies every such test case in the report (whether successful or not).
The display of the results now shows the actual and expected values side-by-side and the first place where the two values differ is visibly marked. It should make the reading of the results more informative.
We have also eliminated duplication of the methods that use a list
of arguments, such as checkOneOf, so that the list of
arguments is always the last argument to the test method and the
programmer can use the ellipsis style for providing the
arguments.
Please, take the time to learn about the differences --- we believe this is a necessary change.
Posted: May 19, 2009 15:40 pm
There was a bug in checking whether a method invocation threw the expected exception with the expected message. If there was no message provided or expected), the check caused a NullPointerException.
We decided to differentiate when to traverse over Iterable
collections. For all classes in the Java Collections
Framework that implement the Iterable the
checkExpect traverses over the data elements. However,
if the user-defined class implements the Iterable
interface the user must indicate the desire to compare data using the
Iterator by invoking checkIterable method.
A similar method is provided for our functional iterator
Traversal, the method name is
checkTraversal.
We added to the printing a display of the index for the item of
an Array, of the ordering number for elements of a
collection that is traversed using either the Iterable
or the Traversal interface.
Posted: March 18, 2009 10:40 am
During the past four days we have refurbished the entire web site,
inluding a comprehensive guide to all different ways that can be
used to invoke the tests. This includes the new variant that
uses Annotations, allowing the user to define
test methods in multiple classes.
We also added the support for equivalence tests. The user can
define equivalence between two objects of the same type
in an arbitrary manner. The checkEquivalent test
then compares the two objects accordingly.
Posted: March 2, 2009 10:40 am
Please, update to the latest tester.jar
The earlier versions had two serious bugs.
If a class extended a
class in another package, the fields inherited from super class were
not used in the comparison. This was especially serious when extending
the Posn class in the geometry library.
The tester remembered the objects it has seen in previous tests and failed to check the values of the fields anew. This is fine in a mutation-free world, but renders the tester useless for any program that uses mutation. The bug has been fixed in 1.1 on December 16, 2008, but crept into the recent releases as we were changing our versioning system.
The latest version allows the programmer to use annotations to specify which classes contain test methods, and which methods contain the test code, even if their names do not start with test. The user's guide for these features is forthcoming. It will include a comprehensive guide to all ways in which the library can be used.
Posted: February 25, 2009 5:50 pm
This version has an improved version of checkRange;
a new checkNumRange method; allows ellipsis
for defining arguments to methods that are checked for throwing
exceptions, of for the method invocation tests; there is a new form
checkFail. The reporting options have also been
improved.
The User's Guide page has been updated with concrete examples for each type of test supported.
We are planning a move to language levels for testing. The current tester will constitute the basic level. The intermediate level will include support for checking effects and will support annotations that will allow the user to add test code to any class. The final level will include a coverage tool.
Posted: January 26, 2009 8:10 pm
Minor adjustments and final changes to the tester library and the sources have been uploaded on November 13, 2008 2:10 pm. Please, make sure you have the final version.
The preliminary version displayed the String generated
by the toString method even if it has been defined only
in the Object class or in the
AbstractCollection class.
Additionally, the latest version shows the progress of testing by printing one dot for each object involved in a test. With a test suite of 2000 tests in a program with over 20 classes and interfaces the wait time made it look like the program has been stuck in an infinite loop as it churned away processing the tests.
Posted: November 13, 2008 2:10 pm
This is a first major update for the tester package and is saved as version 1.1.
New features:
checkRange allows the user to check whether
the actual value is within the [low, high) range,
using either values of primitive types, wrapper classes for
primitive types, big number types, or instances of a class that
implements the Comparable interface.
checkRange uses the given
Comparator argument to perform the boundary tests for
the given range.
toString method
by producing both the String generated by the user
method and the rendition of all fields generated by reflection as
before. This allows users to learn gradually how to define
toString method while using all features of the
tester library.
All sources have been updated to reflect the latest version. Old version of the tester is still available at the original location.
Posted: November 11, 2008 4:05 pm
Bug: Tester threw an exception if no tests were present.
Fix: Tester reports that no tests were present, but still displays
all data defined in the Examples class
tester.jar and the sources for
tester.Tester.java and tester.Main.java have
been updated.
Posted: October 16, 2008 12:05 pm
Web pages flaw: When fixing the arrow-keys bug the applets on the Samples pages were not updated. It is fixed now.
Posted: September 8, 2008 5:55 pm
Bug: All drawing libraries did not always respond correctly to the arrow keys.
Explanation: In
some environments, the String values generated by the key
events do not correspond to
"left", "right". "up", and "down". As the result,
incorrect key event Strings were passed to the
onKeyEvent methods.
Please, download the latest versions of the draw.jar, idraw.jar, adraw.jar libraries.
Posted: August 14, 2008 10:25 am
Bug: Applet timer does not progress when the slider sets the speed to the maximum.
Please, download the latest versions of the adraw.jar library.
Posted: June 11, 2008 1:55 pm
Bug: checkOneOf does not work correctly if the user does not provide the name of the test.
Please, download the latest versions of the tester.jar library.
Posted: June 11, 2008 1:55 pm