• Thomas Haller's avatar
    tests: use NMTST_EXPECT*() macros · 25ade397
    Thomas Haller authored
    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.
    25ade397
Name
Last commit
Last update
..
tests Loading commit data...
COPYING Loading commit data...
NetworkManager.h Loading commit data...
NetworkManagerVPN.h Loading commit data...
crypto.c Loading commit data...
crypto.h Loading commit data...
crypto_gnutls.c Loading commit data...
crypto_nss.c Loading commit data...
libnm-util.pc.in Loading commit data...
libnm-util.ver Loading commit data...
meson.build Loading commit data...
nm-connection.c Loading commit data...
nm-connection.h Loading commit data...
nm-dbus-glib-types.h Loading commit data...
nm-gvaluearray-compat.h Loading commit data...
nm-param-spec-specialized.c Loading commit data...
nm-param-spec-specialized.h Loading commit data...
nm-setting-8021x.c Loading commit data...
nm-setting-8021x.h Loading commit data...
nm-setting-adsl.c Loading commit data...
nm-setting-adsl.h Loading commit data...
nm-setting-bluetooth.c Loading commit data...
nm-setting-bluetooth.h Loading commit data...
nm-setting-bond.c Loading commit data...
nm-setting-bond.h Loading commit data...
nm-setting-bridge-port.c Loading commit data...
nm-setting-bridge-port.h Loading commit data...
nm-setting-bridge.c Loading commit data...
nm-setting-bridge.h Loading commit data...
nm-setting-cdma.c Loading commit data...
nm-setting-cdma.h Loading commit data...
nm-setting-connection.c Loading commit data...
nm-setting-connection.h Loading commit data...
nm-setting-dcb.c Loading commit data...
nm-setting-dcb.h Loading commit data...
nm-setting-generic.c Loading commit data...
nm-setting-generic.h Loading commit data...
nm-setting-gsm.c Loading commit data...
nm-setting-gsm.h Loading commit data...
nm-setting-infiniband.c Loading commit data...
nm-setting-infiniband.h Loading commit data...
nm-setting-ip4-config.c Loading commit data...
nm-setting-ip4-config.h Loading commit data...
nm-setting-ip6-config.c Loading commit data...
nm-setting-ip6-config.h Loading commit data...
nm-setting-olpc-mesh.c Loading commit data...
nm-setting-olpc-mesh.h Loading commit data...
nm-setting-ppp.c Loading commit data...
nm-setting-ppp.h Loading commit data...
nm-setting-pppoe.c Loading commit data...
nm-setting-pppoe.h Loading commit data...
nm-setting-private.h Loading commit data...
nm-setting-serial.c Loading commit data...
nm-setting-serial.h Loading commit data...
nm-setting-team-port.c Loading commit data...
nm-setting-team-port.h Loading commit data...
nm-setting-team.c Loading commit data...
nm-setting-team.h Loading commit data...
nm-setting-template.c Loading commit data...
nm-setting-template.h Loading commit data...
nm-setting-vlan.c Loading commit data...
nm-setting-vlan.h Loading commit data...
nm-setting-vpn.c Loading commit data...
nm-setting-vpn.h Loading commit data...
nm-setting-wimax.c Loading commit data...
nm-setting-wimax.h Loading commit data...
nm-setting-wired.c Loading commit data...
nm-setting-wired.h Loading commit data...
nm-setting-wireless-security.c Loading commit data...
nm-setting-wireless-security.h Loading commit data...
nm-setting-wireless.c Loading commit data...
nm-setting-wireless.h Loading commit data...
nm-setting.c Loading commit data...
nm-setting.h Loading commit data...
nm-utils-enum-types.c.template Loading commit data...
nm-utils-enum-types.h.template Loading commit data...
nm-utils-private.h Loading commit data...
nm-utils.c Loading commit data...
nm-utils.h Loading commit data...
nm-value-transforms.c Loading commit data...
nm-version.h Loading commit data...