I'm having a problem dealing with TDD through gtest in Xcode. The story: there is a project and inside it there is another executable target. I added gtest project parallel to this target to test the target itself along with the source code from the surrounding project. There is a file with main()
, which includes the testing file with all TEST(.., ..)
. That situation gave me first problem I fought with –– duplicate symbols for architecture arm64. I found out that getting rid of the include in the main helps and it compiles. And the tests run. BUT changing the source code from the parent project isn't recognised by the test. And that is the problem. Every time I have to change the code I also have to put that include back, try to compile, see it fails, throw the include away, compile again and only here the tests CAN see different behaviour. That's not the flow to work with...
Please help. Thanks in advance