NetworkManager/libnm-core/tests
Thomas Haller 25ade39752 tests: use NMTST_EXPECT*() macros
Tests are commonly created via copy&paste. Hence, it's
better to express a certain concept explicitly via a function
or macro. This way, the implementation of the concept can be
adjusted at one place, without requiring to change all the callers.

Also, the macro is shorter, and brevity is better for tests
so it's easier to understand what the test does. Without being
bothered by noise from the redundant information.

Also, the macro knows better which message to expect. For example,
messages inside "src" are prepended by nm-logging.c with a level
and a timestamp. The expect macro is aware of that and tests for it

  #define NMTST_EXPECT_NM_ERROR(msg)      NMTST_EXPECT_NM (G_LOG_LEVEL_MESSAGE, "*<error> [*] "msg)

This again allows the caller to ignore this prefix, but still assert
more strictly.
2018-01-08 12:38:54 +01:00
..
certs keyfile: support writing certificates as blob inside the keyfile 2015-03-12 18:16:58 +01:00
meson.build build: refine the NETWORKMANAGER_COMPILATION define 2018-01-08 12:38:53 +01:00
nm-core-tests-enum-types.c.template build: use template files for enum types' sources generation 2017-12-18 11:25:06 +01:00
nm-core-tests-enum-types.h.template build: use template files for enum types' sources generation 2017-12-18 11:25:06 +01:00
test-compare.c shared: move shared files to subdirectory "shared/nm-utils/" 2016-06-16 10:45:53 +02:00
test-crypto.c crypto: don't try to decrypt PKCS#8 key if no password is supplied 2016-09-23 18:05:54 +02:00
test-general-enums.h utils: support unknown numeric values in nm_utils_enum_to_str() and nm_utils_enum_from_str() 2017-02-20 13:45:32 +01:00
test-general.c tests: use NMTST_EXPECT*() macros 2018-01-08 12:38:54 +01:00
test-keyfile.c Revert "Makefile: rework team compilation flags" 2017-12-08 09:07:30 +01:00
test-secrets.c tests: use NMTST_EXPECT*() macros 2018-01-08 12:38:54 +01:00
test-setting.c tests: use NMTST_EXPECT*() macros 2018-01-08 12:38:54 +01:00
test-settings-defaults.c shared: move shared files to subdirectory "shared/nm-utils/" 2016-06-16 10:45:53 +02:00