summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2017-01-10 20:22:26 (GMT)
committerTobias Markmann <tm@ayena.de>2017-01-11 18:23:48 (GMT)
commit3b0cde2e6dbf26a01a59b0004e4041199731cbc8 (patch)
tree0b2ba6addb161f1d3e437a64685ea797341a149b /3rdParty/GoogleTest/src/googletest/docs/Samples.md
parenta0c339f80e4585341179edef1898defd21a0d36a (diff)
downloadswift-3b0cde2e6dbf26a01a59b0004e4041199731cbc8.zip
swift-3b0cde2e6dbf26a01a59b0004e4041199731cbc8.tar.bz2
Integrate googletest and googlemock libraries to 3rdParty
googletest and googlemock from release 1.8.0 have been copied to the 3rdParty folder. With this commit tests for Swift project can also written using googletest and googlemock APIs. The test runners will execute test suites written to either test library. Passing —-xml to a test runner will now create two test report XML files, namely $programName-report.cppunit.xml and $programName-report.gtest.xml. The ByteArrayTest has been converted to use googletest instead of googlemock to serve as an example and test the integration. Test-Information: Build all tests via ‘./scons test=all’ and verified all tests are run. Build all tests via ‘./scons test=all checker_report=1’ and verified that two report XML files are generated per test runner executed. Change-Id: I81a9fb2c7ea5612fc1b34eef70ed7e711bfeea81
Diffstat (limited to '3rdParty/GoogleTest/src/googletest/docs/Samples.md')
-rw-r--r--3rdParty/GoogleTest/src/googletest/docs/Samples.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/3rdParty/GoogleTest/src/googletest/docs/Samples.md b/3rdParty/GoogleTest/src/googletest/docs/Samples.md
new file mode 100644
index 0000000..f21d200
--- /dev/null
+++ b/3rdParty/GoogleTest/src/googletest/docs/Samples.md
@@ -0,0 +1,14 @@
+If you're like us, you'd like to look at some Google Test sample code. The
+[samples folder](../samples) has a number of well-commented samples showing how to use a
+variety of Google Test features.
+
+ * [Sample #1](../samples/sample1_unittest.cc) shows the basic steps of using Google Test to test C++ functions.
+ * [Sample #2](../samples/sample2_unittest.cc) shows a more complex unit test for a class with multiple member functions.
+ * [Sample #3](../samples/sample3_unittest.cc) uses a test fixture.
+ * [Sample #4](../samples/sample4_unittest.cc) is another basic example of using Google Test.
+ * [Sample #5](../samples/sample5_unittest.cc) teaches how to reuse a test fixture in multiple test cases by deriving sub-fixtures from it.
+ * [Sample #6](../samples/sample6_unittest.cc) demonstrates type-parameterized tests.
+ * [Sample #7](../samples/sample7_unittest.cc) teaches the basics of value-parameterized tests.
+ * [Sample #8](../samples/sample8_unittest.cc) shows using `Combine()` in value-parameterized tests.
+ * [Sample #9](../samples/sample9_unittest.cc) shows use of the listener API to modify Google Test's console output and the use of its reflection API to inspect test results.
+ * [Sample #10](../samples/sample10_unittest.cc) shows use of the listener API to implement a primitive memory leak checker.