Hi. This module seems right to me.
I was wondering whether the Testo functions can convert more of the existing Test functions to the new ones.
When I began to convert some of my test files and looked at the Testo documentation, some (maybe silly) questions came up:
a) How would I used Testo in combination with Test, since there are some functions in Test that are not yet in Testo? Can they be used in combination? Would use Testo come before or after use Test? How could I know that the is function of Testo is being used?
b) Maybe rename Testo is to is-better (alias) is-b to remove any ambiguity between Testo and Test?
c) In the documentation on is-runs, I did not quite understand what :status is used for. Is it the exit code? If so, wouldn't :exit-code be better?
Comment: I think your suggested name change to runs would be better than is-run, but for more idiomatic English, may be try-running? runs implies the program is an agent and the CODE is the predicate. However, run and try-running are imperatives, and imply a predicate. Actually, if the test function name should be a question, following the pattern 'is ', then does-the-following-run (alias does-run, or even run) would be more idiomatic, but unfortunately excessively wordy. It would also make the inverse idiomatic, viz., does-the-following-not-run (alias does-not-run).
In my (very limited) experience, I tend to use the following Test functions, because they help me to locate errors as I develop.
- use-ok [ to test a new class, but would 'is' with a Type work instead?]
- lives-ok / dies-ok [ I'm wondering whether the
is-run and an expected value on STDERR would cover all lives-ok/dies-ok scenarios? ]
- throws-like [ I'm wondering whether you could add an
:exception(regex) adverb to is-run]
Hi. This module seems right to me.
I was wondering whether the Testo functions can convert more of the existing Test functions to the new ones.
When I began to convert some of my test files and looked at the Testo documentation, some (maybe silly) questions came up:
a) How would I used Testo in combination with Test, since there are some functions in Test that are not yet in Testo? Can they be used in combination? Would
use Testocome before or afteruse Test? How could I know that theisfunction of Testo is being used?b) Maybe rename Testo
istois-better(alias)is-bto remove any ambiguity between Testo and Test?c) In the documentation on
is-runs, I did not quite understand what :status is used for. Is it the exit code? If so, wouldn't :exit-code be better?Comment: I think your suggested name change to
runswould be better thanis-run, but for more idiomatic English, may betry-running?runsimplies the program is an agent and the CODE is the predicate. However,runandtry-runningare imperatives, and imply a predicate. Actually, if the test function name should be a question, following the pattern 'is ', thendoes-the-following-run(aliasdoes-run, or evenrun) would be more idiomatic, but unfortunately excessively wordy. It would also make the inverse idiomatic, viz.,does-the-following-not-run(aliasdoes-not-run).In my (very limited) experience, I tend to use the following Test functions, because they help me to locate errors as I develop.
is-runand an expected value on STDERR would cover alllives-ok/dies-okscenarios? ]:exception(regex)adverb tois-run]