TextScroll: Week 2, June 17 – Michelle

Similar to my autolayout day, a lot of today was spent getting hung up on what one might think are very trivial and straightfoward things. I am definitely much more impressed and grateful for Java’s fast and easy unit testing.

The long story: I wanted all the unit tests to go in a new folder to keep things organized, but apparently that means they can’t access methods from other folders in the same project unless if you import it in with the syntax “@testable import HMC_Word_Scroll”. This 3-word combination, and no other, was a struggle to arrive at. I tried “import Scrolling Label”, “import HMC Word Scroll” and “@testable import HMC Word Scroll”, but it would complain about the spaces in the file name, so I spent a while trying to rename the entire project to omit the spaces and that messed everything up. So I reverted and tried “import HMC_Word_Scroll” and it wouldn’t work, etc. etc. etc…

Eventually I achieved the trifecta, and then got hung up on trying to use StopWatch’s mutation functions inside an NSTimer, attempting to convey that I wanted the stopwatch to execute stop() after several seconds, but eventually opted for the simpler sleep(). I also tried exploring how the Suple class was intended to be used, but the suple Dictionaries and raw data in the email account all look like a jumble of numbers to me. I’m very interested in understanding what’s going on, so it’s high on my to-do list for next week.

The unit tests I got done and working today were StopWatch, Suple (simple tests), and I’m partway into Extensions. There’s a note about a bug in findWordsBeforeIndex that I have an idea how to fix, but want to run the idea by our full group/ Prof. Medero before I implement it. Overall, today was a great learning experience, and I think writing unit tests from scratch is a great way to get familiar with an app like TextScroll.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s