bUnit
bUnit copied to clipboard
fix some nullables
remove some redundant ?
and !
Looks like we have test failing after the these changes. Want to take another stab at it or should we close this PR?
I guess the tests are contradicting the actual (new) implementation.
We have tests, which do things like: null!
and those fail now. The only way to fix this is actually to remove those tests.... which to some extend make sense. On the one side we use non-nullable reference types, but on the other side in tests we basically do the opposite with null!
.
It is always a bit of an balancing act between: "Yes we have non-nullable reference types so we can outsource the problem to the user" VS "Our users might not have non-nullable reference types and they might get weird exceptions".
I guess the tests are contradicting the actual (new) implementation. We have tests, which do things like:
null!
and those fail now. The only way to fix this is actually to remove those tests.... which to some extend make sense. On the one side we use non-nullable reference types, but on the other side in tests we basically do the opposite withnull!
. It is always a bit of an balancing act between: "Yes we have non-nullable reference types so we can outsource the problem to the user" VS "Our users might not have non-nullable reference types and they might get weird exceptions".
I think its important to test what even "stupid" users might do (aka those that ignore the compiler or turn of nullable ref types), so I do think the null!
tests are valid.
This looks like its dead, so ill close it for now.