main (int argc, char **argv)
{
GError *error = NULL;
+ gboolean success;
int ret;
nmtst_init (&argc, &argv, TRUE);
- if (!crypto_init (&error))
- FAIL ("crypto-init", "failed to initialize crypto: %s", error->message);
+ success = crypto_init (&error);
+ g_assert_no_error (error);
+ g_assert (success);
g_test_add_data_func ("/libnm/crypto/cert/pem",
"test_ca_cert.pem",
main (int argc, char **argv)
{
GError *error = NULL;
+ gboolean success;
nmtst_init (&argc, &argv, TRUE);
- if (!crypto_init (&error))
- FAIL ("crypto-init", "failed to initialize crypto: %s", error->message);
+ success = crypto_init (&error);
+ g_assert_no_error (error);
+ g_assert (success);
g_test_add_data_func ("/libnm/crypto/cert/pem",
"test_ca_cert.pem",
int main (int argc, char **argv)
{
GError *error = NULL;
+ gboolean success;
nmtst_init (&argc, &argv, TRUE);
- if (!nm_utils_init (&error))
- FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message);
+ success = nm_utils_init (&error);
+ g_assert_no_error (error);
+ g_assert (success);
/* The tests */
g_test_add_func ("/libnm/need_tls_secrets_path", test_need_tls_secrets_path);
}
#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_error ("%s:%d: FAIL[%s]: " fmt, __FILE__, __LINE__, test_name, ## __VA_ARGS__); \
} \
} G_STMT_END