summaryrefslogtreecommitdiff
path: root/src/settings/plugins/keyfile/tests/test-keyfile.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-09-24 09:12:46 -0400
committerDan Winship <danw@gnome.org>2014-09-30 10:11:15 -0400
commite4a828c97cbad5efa4aea8f61d1c2b7a52a6bb2f (patch)
tree647676affa5ab778099107d49a5f0c5a118338db /src/settings/plugins/keyfile/tests/test-keyfile.c
parent0853faae4390e4068d7355aacf346544e7668df9 (diff)
downloadNetworkManager-danw/libnm-enum.tar.gz
libnm-core: make NMSettingSerial:parity an enumdanw/libnm-enum
NMSettingSerial:parity was defined as a char-typed property that could have the (case-sensitive!) values 'n', 'E', or 'o'. This is zany. Add an NMSettingSerialParity enum, and use that instead.
Diffstat (limited to 'src/settings/plugins/keyfile/tests/test-keyfile.c')
-rw-r--r--src/settings/plugins/keyfile/tests/test-keyfile.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/settings/plugins/keyfile/tests/test-keyfile.c b/src/settings/plugins/keyfile/tests/test-keyfile.c
index 5fbea1204b..ab705503bb 100644
--- a/src/settings/plugins/keyfile/tests/test-keyfile.c
+++ b/src/settings/plugins/keyfile/tests/test-keyfile.c
@@ -1724,6 +1724,7 @@ test_read_bt_dun_connection (void)
const char *bdaddr;
const guint8 expected_bdaddr[ETH_ALEN] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 };
const char *tmp;
+ NMSettingSerialParity parity;
const char *expected_id = "AT&T Data Connect BT";
const char *expected_uuid = "089130ab-ce28-46e4-ad77-d44869b03d19";
const char *expected_apn = "ISP.CINGULAR";
@@ -1860,6 +1861,13 @@ test_read_bt_dun_connection (void)
TEST_BT_DUN_FILE,
NM_SETTING_SERIAL_SETTING_NAME);
+ parity = nm_setting_serial_get_parity (s_serial);
+ ASSERT (parity == NM_SETTING_SERIAL_PARITY_ODD,
+ "connection-verify-serial", "failed to verify %s: unexpected %s / %s key value",
+ TEST_BT_DUN_FILE,
+ NM_SETTING_SERIAL_SETTING_NAME,
+ NM_SETTING_SERIAL_PARITY);
+
g_object_unref (connection);
}
@@ -1965,6 +1973,7 @@ test_read_gsm_connection (void)
NMSettingBluetooth *s_bluetooth;
GError *error = NULL;
const char *tmp;
+ NMSettingSerialParity parity;
const char *expected_id = "AT&T Data Connect";
const char *expected_apn = "ISP.CINGULAR";
const char *expected_username = "ISP@CINGULARGPRS.COM";
@@ -2102,6 +2111,13 @@ test_read_gsm_connection (void)
TEST_GSM_FILE,
NM_SETTING_SERIAL_SETTING_NAME);
+ parity = nm_setting_serial_get_parity (s_serial);
+ ASSERT (parity == NM_SETTING_SERIAL_PARITY_ODD,
+ "connection-verify-serial", "failed to verify %s: unexpected %s / %s key value",
+ TEST_GSM_FILE,
+ NM_SETTING_SERIAL_SETTING_NAME,
+ NM_SETTING_SERIAL_PARITY);
+
g_object_unref (connection);
}