lisp-unit.git
6 years agoMerge 3af51efdb2ef4250c513f4d4eb127a8c4d5b0a9f into e6c259f333f038abd32a31c4138775045... 27/merge
Jim Newton [Fri, 2 Oct 2015 11:16:06 +0000 (2 11:16 +0000)]
Merge 3af51efdb2ef4250c513f4d4eb127a8c4d5b0a9f into e6c259f333f038abd32a31c4138775045e9d640d

6 years agofix so that assert-true and assert-false work with local functions27/head
Jim Newton [Fri, 2 Oct 2015 11:10:47 +0000 (2 13:10 +0200)]
fix so that assert-true and assert-false work with local functions

6 years agoDefine an expand-t-or-f macro to properly handle arguments in assert-true/false form.
Thomas M. Hermann [Sun, 27 Sep 2015 16:37:36 +0000 (27 11:37 -0500)]
Define an expand-t-or-f macro to properly handle arguments in assert-true/false form.

6 years agoAdd the arguments of the test form to extras in assert-true and assert-false.
Thomas M. Hermann [Mon, 21 Sep 2015 02:48:31 +0000 (20 21:48 -0500)]
Add the arguments of the test form to extras in assert-true and assert-false.

6 years agoMerge remote-tracking branch 'jimka2001/assert-test' into feature/assert-test
Thomas M. Hermann [Mon, 21 Sep 2015 02:06:37 +0000 (20 21:06 -0500)]
Merge remote-tracking branch 'jimka2001/assert-test' into feature/assert-test

6 years agoadded assert-test macro26/head
Jim Newton [Wed, 16 Sep 2015 12:06:30 +0000 (16 14:06 +0200)]
added assert-test macro

7 years agoCorrectly RETURN from FINALLY in LOOP.
Thomas M. Hermann [Thu, 2 Oct 2014 02:38:39 +0000 (1 21:38 -0500)]
Correctly RETURN from FINALLY in LOOP.

8 years agoMerge unit test results from multiple packages into a single results DB.
Thomas M. Hermann [Mon, 12 May 2014 18:23:55 +0000 (12 13:23 -0500)]
Merge unit test results from multiple packages into a single results DB.

Contribution by Mark Cox, https://github.com/markcox80.

8 years agoNew parameter, *summarize-results*, to suppress the unit test summary.
Thomas M. Hermann [Mon, 12 May 2014 14:54:00 +0000 (12 09:54 -0500)]
New parameter, *summarize-results*, to suppress the unit test summary.

8 years agoStore the test in the appropriate package.
Thomas M. Hermann [Sat, 21 Dec 2013 04:47:56 +0000 (20 22:47 -0600)]
Store the test in the appropriate package.

8 years agoOrganization
Thomas M. Hermann [Sun, 15 Dec 2013 17:14:50 +0000 (15 11:14 -0600)]
Organization

8 years agoStore the test based on the SYMBOL-PACKAGE of the test name, not *PACKAGE*.
Thomas M. Hermann [Sat, 24 Aug 2013 13:35:29 +0000 (24 08:35 -0500)]
Store the test based on the SYMBOL-PACKAGE of the test name, not *PACKAGE*.

8 years agoCorrect error in parse-body that was discarding the test documentation.
Thomas M. Hermann [Thu, 1 Aug 2013 15:39:24 +0000 (1 10:39 -0500)]
Correct error in parse-body that was discarding the test documentation.

9 years agoFix issue 17 in remove-tags.
Thomas M. Hermann [Mon, 10 Jun 2013 17:00:00 +0000 (10 12:00 -0500)]
Fix issue 17 in remove-tags.

9 years agoIgnore CCL FASL files.
Thomas M. Hermann [Sat, 27 Apr 2013 22:12:02 +0000 (27 17:12 -0500)]
Ignore CCL FASL files.

Trim trailing white space.

9 years agoRemove redundant function print-warning.
Thomas M. Hermann [Mon, 22 Apr 2013 15:34:47 +0000 (22 10:34 -0500)]
Remove redundant function print-warning.

9 years agoEnsure that a package object is used as the hash-key for tests and tags DB.
Thomas M. Hermann [Thu, 18 Apr 2013 19:34:47 +0000 (18 14:34 -0500)]
Ensure that a package object is used as the hash-key for tests and tags DB.

