[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Skipping selected tests which are groups

This page is part of the web mail archives of SRFI 64 from before July 7th, 2015. The new archives for SRFI 64 contain all messages, not just those from before July 7th, 2015.



I am trying to figure out the intended interaction between "test-skip" and 
"test-begin".

The spec says that "Before each test (or begin-group [sic: I assume this
means 'test-begin']) the set of active skip-specifiers are applied to the
active test-runner. If any specifier matches, then the test is skipped."

What is "the test" when it's a test-begin?  Are all the tests inside the 
group supposed to be skipped, or is all the code evaluable between the 
start and end of the test group supposed to be skipped.

Consider:

  (test-skip "test-b")
  (test-begin "test-b")
  (do-some-stuff)
  (test-assert "b.1" (whatever))
  (test-assert "b.2" (foo))
  (test-end "test-b")

Is (do-some-stuff) supposed to get evaluated?

...or... does "begin-group" in the spec mean "test-group", in which case
the user is obliged to lexically nest any forms which are to actually be
skipped?

e.g., this behavior is a little [ :-) ] easier to implement:

  (test-skip "test-b")                                                              
  (test-group "test-b"
    (do-some-stuff)                    ; skip
    (test-assert "b.1" (whatever))     ; skip
    (test-assert "b.2" (foo)))         ; skip
  (test-end "test-b")


Also, do skipped tests count for the purposes of the `count' argument to
test-end?  I assume so, or else much pain to any who uses both features!  
I suppose that is why SKIP is mentioned as a possible test result: to take 
up a slot in list whose length must be = to `count'.


-- 
-- Donovan Kolbly                    (  d.kolbly@xxxxxxxxxxx
				     (  http://www.rscheme.org/~donovan/