Deleted Added
sdiff udiff text old ( 10915:71ace17ccb3d ) new ( 11313:89fd4a775287 )
full compact
1/*
2 * Copyright (c) 2014-2015 ARM Limited
3 * All rights reserved
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *

--- 9 unchanged lines hidden (view full) ---

20#ifndef _TESTS_NOMALI_TEST_HELPERS_H
21#define _TESTS_NOMALI_TEST_HELPERS_H
22
23#include <libnomali/nomali.h>
24#include "test_helpers.h"
25
26#define E_NOMALI_BAIL(c) \
27 do { \
28 if ((error = (c)) != NOMALI_E_OK) { \
29 test_bail(# c " failed: %s (%i)", \
30 nomali_errstr(error), error); \
31 } \
32 } while (0)
33
34#define E_NOMALI_TEST(t, c) \
35 do { \
36 if ((error = (c)) != NOMALI_E_OK) { \
37 test_diag(# c " failed: %s (%i)", \
38 nomali_errstr(error), error); \
39 test_fail(t); \
40 } else { \
41 test_ok(t); \
42 } \
43 } while (0)
44
45
46#endif /* _TESTS_NOMALI_TEST_HELPERS_H */