include/test_util.h: Format with clang-format
BRANCH=none
TEST=none
#define TEST_ASSERT(n) \
do { \
if (!(n)) { \
- ccprintf("%s:%d: ASSERTION failed: %s\n", \
- __FILE__, __LINE__, #n); \
+ ccprintf("%s:%d: ASSERTION failed: %s\n", __FILE__, \
+ __LINE__, #n); \
task_dump_trace(); \
return EC_ERROR_UNKNOWN; \
} \
if (!(_a op _b)) { \
ccprintf("%s:%d: ASSERTION failed: %s " #op " %s\n", \
__FILE__, __LINE__, #a, #b); \
- ccprintf("\t\tEVAL: " fmt " " #op " " fmt "\n", \
- _a, _b); \
+ ccprintf("\t\tEVAL: " fmt " " #op " " fmt "\n", _a, \
+ _b); \
task_dump_trace(); \
return EC_ERROR_UNKNOWN; \
} else { \
if ((s)[__i] != (d)[__i]) { \
ccprintf("%s:%d: ASSERT_ARRAY_EQ failed at " \
"index=%d: %d != %d\n", \
- __FILE__, __LINE__, \
- __i, (int)(s)[__i], (int)(d)[__i]); \
+ __FILE__, __LINE__, __i, \
+ (int)(s)[__i], (int)(d)[__i]); \
task_dump_trace(); \
return EC_ERROR_UNKNOWN; \
} \
if ((d)[__i] != (c)) { \
ccprintf("%s:%d: ASSERT_MEMSET failed at " \
"index=%d: %d != %d\n", \
- __FILE__, __LINE__, \
- __i, (int)(d)[__i], (c)); \
+ __FILE__, __LINE__, __i, \
+ (int)(d)[__i], (c)); \
task_dump_trace(); \
return EC_ERROR_UNKNOWN; \
} \
@@ -195,8 +195,12 @@ void interrupt_generator_udelay(unsigned us);
void wait_for_task_started(void);
void wait_for_task_started_nosleep(void);
#else
-static inline void wait_for_task_started(void) { }
-static inline void wait_for_task_started_nosleep(void) { }
+static inline void wait_for_task_started(void)
+{
+}
+static inline void wait_for_task_started_nosleep(void)
+{
+}
#endif
uint32_t prng(uint32_t seed);
@@ -271,8 +275,8 @@ struct test_i2c_read_string_dev {
struct test_i2c_xfer {
/* I2C xfer handler */
int (*routine)(const int port, const uint16_t i2c_addr_flags,
- const uint8_t *out, int out_size,
- uint8_t *in, int in_size, int flags);
+ const uint8_t *out, int out_size, uint8_t *in,
+ int in_size, int flags);
};
struct test_i2c_write_dev {
@@ -292,9 +296,8 @@ struct test_i2c_write_dev {
*/
#define DECLARE_TEST_I2C_XFER(routine) \
const struct test_i2c_xfer __no_sanitize_address \
- __test_i2c_xfer_##routine \
- __attribute__((section(".rodata.test_i2c.xfer"))) \
- = {routine}
+ __test_i2c_xfer_##routine __attribute__(( \
+ section(".rodata.test_i2c.xfer"))) = { routine }
/*
* Detach an I2C device. Once detached, any read/write command regarding the
