From the course: Test-Driven Development in C++

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Set up Google Test with Xcode

Set up Google Test with Xcode - C++ Tutorial

From the course: Test-Driven Development in C++

Set up Google Test with Xcode

- [Instructor] In this lecture, I'm going to walk through getting Google Tests set up to run in the Apple Xcode IDE. To follow along with this lecture, you'll need to have a recent version of the Xcode IDE installed. You'll also need to have downloaded and compiled the Google Test library. Please refer to the video for compiling and running Google Test in Eclipse for instructions on downloading and compiling Google Test. First, I'm going to create a new test project called googletest_test, and I'll make sure it compiles and executes. Now that I have the project set up, I'm going to modify the code to have a simple unit test that always asserts true and should always pass. Then I'll try to compile and execute that code. And I immediately see compile errors from Xcode that it can't find the gtest header and doesn't know the gtest macros. I'll fix the compile errors by adding the path to the Google Test include files to the project. I'll also add the library files gtest and gtest_main…

Contents