|
|
|
|
|
by bsaul
3182 days ago
|
|
It seems like the error was in the creation of an intermediate data structure ( minimal dictionary something) in a storageKit framework. I’m not talking about the disk util app ( which doesn’t contain any bug in itself apparently) To give a better answer : I’m not knowledgeable of the whole source for the framework, but there are only two cases : - either the outputs of your critical function are testable and then just test it. - or they’re not ( most often because of side effects), in which case you should extract the critical part in purer function, and test that. It’s a great benefit of unit test : they force you to isolate side effects from business logic, to be able to test the latter. In that case, if the function isn’t testable, then maybe the creation of this intermediate minimal dictionary should belong in its own function that just does the data mapping. |
|