46 ms·
Since there are no if's (except at the end), every line is executed. Since all if's at the end can be placed on a single line, you have 100% line coverage. I do
by rrobukef 6y ago
Since there are no if's (except at the end), every line is executed. Since all if's at the end can be placed on a single line, you have 100% line coverage. I don't think this language is very serious.
- MaxBarraclough 6y agoAs you say, this doesn't sound right. If you force the programmer to write branch-free code (this appears to be the founding principle of the language [0]), that doesn't mean your boundary-value analysis [1] problems go away, it means you've made them less explicit. As you say, there's full line coverage for tests, but no guarantee of full equivalence-partition coverage. It's quite possible for branch-free code to fail on certain values. ctrl-f for overflow in [2] The 'Showcase' link is broken, the GitHub repo seems to show no examples, and the linked StackOverflow chaos tag is never used in relation to this language, so as you say, I'm not sure how serious this language really is. Fun idea though. (It's entirely possible I'm misusing the term boundary-value analysis. Corrections welcome.) [0] https://chaos-lang.org/docs/11_decision_making https://chaos-lang.org/docs/11_decision_making [1] https://en.wikipedia.org/wiki/Boundary-value_analysis https://en.wikipedia.org/wiki/Boundary-value_analysis [2] https://graphics.stanford.edu/~seander/bithacks.html https://graphics.stanford.edu/~seander/bithacks.html