NetworkManager/src/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
..
config tests: use NMTST_EXPECT*() macros 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-dcb.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
test-general-with-expect.c tests: use NMTST_EXPECT*() macros 2018-01-08 12:38:54 +01:00
test-general.c all: get rid of a handful of unused-but-set variables 2017-12-18 13:29:32 +01:00
test-ip4-config.c core: use NM_CONSTCAST() for NM_IP_CONFIG_CAST() 2017-11-13 11:35:44 +01:00
test-ip6-config.c core: add nm_ipX_config_clone() 2017-12-06 09:53:18 +01:00
test-resolvconf-capture.c core: refactor parsing resolve.conf 2017-10-09 22:05:35 +02:00
test-secret-agent.py python: make test-secret-agent.py python3 ready 2016-12-14 19:00:42 +01:00
test-systemd.c systemd: merge branch systemd into master 2017-09-21 15:33:32 +02:00
test-utils.c core: add assertions for network_id/stable_type 2017-01-09 14:50:33 +01:00
test-wired-defname.c build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00