zlacker

[parent] [thread] 0 comments
1. _flux+(OP)[view] [source] 2026-01-20 08:13:50
The required-test-per-function is sort of interesting. But it's not enforced that the test does anything useful, is it?

So I wonder how exhausting would it be to write in a language that required, for all functions, that they are tested with 100% path coverage.

Of course, this by itself wouldn't still be equivalent to proving the code, but it would probably point people to the corner cases of code quite rapidly. Additionally it would make it impossible to have code that cannot be tested with 100% path coverage due to static relationships within it, that are not (or cannot be) expressed in the type system, e.g. if (foo) { if (!foo) {..} }.

And would such a language need to have some kind of dynamic dependency injection mechanism for mocking the tests?

[go to top]