[network-manager-openvpn/th/ovpn-import-bgo761285] fixup! properties/tests: convert import/export testcases to g_assert()
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn/th/ovpn-import-bgo761285] fixup! properties/tests: convert import/export testcases to g_assert()
- Date: Tue, 9 Feb 2016 10:31:39 +0000 (UTC)
commit b230e2a880576ab4d6473ed0815bfb2039f26e9e
Author: Thomas Haller <thaller redhat com>
Date: Sun Feb 7 18:59:27 2016 +0100
fixup! properties/tests: convert import/export testcases to g_assert()
shared/nm-test-utils.h is copied from NetworkManager's master.
There should be no local changes to this (and other files in
shared/). Instead, we should update the shared files in NetworkManager's
master first, and then copy it to here.
In fact, due to that there is lots of unused code in shared/. But
that isn't really a problem. Seems to me that being close to the
original is more important.
shared/nm-test-utils.h | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/shared/nm-test-utils.h b/shared/nm-test-utils.h
index 3abe70b..b6bc332 100644
--- a/shared/nm-test-utils.h
+++ b/shared/nm-test-utils.h
@@ -1038,6 +1038,20 @@ _nmtst_assert_ip6_address (const char *file, int line, const struct in6_addr *ad
}
#define nmtst_assert_ip6_address(addr, str_expected) _nmtst_assert_ip6_address (__FILE__, __LINE__, addr,
str_expected)
+/* Deprecated: don't use this overly verbose macro. */
+#define FAIL(test_name, fmt, ...) \
+ G_STMT_START { \
+ g_error ("%s:%d: FAIL[%s]: " fmt, __FILE__, __LINE__, test_name, ## __VA_ARGS__); \
+ } G_STMT_END
+
+/* Deprecated: don't use this overly verbose macro. */
+#define ASSERT(x, test_name, fmt, ...) \
+ G_STMT_START { \
+ if (!(x)) { \
+ FAIL (test_name, fmt, ## __VA_ARGS__); \
+ } \
+ } G_STMT_END
+
#define nmtst_spawn_sync(working_directory, standard_out, standard_err, assert_exit_status, ...) \
__nmtst_spawn_sync (working_directory, standard_out, standard_err, assert_exit_status, ##__VA_ARGS__,
NULL)
inline static gint
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]