JavaLib Updates

A list of bug fixes and corrections.

Tester version 1.3.4 -- checkException failed again - sorry!

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


Tester version 1.3.4 -- Improved diagnostics for a failed checkException test.

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


Tester version 1.3.4 -- Two bug fixes and a warning.

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


Bug fix for the draw libraries version v1.1.

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


Tester version 1.3.3 -- A minor change.

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


Tester version 1.3.2 -- Two bug fixes.

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


Tester version 1.3.1 -- Minor updates.

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


Tester version 1.3.0 -- Major Revisions.

The new version of the tester library contains three major changes and requires changes in programs that use the library:

Please, take the time to learn about the differences --- we believe this is a necessary change.

Posted: May 19, 2009 15:40 pm


Tester version 1.2.3 -- exceptions tests; Iterable and Traversals.

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


Tester version 1.2.2 -- equivalence tests.

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


Tester version 1.2.1 -- bug fixes and additions.

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


Tester version 1.2 -- new features.

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


Tester version 1.1 -- minor bug fixes.

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


Tester version 1.1

This is a first major update for the tester package and is saved as version 1.1.

New features:

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


Tester responds correctly when no tests are present

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


Response to arrow keys fixed in Samples applets

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

Response to arrow keys in the draw libraries fixed

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

Applet slider error fixed

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


checkOneOf error fixed

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


Last modified: Tue May 26 11:22:18 EDT 2009