This patch adds unit test support, via the googletest
framework, to libcgroup.  I created a handful of unit tests
for the internal function cg_build_path() to provide a few
usage examples.

Changes from v1 to v2:

* Split the patch into two patches - one for the framework
  and one for the first example test
* Updated copyright headers to match existing libcgroup
  headers
* Moved the unit tests to tests/gunit/
* Moved libcgroup_unittest.map to the gunit folder
* Added doxygen headers on the test functions

Tom Hromatka (2):
  tests: Add googletest unit test framework
  tests: Add unit tests for cg_build_path()

 .gitignore                         |   1 +
 .gitmodules                        |   4 +
 Makefile.am                        |   1 +
 configure.in                       |   6 +-
 src/Makefile.am                    |   6 +-
 tests/Makefile.am                  |   2 +-
 tests/gunit/.gitignore             |   6 ++
 tests/gunit/001-path.cpp           | 175 +++++++++++++++++++++++++++++++++++++
 tests/gunit/Makefile.am            |  39 +++++++++
 tests/gunit/gtest.cpp              |  29 ++++++
 tests/gunit/libcgroup_unittest.map | 130 +++++++++++++++++++++++++++
 11 files changed, 396 insertions(+), 3 deletions(-)
 create mode 100644 .gitmodules
 create mode 100644 tests/gunit/.gitignore
 create mode 100644 tests/gunit/001-path.cpp
 create mode 100644 tests/gunit/Makefile.am
 create mode 100644 tests/gunit/gtest.cpp
 create mode 100644 tests/gunit/libcgroup_unittest.map

-- 
1.8.3.1



_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to