9 years agoWarn when there are no tests or tags defined for a package.
Thomas M. Hermann [Thu, 18 Apr 2013 19:03:07 +0000 (18 14:03 -0500)]
Warn when there are no tests or tags defined for a package.

Return NIL from functions that are returning lists of things.

9 years agoUse a function instead of a generic function to generate the failure instance.
Thomas M. Hermann [Tue, 2 Apr 2013 21:41:55 +0000 (2 16:41 -0500)]
Use a function instead of a generic function to generate the failure instance.

9 years agoVersion 0.9.5 README.0.9.5
Thomas M. Hermann [Mon, 18 Mar 2013 14:54:42 +0000 (18 09:54 -0500)]
Version 0.9.5 README.

9 years agoMake the list of test names and tags optional.
Thomas M. Hermann [Mon, 18 Mar 2013 14:23:26 +0000 (18 09:23 -0500)]
Make the list of test names and tags optional.

 * remove-tests
 * tagged-tests
 * remove-tags
 * run-tests
 * run-tags

9 years agoSignal an error if no tests are defined in the package.
Thomas M. Hermann [Fri, 15 Mar 2013 01:52:48 +0000 (14 20:52 -0500)]
Signal an error if no tests are defined in the package.

Also clean up warning messages for test-documentation and test-code.

9 years agoCorrectly quote name and use valid-test-name in define-test.
Thomas M. Hermann [Thu, 14 Mar 2013 03:56:05 +0000 (13 22:56 -0500)]
Correctly quote name and use valid-test-name in define-test.

9 years agoReplace assert-class function with generic function record-failure.
Thomas M. Hermann [Thu, 14 Mar 2013 03:44:49 +0000 (13 22:44 -0500)]
Replace assert-class function with generic function record-failure.

Better facilitates extensions.

9 years agoReplace assert-function with a generic function assert-result.
Thomas M. Hermann [Thu, 14 Mar 2013 03:23:14 +0000 (13 22:23 -0500)]
Replace assert-function with a generic function assert-result.

Specialize on the type of assertion. This better facilitates extensions.

9 years agoSignal a type-error if anything besides a symbol is used for a test name.
Thomas M. Hermann [Thu, 14 Mar 2013 03:08:47 +0000 (13 22:08 -0500)]
Signal a type-error if anything besides a symbol is used for a test name.

9 years agoUpdate the README for version 0.9.4.0.9.4
Thomas M. Hermann [Mon, 11 Feb 2013 03:03:56 +0000 (10 21:03 -0600)]
Update the README for version 0.9.4.

Cover the new TAP features.

9 years agoMerge branch 'tap'
Thomas M. Hermann [Fri, 8 Feb 2013 21:06:20 +0000 (8 15:06 -0600)]
Merge branch 'tap'

Conflicts:
lisp-unit.lisp

9 years agoCorrect the macro expansion assertion to number GENSYMS from 1.
Thomas M. Hermann [Fri, 8 Feb 2013 20:56:29 +0000 (8 14:56 -0600)]
Correct the macro expansion assertion to number GENSYMS from 1.

Improve the comparison of the expanded forms.

9 years agoMerge pull request #12 from AccelerationNet/tap-with-test-times
Thomas M. Hermann [Wed, 6 Feb 2013 05:02:32 +0000 (5 21:02 -0800)]
Merge pull request #12 from AccelerationNet/tap-with-test-times

Tap with test times

9 years agoprint out test duration, in seconds12/head
Ryan Davis [Tue, 5 Feb 2013 14:56:42 +0000 (5 09:56 -0500)]
print out test duration, in seconds

9 years agorecord the run time of the test
Ryan Davis [Tue, 5 Feb 2013 14:54:01 +0000 (5 09:54 -0500)]
record the run time of the test

9 years agoWarn on missing tags to remove and continue on.
Thomas M. Hermann [Sun, 3 Feb 2013 03:00:04 +0000 (2 21:00 -0600)]
Warn on missing tags to remove and continue on.

9 years agoWarn on missing tests to remove and continue on.
Thomas M. Hermann [Sun, 3 Feb 2013 02:57:39 +0000 (2 20:57 -0600)]
Warn on missing tests to remove and continue on.

