libmx3 / mx3

a sample project showcasing/collecting cross platform techniques on mobile
MIT License
1.17k stars 149 forks source link

sample test ios app, with gtest enumerator #55

Closed daviswalker closed 9 years ago

daviswalker commented 9 years ago

This demonstrates a test app with xcode test integration - the gtest tests are enumerated as xctestcases. It's a little finnicky but could serve as the basis for a nice pattern.

skabbes commented 9 years ago

Do you mind describing a bit about this? I notice that you have implemented essentially a proxy between gtest and Xcode's testing framework. Was an entire additional test application necessary?

Did you look at https://github.com/mattstevens/xcode-googletest at all?

daviswalker commented 9 years ago

As described here - https://github.com/libmx3/mx3/issues/42 - I'm absolutely using Matt's technique and code here. The proxy enables the tests to appear (along with results, the ability to selectively enable/disable them, etc) in Xcode's test tab. I have a similar proxy for Android although it hasn't been as useful.

My gyp-fu is weak, however I was unable to create an Xcode test target using gyp, which is why I had to hand-build this project and include it in a workspace that also includes the gyp-generated project files. In general I've found that I need to jump out of gyp land for the last mile of my projects for various reasons - has it been different for you?

skabbes commented 9 years ago

I took a stab at gyp-ing the project that you had handwritten, and put it up for your review here: https://github.com/libmx3/mx3/pull/57. I didn't meant to supersede you, I just think getting this into gyp is important.

I had a similar experience with gyp initially, but once I admitted that the documentation is horrible and just started reading the code, things got better. I don't expect every developer to learn the internals of gyp, but I think if we solve enough of the common problems here - people won't have to.

daviswalker commented 9 years ago

very nice!

skabbes commented 9 years ago

Closing, since that has been implemented another way.