Include "program code" in example #15

merged 1 commit into from May 30, 2016


None yet

2 participants


In the example, shows both test and "program" code as well as generates output for both.

Further clarifies what does in the comment (as it puzzled me a bit at first).
I think it's better to remove (and --no-run) from the next comment as shouldExit() is not true for --no-run [1] .

Perhaps also update the (same) example The main() entry point.

[1] rename shouldExit() to mustExit() ?

@martinmoene martinmoene Include "program code" in example
onqtam commented May 30, 2016

oh! the -no-run thing in the comment should have been -exit - thanks for the catch!
the CI builds fail though... because the output doesn't match the reference output (because of the printf) - I will merge it and update the reference output.

I feel it's a bit too late to change the name of shouldExit().

@onqtam onqtam merged commit ffd03ec into onqtam:dev May 30, 2016

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
continuous-integration/appveyor/pr AppVeyor build failed

First the build should fail, shouldn't it (in truth I forgot about the ref. output ;)

shouldExit(), or expectsExit() is perhaps just right; programmers may have their reasons to not follow the advice to exit there. If you've watched one of Kevlin Henney's talks about testing, you may recognise my hesitation to use the word should when used in relation to testing (ca. 56 min in ;).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment