!!!Installation:
• After Downloading Gtest the next step is to build it. To do this is fairly easy just open
• After Building notice that a ‘Release’ folder will be created in ‘
!!!Making a Test Project(Note: These are the settings only for release mode):
• Place the gtest directory in the local folder(where there is bin directory) of your project so that it can be machine independent
• Make a win32 console application Project in VS2008 with language settings as C++
• Go into Solution Explorer > Right Click Top Node > Add > Existing Project and Add two projects :
o
o ‘
• Go into Project Menu > Properties > Configuration Settings > C/C++ > Code Generation and set
o Basic Run Time Checks to “Both (/RTC1, equiv. to /RTCsu) “
o Run Time Library to “Multi-threaded(/MT)”
• Go into Project Menu > Properties > Configuration Settings > C/C++ > Optimization and set optimization: Disabled (/Od)
• In your Visual Studio Project open: Project Menu > Properties > Configuration Settings > C/C++ > Additional Dependencies(All configuration in combo box)
o Add on a new line in double quotes ‘$(InputDir)\gtest-1.3.0\include’ folder.
o Now make a Separate Source file and in that write the test methods using TEST’ macro
o And in Projects main source file call the tests using RUN_ALL_TEST
Note:
For Additional Help: http://code.google.com/p/googletest/w/list
No comments:
Post a Comment