Do no collect the removed names, the collected list wasn't used.

9 years agoAdd an optional stream argument to all print and output functions.
Thomas M. Hermann [Sun, 3 Feb 2013 02:41:54 +0000 (2 20:41 -0600)]
Add an optional stream argument to all print and output functions.

9 years agoCount passed assertions and only store details for failed assertions.
Thomas M. Hermann [Fri, 1 Feb 2013 05:43:19 +0000 (31 23:43 -0600)]
Count passed assertions and only store details for failed assertions.

9 years agoOptionally signal results.
Thomas M. Hermann [Fri, 1 Feb 2013 05:09:22 +0000 (31 23:09 -0600)]
Optionally signal results.

9 years agoMerge pull request #9 from AccelerationNet/master
Thomas M. Hermann [Thu, 31 Jan 2013 17:08:02 +0000 (31 09:08 -0800)]
Merge pull request #9 from AccelerationNet/master

new *keep-passing-asserts* flag to restrict memory usage

9 years agoMerge pull request #10 from AccelerationNet/tap
Thomas M. Hermann [Thu, 31 Jan 2013 17:07:48 +0000 (31 09:07 -0800)]
Merge pull request #10 from AccelerationNet/tap

Tap output based off existing tap branch

9 years agoremove extraneous hyphen10/head
Ryan Davis [Wed, 30 Jan 2013 17:38:36 +0000 (30 12:38 -0500)]
remove extraneous hyphen

9 years agoenable print-pretty for TAP results
Ryan Davis [Wed, 30 Jan 2013 17:37:06 +0000 (30 12:37 -0500)]
enable print-pretty for TAP results

9 years agosupport test output using the test anything protocol
Ryan Davis [Tue, 29 Jan 2013 20:39:40 +0000 (29 15:39 -0500)]
support test output using the test anything protocol

Converts a test-result object into TAP format. Two new functions:
 * `write-tap`
 * `write-tap-to-file`

To manage the indentation levels TAP wants, this uses
[pprint-logical-block] and heavily uses the [~I] format directive,
which is shorthand for [pprint-indent].  This gets a little tricky
because indentation levels only take effect after a newline.

[pprint-logical-block]: http://www.lispworks.com/documentation/HyperSpec/Body/m_ppr_lo.htm
[~I]: http://www.lispworks.com/documentation/HyperSpec/Body/22_cec.htm
[pprint-indent]: http://www.lispworks.com/documentation/HyperSpec/Body/f_ppr_in.htm

refs #3

9 years agointroduce a new `test-run-complete` condition, and signal it when test
Ryan Davis [Tue, 29 Jan 2013 20:36:02 +0000 (29 15:36 -0500)]
introduce a new `test-run-complete` condition, and signal it when test
runs are complete.

This serves as an integration/extensibility point for other systems.

In my case, I'm going to have my continuous integration server listen
for this condition and process the test results, something like:

```lisp
(handler-bind ((lisp-unit:test-run-complete
                 #'(lambda (trc)
                     (process (lisp-unit:results trc)))))
  (asdf:test-system :foo))
```

refs #3

9 years agointroduce a `*keep-passing-asserts*` flag to toggle keeping details9/head
Ryan Davis [Wed, 30 Jan 2013 15:46:36 +0000 (30 10:46 -0500)]
introduce a `*keep-passing-asserts*` flag to toggle keeping details
about passing asserts.

When non-nil, passing test assertions will be collected as objects and
accessible in test-result objects.  When nil, only the type of the
passing assertion will be collected, saving significant memory.

The default is T, which can consume lots of memory for large numbers
of asserts (in my case, sbcl heap exhaustion with 95K assertions).

refs #8

9 years agoMerge branch 'master' of github.com:OdonataResearchLLC/lisp-unit
Ryan Davis [Tue, 29 Jan 2013 18:33:35 +0000 (29 13:33 -0500)]
Merge branch 'master' of github.com:OdonataResearchLLC/lisp-unit

9 years agoPerform evaluation of actual, expected, and extra forms in internal-assert.
Thomas M. Hermann [Tue, 29 Jan 2013 13:16:04 +0000 (29 07:16 -0600)]
Perform evaluation of actual, expected, and extra forms in internal-assert.

