(no title)
oslac
|
2 years ago
Is there still no type theoretic answer to unit testing? Does not the type or the class generally contain all the necessary information to unit test itself, assuming its a unit? That is, we should not have to even write these "theoretically". Just hit "compiler --unit_test <type>"
afro88|2 years ago
There's almost always more business logic to what a unit should do than it's types though. Depending on the language, the type system can only encode so much of that logic.
Consider the opposite: can't the compiler generate implementations from types and interfaces? In most cases, no. LLMs are filling some of that gap though because they can use some surrounding context to return the high probability implementation (completion) from the interface or type definition.
[1] https://en.m.wikipedia.org/wiki/Fuzzing
unknown|2 years ago
[deleted]