I would like to ask if there is a process or a tool out there that can help me with parsing header and/or implementation files in objective-c (Xcode) to isolate properties and method names to help automatically generate OCUnit Test header and implementation files.
I am trying to implement OCUnit tests to existing projects and would like to automate the creation of my OCUnit classes and tests on a pre-existing classes.
In my head I can foresee the following process:
- Grab header and implementation files for the class you would like to create OCUnit tests for.
- Use a scripting language or the LLVM compiler to isolate the synthesized property setter and getters and generate OCUnit tests.
- Use a scripting language or the LLVM compiler to isolate the methods of the class and create OCUnit test for them as well.
- Separately in Xcode create a target for the class you are testing.
For me the parsing of the properties, and isolating the method names are the most important. I would hate to write a parser in python to accomplish this. Maybe there are commands in LLVM/Clang I can use to extract the class, property, and method names. From there I can use python to auto generate header and implementation files for my OCUnit tests. Any other ideas?