1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Internal kunit try catch implementation to be shared with tests.
5 * Copyright (C) 2019, Google LLC.
6 * Author: Brendan Higgins <brendanhiggins@google.com>
9 #ifndef _KUNIT_TRY_CATCH_IMPL_H
10 #define _KUNIT_TRY_CATCH_IMPL_H
12 #include <kunit/try-catch.h>
13 #include <linux/types.h>
17 static inline void kunit_try_catch_init(struct kunit_try_catch *try_catch,
19 kunit_try_catch_func_t try,
20 kunit_try_catch_func_t catch)
22 try_catch->test = test;
24 try_catch->catch = catch;
27 #endif /* _KUNIT_TRY_CATCH_IMPL_H */