Martchus
e283eea1f0
Prevent using executable of header-only lib for coverage
2017-11-15 19:13:36 +01:00
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
39f69f94d7
Make CPP_UTILITIES_TRAITS_DEFINE_TYPE_CHECK usabe from any ns
2017-11-06 21:28:09 +01:00
Martchus
f9e4c74aff
argument parser: Expose occurrence info directly
...
Primarily for testing porposes, see documentation.
2017-11-06 19:50:46 +01:00
Martchus
cc09fdc35f
Use Argument::varValueCount everywhere
2017-11-06 19:49:39 +01:00
Martchus
6bc97e5b16
Fix API doc (\macro -> \def)
2017-11-06 19:47:17 +01:00
Martchus
f3777d7159
Improve description and README.md
2017-11-04 15:48:47 +01:00
Martchus
a7880e3d0c
Remove *.qm files from targets when built-in translations enabled
...
This prevents updating *.ts files twice and in parallel leading to
build errors.
2017-11-02 00:10:06 +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
9fb347db24
Add generic macro for defining (custom) type checks
2017-11-01 15:19:28 +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
3c16d2beb8
Export determineTerminalSize() correctly
2017-10-30 22:34:10 +01:00
Martchus
fa39e2a1aa
Add traits to check for reserve() and size()
2017-10-27 18:25:32 +02:00
Martchus
60e4fead05
Deprecate FakeQtConfigArguments
2017-10-25 19:32:45 +02:00
Martchus
dab05bdade
Improve coding style in test utilities
2017-10-24 01:02:07 +02:00
Martchus
2203e0a335
Set dependencies of tidy target correctly
2017-10-24 01:01:29 +02:00
Martchus
a869aa8def
Do not add sources to header-only libs
2017-10-23 01:12:51 +02:00
Martchus
e393af5dbb
testutils: Print indices of iteratables (on assert equal fail)
2017-10-23 01:11:11 +02:00
Martchus
a0c6868e88
Add conversion methods: multiline str <=> array of lines
2017-10-23 01:09:59 +02:00
Martchus
d25265fee1
Don't add include path for config.h to header-only libs
...
This causes CMake errors and CMake is acutally right, it makes
no sense because the config header is only available during build
but a header-only lib is not being built.
2017-10-23 01:08:25 +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
cb02d5c733
Add target for building all tests
...
This allows to build all tests at once without
adding them to "all" target. In contrast to the
check target, the tests are not executed.
2017-10-19 16:20:49 +02:00
Martchus
ba620c5e0a
Apply clang-format
2017-10-19 01:07:38 +02:00
Martchus
46f652ad00
Improve readability of ArgumentReader::read and use Phrases
2017-10-19 00:51:47 +02:00
Martchus
e459dca98d
Merge pull request #8 from svnpenn/master
...
commandlineutils.cpp: correct rows and columns
2017-10-17 09:43:55 +02:00
Steven Penny
e07782ae16
commandlineutils.cpp: correct rows and columns
...
From here:
http://docs.microsoft.com/windows/console/coord-str
- X is columns
- Y is rows
currently that is reversed with the codebase
2017-10-16 18:04:35 -05:00
Martchus
9829dbe727
Make use of escape codes configurable
2017-10-17 00:00:46 +02:00
Martchus
6933b7b33e
argument parser: Add public accessor for callback
2017-10-16 23:46:21 +02:00
Martchus
4011040e57
Add Phrases::EndFlush
2017-10-09 20:43:18 +02:00
Martchus
f35124eff5
Document META_PUBLIC_*_LIB_DEPENDS
2017-10-08 20:27:09 +02:00
Martchus
ae249140bc
Use also actual lib name to check whether dependency is public
...
In accordance to 'Fix adding public Qt modules in pkg-config'
in qtutilities (b2e3506ff59ae4b610c91bd9ee96333871fa5864).
2017-10-08 20:24:48 +02:00
Martchus
472e0296d0
Fix adding public static lib dependencies
2017-10-08 19:42:55 +02:00
Martchus
cf09db8166
Export ostream &operator<<(std::ostream&,const Failure&failure)
2017-10-07 23:02:29 +02:00
Martchus
0b19d0b523
Export std::ostream&operator<<(std::ostream&,Phrases) correctly
2017-10-07 22:52:06 +02:00
Martchus
784f3d963a
Add 'makepkg'-style messages to Phrases
2017-09-30 19:16:43 +02:00
Martchus
ee66c56905
Improve documentation
2017-09-30 18:42:34 +02:00
Martchus
46bfbdd829
Allow initialization of values for shell completion in callback
...
Use case is implementing completion for syncthingctl also for
device and folder IDs.
2017-09-30 18:42:21 +02:00
Martchus
b7b218c831
Wrap strings which are likely long when printing help
...
to preserve indentation
2017-09-29 21:00:49 +02:00
Martchus
6e80640db5
Add method to determine terminal size
2017-09-29 20:56:50 +02:00
Martchus
027e784f1c
Only make extra newline before example for top-level args
2017-09-29 20:56:13 +02:00
Martchus
8750e385f1
Improve doc for ArgumentParser::parseArgs()/readArgs()
2017-09-29 17:15:39 +02:00
Martchus
2f5f197b95
Add ArgumentParser::parseArgsOrExit()
...
to reduce boilerplate code for error handling when
parsing CLI arguments.
2017-09-29 17:14:57 +02:00
Martchus
1c450d43a2
Add method to find specified operation
2017-09-26 16:46:17 +02:00
Martchus
a1d6c3ba7b
Make invokeCallbacks() static as no members used
2017-09-26 16:44:22 +02:00
Martchus
09efb1ff3e
Move phrases from tag editor to c++utilities
...
because they are also useful for syncthingctl
2017-09-26 15:23:23 +02:00
Martchus
37a84d64f1
Fix warnings about use of NULL in startConsole()
...
Can't fix warnings about old-style casts because those
macros are defined in windows headers.
2017-09-24 19:57:13 +02:00