4 ms·
It could be interesting to think about unit tests and contracts together. In theory a function is valid for anything allowed under its contract, which could mak
by ianbicking 4y ago
It could be interesting to think about unit tests and contracts together. In theory a function is valid for anything allowed under its contract, which could make generative testing (aka property-based testing) more powerful and automatic.
It would also be nice to have system-level contracts. Like, say, "every item in list X should have an entry in dictionary Y". Or "no button should be located outside the visible viewport". These are the sorts of things that people procedurally unit test, but expressed in a declarative way you can imagine all sorts of tooling.
- kaba0 4y agoHere, OOP seems to be actually a solution with its encapsulation. And in a way, certain parts of it already exist in the form of JML ( https://en.m.wikipedia.org/wiki/Java_Modeling_Language https://en.m.wikipedia.org/wiki/Java_Modeling_Language )