This was prompted by CCL checking the slot type and signaling a condition
when a function was provided as an initarg. In the original code, the slot
ultimately contained a list, but only after INITIALIZE-INSTANCE.

9 years agoGuard against multiple evaluations of a unit test name.
Thomas M. Hermann [Tue, 29 Jan 2013 13:13:43 +0000 (29 07:13 -0600)]
Guard against multiple evaluations of a unit test name.

9 years agoFIXME note for the norm of an array in the floating point extensions.
Thomas M. Hermann [Tue, 29 Jan 2013 03:53:14 +0000 (28 21:53 -0600)]
FIXME note for the norm of an array in the floating point extensions.

9 years agoREADME for version 0.9.3.0.9.3
Thomas M. Hermann [Fri, 14 Dec 2012 23:10:24 +0000 (14 17:10 -0600)]
README for version 0.9.3.

9 years agoExamples of using tags.
Thomas M. Hermann [Fri, 14 Dec 2012 23:09:47 +0000 (14 17:09 -0600)]
Examples of using tags.

9 years agoWarn if there are no tests for a tag.
Thomas M. Hermann [Fri, 14 Dec 2012 22:58:43 +0000 (14 16:58 -0600)]
Warn if there are no tests for a tag.

9 years agoClean up the equality predicates.
Thomas M. Hermann [Mon, 26 Nov 2012 22:40:33 +0000 (26 16:40 -0600)]
Clean up the equality predicates.

9 years agoMerge branch 'master' into assertion-records
Thomas M. Hermann [Mon, 26 Nov 2012 22:38:43 +0000 (26 16:38 -0600)]
Merge branch 'master' into assertion-records

Conflicts:
lisp-unit.lisp

9 years agoResurrect the use-debugger function.
Thomas M. Hermann [Mon, 26 Nov 2012 22:36:09 +0000 (26 16:36 -0600)]
Resurrect the use-debugger function.

A victim of over-zealous factoring.

9 years agoUpdate %run-thunks to make a test-results-db instance.
Thomas M. Hermann [Fri, 23 Nov 2012 18:06:59 +0000 (23 12:06 -0600)]
Update %run-thunks to make a test-results-db instance.

9 years agoReset the global counters whenever run-tests or run-tags is called.
Thomas M. Hermann [Fri, 23 Nov 2012 17:04:14 +0000 (23 11:04 -0600)]
Reset the global counters whenever run-tests or run-tags is called.

Results are pushed to the global counters whenever assertions are
directly evaluated. These counters cannot, should not, be used directly,
so it is a good idea to reset them periodically. A good time to do that
is when run-tests or run-tags is called.

9 years agoUse the local exerr in print-errors.
Thomas M. Hermann [Fri, 23 Nov 2012 16:00:05 +0000 (23 10:00 -0600)]
Use the local exerr in print-errors.

9 years agoRefine and export the failure and error print functions.
Thomas M. Hermann [Fri, 23 Nov 2012 15:47:44 +0000 (23 09:47 -0600)]
Refine and export the failure and error print functions.

9 years agoPrint failures and errors as test results are generated.
Thomas M. Hermann [Fri, 23 Nov 2012 01:34:53 +0000 (22 19:34 -0600)]
Print failures and errors as test results are generated.

9 years agoPrint failures and errors during tests if requested.
Thomas M. Hermann [Thu, 22 Nov 2012 20:22:04 +0000 (22 14:22 -0600)]
Print failures and errors during tests if requested.

9 years agoProperly handle the extra results.
Thomas M. Hermann [Thu, 22 Nov 2012 20:17:41 +0000 (22 14:17 -0600)]
Properly handle the extra results.

9 years agoUpdate print-error to work with result objects.
Thomas M. Hermann [Thu, 22 Nov 2012 19:25:28 +0000 (22 13:25 -0600)]
Update print-error to work with result objects.

9 years agoUpdate print-failure to work with result objects.
Thomas M. Hermann [Thu, 22 Nov 2012 19:22:55 +0000 (22 13:22 -0600)]
Update print-failure to work with result objects.

9 years agoOrganize the main lisp-unit file.
Thomas M. Hermann [Thu, 22 Nov 2012 19:00:12 +0000 (22 13:00 -0600)]
Organize the main lisp-unit file.

