Riccardo Cipolleschi
1 min readMar 25, 2023

Hi Ronan, thanks for the questions. I wrote this article more than 2 years ago, so I hope I remember correctly how to answer.

> why not do the same for the screen name?

What do you mean with the 'screen name'?

For what I can see, we have an entry in the `enum` that is `case legalView` which is the screen name, so it is there.

We could actually omit it, as we are not really using it directly, so it is a case that we are not using in the code.

If you mean the `home_screen` that we are passing to the parameters or that we are using in the `buildViewController()` function, yes, it can be done. I probably omitted it to not disrupt the attention away from the legal screen that is the actual thing we want to test.

> Why? That code doesn't ship anyway.

Good question. It can probably be omitted, if you are 100% sure that the tests run with the `UITESTING` always set.

If that's the case, you can remove the `#if-#endif` pair. But, if you have a complex test scenario where you run test in multiple configuration, and one of them has the `UITESTING` flag not set properly, it will fail to compile because it won't find the symbols.

I hope these answers help you and make sense to you.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Riccardo Cipolleschi
Riccardo Cipolleschi

Written by Riccardo Cipolleschi

Hey there, I’m Riccardo. Software engineer at Meta. I have a passion for iOS and I love to share my knowledge with others.

Responses (1)

Write a response