Commit Graph

30 Commits

Author SHA1 Message Date
Martchus d7dd33d95a WIP: Use consistent prefix for #defines 2018-07-02 21:33:41 +02:00
Martchus e0fee70d58 Print vector<char> and similar in hex notation on assert fail 2018-06-21 23:27:05 +02:00
Martchus 1aa8b387e1 Apply clang-format 2018-05-08 00:35:51 +02:00
Martchus a4435bbcf3 Fix usage of enable_if with GCC 8
Seems like the trick with the three dots isn't working
with GCC 8 anymore. So let's make it a default template
parameter then.

Not sure whether GCC 8 is here correct and whether this
workaround causes further trouble.
2018-05-07 23:22:43 +02:00
Martchus 3a768508fd Use src dir as fallback unless arg *and* env var specified 2018-02-03 17:16:30 +01:00
Martchus cf4789e94d testutils: Allow asserting maps/hashes 2017-11-13 20:06:09 +01:00
Martchus 2bb4aa36a4 Let tests find the testfiles from sources without extra args
Currently the path of the testfiles always had to be specified
either manually using the -p argument or by running the tests
via the build system targets. The first option is annoying and
the second option not so nice when using Qt Creator and the
debugger.

This commit allows tests to find the testfiles from the source
directory automatically (as fallback). This is achieved by
creating a file containing the path of the source directory
with CMake. Note that this file can only be found if the working
directory is set to the binary directory (default in Qt Creator).
2017-10-30 23:01:07 +01:00
Martchus e393af5dbb testutils: Print indices of iteratables (on assert equal fail) 2017-10-23 01:11:11 +02:00
Martchus 2ec3df889f Allow accessing application path from TestApplication
Make it static because when this function becomes useful,
the (singleton) instance is likely not available.
2017-10-21 21:25:26 +02:00
Martchus e52fd5a4af Apply tidy after updating to clang-format 5.0.0
The behavior of clang-format slightly changed in Clang 5.0.0:
http://releases.llvm.org/5.0.0/tools/clang/docs/ReleaseNotes.html#clang-format
2017-09-17 21:45:23 +02:00
Martchus 840700d7af Fix compiling math tests under 32-bit architectures
Same problem as with size_t. The types must match exactly
when using CPPUNIT_ASSERT_EQUAL and using 'l' or 'ul' suffix
is not sufficient under 32-bit.
2017-09-03 20:13:27 +02:00
Martchus 57d5d04d9f Merge prof data of subprocesses created when executing tests
So coverage is accounted correctly when tests create subprocesses
of the application to be tested using execApp().
2017-06-20 23:19:49 +02:00
Martchus 5388337bcc Fix compiling tests under 32-bit arch 2017-05-30 23:56:08 +02:00
Martchus 18fef23724 testutils: Add execHelperApp() 2017-05-19 00:07:38 +02:00
Martchus cab1a76ecf Allow printing iteratable objects
So those can be asserted using CPPUNIT_ASSERT_EQUAL
2017-05-10 23:32:48 +02:00
Martchus 59e20b1043 Apply clang-format 2017-05-01 03:13:11 +02:00
Martchus c13eee6fcc Add workingCopyPathMode() to be able to skip actual copy 2017-02-04 20:16:50 +01:00
Martchus a772cdf30b Add conveniently usable string builder
which allows fast string building without multiple heap allocations
2017-01-26 22:16:18 +01:00
Martchus d6b08b8ed9 Fix decoration for static builds
- Also add improvemnts a few other things in the build system
2016-08-29 15:35:48 +02:00
Martchus 1a4087abbc Use async IO in TestApplication::execApp()
rather than multiple threads
2016-08-15 22:35:37 +02:00
Martchus b36572a4dd Add macro to assert execution of application 2016-08-06 22:02:14 +02:00
Martchus ed527021f9 Improve logging when testing applications 2016-08-05 01:43:46 +02:00
Martchus 17d22be584 Support testing applications 2016-07-30 22:34:31 +02:00
Martchus 0c40a510e5 Add functions for character set conversions 2016-07-27 18:24:37 +02:00
Martchus 526cbc5282 Rewrite argument parsing 2016-06-13 00:00:36 +02:00
Martchus 4f87cc1181 Use C-strings where std::string is unneccessary 2016-06-11 19:42:03 +02:00
Martchus 7bb6875ded Allow testing particular units 2016-05-23 00:03:55 +02:00
Martchus 29c0db0090 mingw-w64: workingCopyPath is (currently) not supported 2016-02-27 01:18:54 +01:00
Martchus af5b879506 utilize creation of working copies for tests 2016-02-09 02:21:42 +01:00
Martchus 9abe04ce06 make test code public to simplify creation of tests in other projects 2016-02-06 16:55:28 +01:00