9 years agoPreliminary implementation of comprehensive test results objects.
Thomas M. Hermann [Thu, 22 Nov 2012 18:25:21 +0000 (22 12:25 -0600)]
Preliminary implementation of comprehensive test results objects.

9 years agoMerge pull request #1 from OdonataResearchLLC/master
Ryan Davis [Thu, 1 Nov 2012 14:28:47 +0000 (1 07:28 -0700)]
Merge pull request #1 from OdonataResearchLLC/master

Return the condition instead of :error

9 years agoMerge branch 'master' into assertion-records
Thomas M. Hermann [Wed, 31 Oct 2012 02:00:48 +0000 (30 21:00 -0500)]
Merge branch 'master' into assertion-records

Conflicts:
lisp-unit.lisp

9 years agoReturn the actual condition instead of :error.
Thomas M. Hermann [Wed, 31 Oct 2012 01:51:30 +0000 (30 20:51 -0500)]
Return the actual condition instead of :error.

9 years agoMerge pull request #4 from AccelerationNet/master
Thomas M. Hermann [Wed, 31 Oct 2012 01:35:10 +0000 (30 18:35 -0700)]
Merge pull request #4 from AccelerationNet/master

Make use-debugger more useful

9 years agomake use-debugger actually allow the debugger to get called with the4/head
Russ Tyndall [Tue, 30 Oct 2012 19:46:35 +0000 (30 15:46 -0400)]
make use-debugger actually allow the debugger to get called with the
original stack (use handler-bind instead of case)

9 years agoUpdate print-failure and print-error to handle various output formats.
Thomas M. Hermann [Fri, 19 Oct 2012 22:05:45 +0000 (19 17:05 -0500)]
Update print-failure and print-error to handle various output formats.

- Add a format argument to print-failure
- Convert print-error to a generic function
- Add a format argument to print-error
- Add a global variable *output-format*

9 years agoUnpdated norms with internal unit tests.0.9.2
Thomas M. Hermann [Tue, 16 Oct 2012 03:45:24 +0000 (15 22:45 -0500)]
Unpdated norms with internal unit tests.

9 years agoObsolete call to get-tagged-tests in run-tags.
Thomas M. Hermann [Tue, 16 Oct 2012 03:40:58 +0000 (15 22:40 -0500)]
Obsolete call to get-tagged-tests in run-tags.

9 years agoClean up sumsq sump.
Thomas M. Hermann [Tue, 16 Oct 2012 02:49:52 +0000 (15 21:49 -0500)]
Clean up sumsq sump.

9 years agoImplement default-epsilon for sequences using LOOP.
Thomas M. Hermann [Tue, 16 Oct 2012 02:39:09 +0000 (15 21:39 -0500)]
Implement default-epsilon for sequences using LOOP.

9 years agoMiscellaneous clean-up.
Thomas M. Hermann [Tue, 16 Oct 2012 02:31:47 +0000 (15 21:31 -0500)]
Miscellaneous clean-up.

9 years agoMatch the ASDF definition version to the code.
Thomas M. Hermann [Mon, 15 Oct 2012 21:32:51 +0000 (15 16:32 -0500)]
Match the ASDF definition version to the code.

9 years agoUse the string name of the test for documentation if none provided.0.9.1
Thomas M. Hermann [Mon, 15 Oct 2012 15:55:33 +0000 (15 10:55 -0500)]
Use the string name of the test for documentation if none provided.

9 years agoCorrect merge edit typo.0.9.0
Thomas M. Hermann [Sun, 14 Oct 2012 23:44:25 +0000 (14 18:44 -0500)]
Correct merge edit typo.

9 years agoMerge branch 'devel-0.9.0'
Thomas M. Hermann [Sun, 14 Oct 2012 22:47:52 +0000 (14 17:47 -0500)]
Merge branch 'devel-0.9.0'

Conflicts:
lisp-unit.lisp

9 years agoUnmatched right parenthesis and bad format split in print-failure.
Thomas M. Hermann [Sun, 14 Oct 2012 22:24:51 +0000 (14 17:24 -0500)]
Unmatched right parenthesis and bad format split in print-failure.

9 years agoUpdate remove-tests to also from the tests from tag lists.
Thomas M. Hermann [Sun, 14 Oct 2012 15:17:21 +0000 (14 10:17 -0500)]
Update remove-tests to also from the tests from tag lists.

