File: README.unittests

package info (click to toggle)
labplot 2.12.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 78,500 kB
  • sloc: cpp: 241,048; ansic: 6,324; python: 915; xml: 400; yacc: 237; sh: 221; awk: 35; makefile: 11
file content (20 lines) | stat: -rw-r--r-- 1,316 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
http://doc.qt.io/qt-5/qtest-overview.html
http://doc.qt.io/qt-5/qtest-tutorial.html
https://wiki.qt.io/Unit_Testing
https://wiki.qt.io/Writing_Unit_Tests
https://cmake.org/Wiki/CMake/Testing_With_CTest

There are different ways to execute the tests:
* navigate to the build folder and do 'make test'
* navigate to the build folder and execute 'ctest'
* navigate to the folder containing the actual test executable and execute it from there, e.g 'cd build/tests/import_export/ASCII && ./asciifiltertest'

When executing via ctest, different options are available to execute individual tests:
* ctest -R filter  -  execute only tests having the substring 'filter' in the file name
* ctest -E filter  -  execute all tests excluding tests having the substring 'filter' in the file name
* ctest -I 1, 3, 5 -  execute the first, the third and the fifth tests only, use 'ctest -N' to determine which tests are available

Check https://cmake.org/Wiki/CMake/Testing_With_CTest and ctest --help for more infos.

To selectively execute tests when starting the test binaries directly, simple add the name of the test function you want to execute as a parameter to the executable, e.g. './asciifiltertest testEmptyFileAppend'.
Check http://doc.qt.io/qt-5/qtest-overview.html and -help output of a test executable for more infos.