2 ms·
I've always wished you could put function tests in the comments that would compile time evaluate (or at least let you run a localized version of just that funct
by Eji1700 4y ago
I've always wished you could put function tests in the comments that would compile time evaluate (or at least let you run a localized version of just that function), and could then WARN YOU when you've broken parity with whatever test/example you put together right there.
Yes a unit test will show you that something is changed, but often it's the comments that don't get updated.
Hell maybe just let us flag the comments that will need to be changed if X or Y unit test fails. Just some way to better link comments to code adjustments.