Tuesday 5 September 2017

TrafficControl: Testing Google Test

Now when I got QtTest working, I want to investigate how to use Google Test.

Google Test can be used with Qt Creator, and I need to find out how to use that for two reasons:

  1. Google Test might be more powerful with respect to functions,
  2. Google Test is more well-known than Qt Test and I will probably use it in future projects.

It's pretty simple to create a stand-alone Google Test application:

  1. First, I cloned cloning the GoogleTest repo using "git clone https://github.com/google/googletest.git", 
  2. After that, I created a Google Test project according to the Qt documentation.
  3. After compiling, the test is verifying and asserting the value of 0 and 1.


In the next blog post, I'll look into the files of the project and try to add test cases, and also to include Google test into TrafficControl.

No comments:

Post a Comment