Skip to content

Latest commit

 

History

History
77 lines (68 loc) · 3.3 KB

File metadata and controls

77 lines (68 loc) · 3.3 KB

fixtures: easy DEFINE-ENSURE-* macro

DEFTEST ignore declarations don’t work

Because we save the args in the trial for rerunning. DYNAMIC-EXTENT does not work either.

verbose mode: explain OUTCOME-MARKERs, totals, etc

WITH-SHUFFLING seed vs reproducability?

Portable seeding?

support user defined handlers in TRY?

That is, instead of DEBUG we could say (UNEXPECTED-FAILURE #’INVOKE-DEBUGGER) or (UNEXPECTED-FAILURE nil) and establish our own handler outside TRY.

DESCRIBE vs verdicts?

tests rely on default values of specials

Add more vars to WITH-STD-TRY. Actually, use DEFVAR* to capture those defaults according to OAOO.

Or, just make the global binding immutable?

threads

  • State “CANCELLED” from “MAYBE” [2023-08-05 Sat 09:32]

(with-test (t0) (adopting (c0) (make-thread (lambda() (reparenting (t0 c0) (with-test (t1) …))))))

  • ADOPTING binds C0 to a semaphore. REPARENTING arranges for T1 to be added to a dedicated slot (ADOPTEES) in T0 in a thread safe manner and signals C0 when it’s done. CHILDREN continues to be accessed without synchronization overhead.
  • ADOPTING captures the relevant dynamic environment, and REPARENTING reinstates it.
  • ADOPTING waits on the semaphores it created at the end.
  • There may be REPARENTINGs without semaphores. ADOPTING cannot wait for those, and it is the user’s responsibility to synchronize.
  • Printing semantics are nasty. Events must be printed at the latest when the debugger is entered, so maybe print with thread ids? Use different printer objects to keep things simple. This maintains simple nesting structure in TRIALs and CHILDREN but breaks nesting in the output, of course.
  • The ordering of events is lost (some are in CHILDREN some in ADOPTEES). Printed output cannot be reproduced on reruns. Rerunning semantics is a headache more generally. This is not great.

Maybe it’s better to provide a simple macro that waits for threads created with a timeout and leaves it to the user to perform the checks in the right thread. The problem is that which threads to wait for cannot be decided automatically.

(try package): list-package-tests returns those with required args

Provide opt out from LIST-ALL-PACKAGE-TESTS? Maybe tags?

count skipped trials in parent?

There should be a trace of what happened in the counts.

improve readability of backtrace

I don’t know how. See TRY::EXPAND-WITH-TRIAL-IN-DEFTEST-P.

find the exact source location somehow with M-. on the repl output?

PAX has MARK-THIS-SOURCE-LOCATION.

Some of this is taken care of by rerunning (e.g. (FUNCALL !)), which will likely land in the debugger, and that has source location info.

in mgl-try-mode find the non-global test function sources too?

test elisp

support testing for warnings during compilation

CCL for example [handle][clhs]s even user-signalled warnings during compilation. Textual matching?

limit the number of :HANDLER uses?

It is easy to get into a infinite loop with :HANDLER #’CONTINUE.

make test.sh public