- Remove or replace get-* from all function names.

9 years agoMerge failure-control-string with print-failure.
Thomas M. Hermann [Sat, 13 Oct 2012 17:41:24 +0000 (13 12:41 -0500)]
Merge failure-control-string with print-failure.

9 years agoExpanded on new features in 0.9.0 in the README.
Thomas M. Hermann [Sat, 13 Oct 2012 16:55:56 +0000 (13 11:55 -0500)]
Expanded on new features in 0.9.0 in the README.

9 years agoAdd a documentation string to the unit test object.
Thomas M. Hermann [Wed, 10 Oct 2012 22:31:38 +0000 (10 17:31 -0500)]
Add a documentation string to the unit test object.

9 years agoInitial implementation of test tags.
Thomas M. Hermann [Wed, 10 Oct 2012 22:20:32 +0000 (10 17:20 -0500)]
Initial implementation of test tags.

9 years agoFunctions for managing the tags DB.
Thomas M. Hermann [Wed, 10 Oct 2012 21:35:12 +0000 (10 16:35 -0500)]
Functions for managing the tags DB.

9 years agoParse tag definitions in the unit test body.
Thomas M. Hermann [Wed, 10 Oct 2012 20:51:50 +0000 (10 15:51 -0500)]
Parse tag definitions in the unit test body.

9 years agoDefine a unit test class to store code and documentation.
Thomas M. Hermann [Wed, 10 Oct 2012 20:26:33 +0000 (10 15:26 -0500)]
Define a unit test class to store code and documentation.

9 years agoFix typos in the 'How to use' comment, correct reference link in README.
Thomas M. Hermann [Wed, 10 Oct 2012 19:05:51 +0000 (10 14:05 -0500)]
Fix typos in the 'How to use' comment, correct reference link in README.

9 years agoUpdate the simplified interface link in the README
Thomas M. Hermann [Wed, 10 Oct 2012 18:54:29 +0000 (10 13:54 -0500)]
Update the simplified interface link in the README

9 years agoUpdate get-tests and get-test-code for managing tests.
Thomas M. Hermann [Wed, 10 Oct 2012 18:24:02 +0000 (10 13:24 -0500)]
Update get-tests and get-test-code for managing tests.

9 years agoDescribe and link to the simplified interface in the README.
Thomas M. Hermann [Wed, 10 Oct 2012 18:11:10 +0000 (10 13:11 -0500)]
Describe and link to the simplified interface in the README.

9 years agoCompatibility version 0.8.1.0.8.1
Thomas M. Hermann [Wed, 10 Oct 2012 15:55:17 +0000 (10 10:55 -0500)]
Compatibility version 0.8.1.

9 years agoWarn if no test are defined in the package.
Thomas M. Hermann [Wed, 10 Oct 2012 02:52:19 +0000 (9 21:52 -0500)]
Warn if no test are defined in the package.

Improve formatting of summarize-results.

9 years agoCorrect some bugs with the resurrected API.
Thomas M. Hermann [Wed, 10 Oct 2012 01:55:17 +0000 (9 20:55 -0500)]
Correct some bugs with the resurrected API.

9 years agoRoll back the run-tests,run-all-tests,remove-tests,remove-all-tests API.
Thomas M. Hermann [Tue, 9 Oct 2012 22:20:40 +0000 (9 17:20 -0500)]
Roll back the run-tests,run-all-tests,remove-tests,remove-all-tests API.

Do this to facilitate a Quicklisp release.

9 years agoWrap the new run-tests function in the old interface.
Thomas M. Hermann [Tue, 9 Oct 2012 20:59:23 +0000 (9 15:59 -0500)]
Wrap the new run-tests function in the old interface.

Do this temporarily for Quicklisp compatibility.

9 years agoVersion 0.8.00.8.0
Thomas M. Hermann [Mon, 8 Oct 2012 04:53:26 +0000 (7 23:53 -0500)]
Version 0.8.0

Update some comments to reflect the new documentation.

9 years agoRemove the obsolete lisp-unit documentation.
Thomas M. Hermann [Mon, 8 Oct 2012 04:36:33 +0000 (7 23:36 -0500)]
Remove the obsolete lisp-unit documentation.