Comments (3)
I am a little bit of a pragmatic wrt test plan vs done-testing, my views are:
-
if you know the number of tests, put it. If you have a huge test file where a lot of funny things like non-deterministic number of tests can happen, the number of test cases will also help you. If the test file has a handful of tests,
done-testing
is already good enough -- a specifictest plan
is a cherry on top. -
If the number of tests is driven by a json file,
plan 0+@testcases
is better than a hard-codedplan 13
. Because the former always reflect what you want to do, and the latter will bite you in the beep fairly often, unless you have a better short-term memory than I do. ;-) -
done-testing
can be nice to have when there are a bunch of utility functions at the end of the file, as it's used as a visual marker of "tests are done now, you can stop reading". -
for subtests, rule #1 applies with s/file/subtest.
-
considering that in most cases
plan
and/ordone-testing
will work just fine, using either one or both is, as far as I'm concerned, a question of personal style. I acknowledge that if someone remove wholesale a test thedone-testing
will not complain, and that could be an argument for fairly large test files. But for the test files we're having here, it's (in my opinion) inconsequential. -
I should probably specify that while am not convinced of the supremacy of
test plan
overdone-testing
, I don't have any problem at all with somebody caring more about it revisiting and uniformizing (sp?) the testcases later on. I have enough of an opinion to do what I think makes sense to me, but I'm flexible enough to let peeps tweak the given code as to satisfy their own personal itch. :-)
from raku.
With 2 maybe, if you're certain that you haven't made any mistakes when modifying the JSON. I think it's more accurate to say it's what you did do (for better or worse) rather than what you wanted to do.
For 3, now that you mention it, I can see the value of done-testing
in some cases, particularly with the changes I'm making re: #87
from raku.
For 2 there is also the caveat that it depends of what the actual situation is. If the json used is a huge thing used by other pieces of software and things could get mixed up, yeah, that's one thing. But if we're dealing with a simple file used for only the test at hand, it's a much simpler kettle of fish.
For 3, yup, #88 is a good example of what I mean. It's nothing world-changing, but it's a mite nicer than a # -----------
line.
from raku.
Related Issues (20)
- [v3] Add tags HOT 1
- Add prerequisites to Practice Exercises HOT 1
- Pass linting checks HOT 1
- [v3] Build Test Runner
- Build Representer and Analyzer HOT 1
- Update status of track
- Update status of Concept Exercises HOT 1
- Launch Tracker 🔴
- 🤖 Sync error for commit 9ec57c
- Extract track-specific help instructions from `config/exercise_readme.go.tmpl`
- Extract track-specific test instructions from `config/exercise_readme.go.tmpl`
- Build representer
- Check docs are up to date HOT 4
- CI is failing HOT 1
- [Syntax highlighting] Hyphen in quote words HOT 2
- Help.md problems with prove6 & test files HOT 3
- exercise-gen.raku doesn't work on Macs due to wrong configlet cache location HOT 1
- [Track Documentation] Need instructions for running lib exercises HOT 1
- Building a training set of tags for raku HOT 21
- New Testcase for the  vs  unicode HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raku.