Skipping selected tests which are groups Donovan Kolbly (08 Mar 2005 23:33 UTC)
Re: Skipping selected tests which are groups Per Bothner (09 Mar 2005 00:10 UTC)

Skipping selected tests which are groups Donovan Kolbly 08 Mar 2005 23:33 UTC

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                    (  xxxxxx@rscheme.org
				     (  http://www.rscheme.org/~donovan/