Comments (2)
Wouldn't it be possible to write an example-based test that would work for any given n
, and then run the test for several values of n
? Might not be quite as good as property based tests but probably sufficient and no more likely to lead to falsely succeeding tests than many other test suites?
Something like (and I apologise for the Clojure, I can't think in anything else these days):
(is true? (every? #(= 1 (count (filter queen? %))) rows))
(is true? (every? #(= 1 (count (filter queen? %))) columns))
(is true? (every? #(= 1 (count (filter queen? %))) diagonals))
from legacy-docs.
https://github.com/exercism/problem-specifications/blob/master/exercises/dominoes/description.md has multiple solutions, assuming tracks are asking for the chain, rather than whether there is a chain. Therefore https://github.com/exercism/problem-specifications/blob/master/exercises/dominoes/canonical-data.json advises in the comments about how to do the property-based testing.
https://github.com/exercism/problem-specifications/tree/master/exercises/diamond was originally for property-based testing, following http://blog.ploeh.dk/2015/01/10/diamond-kata-with-fscheck/ . Not all tracks did that.
from legacy-docs.
Related Issues (20)
- Documentation layout is confusing to me. HOT 4
- Wrong link on website HOT 2
- Is unlocked-by always required for non-core exercises? HOT 2
- language-tracks/configuration/exercises.md - document reasons a topic should be added HOT 5
- Mention ordering in configuration/exercises.md
- I Can Read C++ and Java But I Canβt Read Smalltalk HOT 7
- Request guidance for how to select the list of core exercises HOT 1
- Maintainer docs point to archived repo HOT 1
- Tools repository does not exist HOT 1
- Docs issue: Unable to find "contributing" section in sidebar HOT 2
- Mentor comment box missing tabbing HOT 2
- Track configuration directory lacks document about canonical_data_syncer
- The master branch will be renamed to main HOT 1
- Add documentation about track contributing documentation HOT 4
- Add documentation about track tooling, automation, and bots
- Update contributing guides for maintainers
- first-exercise.md: ends abruptly HOT 3
- Should implement-an-exercise-from-specification.md#configuring-the-exercise include nextercism keys? HOT 2
- Finish incomplete sentence HOT 2
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 legacy-docs.