Devlog: January 11, 2023

I wrote a unit test.

😱

I wanted to test my algorithm for storing recent selections—make sure it limits to the correct number, reorders duplicates, etc. I am by no means and expert in testing, especially in Xcode and Swift, so I won’t share my code right now—don’t want to lead anyone unintentionally down the wrong road.

So I’ve got lots to learn about best practices of testing iOS projects, writing Swift in a testable way, and things like that. I had to rewrite one of my classes to extract the actual algorithm because I did not know how to mock or setup the rest of the class to be testable.

That’s all I had time for today, but felt like an important step.



Date
January 11, 2023