]>
git.ipfire.org Git - people/ms/u-boot.git/blob - test/ut.c
2 * Simple unit test library
4 * Copyright (c) 2013 Google, Inc
6 * SPDX-License-Identifier: GPL-2.0+
10 #include <test/test.h>
13 DECLARE_GLOBAL_DATA_PTR
;
15 void ut_fail(struct unit_test_state
*uts
, const char *fname
, int line
,
16 const char *func
, const char *cond
)
18 gd
->flags
&= ~(GD_FLG_SILENT
| GD_FLG_RECORD
);
19 printf("%s:%d, %s(): %s\n", fname
, line
, func
, cond
);
23 void ut_failf(struct unit_test_state
*uts
, const char *fname
, int line
,
24 const char *func
, const char *cond
, const char *fmt
, ...)
28 gd
->flags
&= ~(GD_FLG_SILENT
| GD_FLG_RECORD
);
29 printf("%s:%d, %s(): %s: ", fname
, line
, func
, cond
);