Martchus
cf4789e94d
testutils: Allow asserting maps/hashes
2017-11-13 20:06:09 +01:00
Martchus
ab42e9d96c
Improve documentation of testutils
2017-11-12 16:58:53 +01:00
Martchus
cc5d6052f5
test application: Allow to skip argument parsing
2017-11-12 16:17:08 +01:00
Martchus
924481b033
Fix platform check for readFallback...() functions
2017-11-01 19:30:55 +01:00
Martchus
6fd2603cff
teat application: Prevent copying dir entries
2017-11-01 19:17:57 +01:00
Martchus
34f3ebb45d
Let tests find the application path without extra args
...
Currently the path of the application to be tested always had to
be specified either manually using the -a 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 makes tests assume the application to be tested is
called like the test executable itself, just without "_tests"-suffix.
2017-10-30 23:03:43 +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
fa39e2a1aa
Add traits to check for reserve() and size()
2017-10-27 18:25:32 +02:00
Martchus
dab05bdade
Improve coding style in test utilities
2017-10-24 01:02:07 +02: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
46f652ad00
Improve readability of ArgumentReader::read and use Phrases
2017-10-19 00:51:47 +02:00
Martchus
b4556c0481
Move OutputCheck to its own header file
...
* So it can be used in tests for tageditor and
other applications
* Make it a header-only class so c++utilities
does not depend on cppunit
2017-09-20 17:09:34 +02:00
Martchus
5f14d55f25
Use Argument::varValueCount to fix warnings
2017-09-20 17:07:06 +02:00
Martchus
868162742b
Adjust argument parser tests
2017-09-19 16:02:42 +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
357ede4ee7
chrono utils: Improve handling micro- and nanoseconds
...
DateTime and TimeSpan have an accuracy of 100 nanoseconds.
This commit ensures this is also handled in toString() and
fromString() methods and adds relevant convenience methods.
2017-08-31 02:17:05 +02:00
Martchus
c88fd9f9a8
Fix calculation of overall test coverage
2017-08-17 17:59:29 +02:00
Martchus
32210c2dca
Remove unused header in math tests
2017-08-05 18:34:50 +02:00
Martchus
de6b4be8b3
Test math utilities
2017-08-02 13:29:22 +02:00
Martchus
8bed0adc00
Test printing dependency versions
2017-07-28 20:47:49 +02:00
Martchus
f2b8ee4184
Test ownership also for BinaryWriter class
2017-07-28 20:35:05 +02:00
Martchus
1d4a4bd2be
binary reader/writer: Increase limit of length-prefixed strings
...
So strings with a size up to 0xFFFFFFFFFFFFFF byte can be handled.
2017-07-28 20:34:50 +02:00
Martchus
f4faf652fd
Improve argument parser tests
2017-07-28 19:33:55 +02:00
Martchus
d7cf4312bf
bash completion: Fix case when no current word index specified
2017-07-28 18:24:52 +02:00
Martchus
1af88c964e
bash completion: Show values for implicit args
...
So eg. `tageditor get [tab][tab]` also suggests specifying
field names directly instead of only via --fields.
2017-07-28 17:32:16 +02:00
Martchus
144175bb3a
Document necessity to run chrono test with different timezones
2017-07-16 18:34:42 +02:00
Martchus
f2189a15ce
Make check for DateTime::fromTimeStamp timezone-independent
2017-07-16 18:20:41 +02:00
Martchus
37a8b78689
Update summary of stringbuilder benchmark
...
So it matches new results of commit
17fe42e0ad
2017-07-11 19:16:32 +02:00
Martchus
442f7a9b25
Exclude generated files from coverage
...
* So files generated by moc or qdbusxml2cpp are not
part of coverage statistics
* When filtering files, llvm-cov prints multiple tables
showing coverage on function level.
-> Generate overall coverage stats via awk.
2017-07-09 23:38:11 +02:00
Martchus
8b0661713b
Improve conversion tests
2017-06-25 16:03:46 +02:00
Martchus
4157f8849a
Improve argument parser tests
2017-06-25 16:03:40 +02:00
Martchus
a53601e5d0
Improve chrono tests
2017-06-25 16:00:11 +02:00
Martchus
454347c31f
Improve IO tests
2017-06-25 16:00:11 +02:00
Martchus
f62ed9f63d
Test HelpArgument
2017-06-25 01:42:38 +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
ace077f9aa
Fix INI test
2017-06-09 12:15:24 +02:00
Martchus
28f37bbbcd
string to int: Allow specifying string size
2017-06-08 00:41:29 +02:00
Martchus
045c713cf5
string to int: Ignore whitespaces at beginning
2017-06-08 00:39:54 +02:00
Martchus
5388337bcc
Fix compiling tests under 32-bit arch
2017-05-30 23:56:08 +02:00
Martchus
3bc1756425
Add Argument::varValueCount
2017-05-19 00:12:07 +02:00
Martchus
2e98e3bd11
testutils: Fix finding testfiles dir in pwd
2017-05-19 00:08:27 +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
3b74b817ec
Add trait to test for strings
2017-05-10 23:31:28 +02:00
Martchus
7faa51c10e
Test traits
2017-05-08 19:59:29 +02:00
Martchus
db46948f2f
Apply clang-format
2017-05-04 22:44:15 +02:00
Martchus
59e20b1043
Apply clang-format
2017-05-01 03:13:11 +02:00
Martchus
c728f0ffe0
Add hash functions for chrono objects
2017-05-01 02:54:06 +02:00