NetworkManager/libnm-util/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
..
meson.build build: refine the NETWORKMANAGER_COMPILATION define 2018-01-08 12:38:53 +01: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.c tests: use NMTST_EXPECT*() macros 2018-01-08 12:38:54 +01:00
test-libnm-linking.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
test-secrets.c shared: move shared files to subdirectory "shared/nm-utils/" 2016-06-16 10:45:53 +02:00
test-setting-8021x.c shared: move shared files to subdirectory "shared/nm-utils/" 2016-06-16 10:45:53 +02:00
test-setting-dcb.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