LCOV - code coverage report
Current view: top level - lib/kunit - try-catch-impl.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 3 3 100.0 %
Date: 2023-04-06 08:38:28 Functions: 0 0 -

          Line data    Source code
       1             : /* SPDX-License-Identifier: GPL-2.0 */
       2             : /*
       3             :  * Internal kunit try catch implementation to be shared with tests.
       4             :  *
       5             :  * Copyright (C) 2019, Google LLC.
       6             :  * Author: Brendan Higgins <brendanhiggins@google.com>
       7             :  */
       8             : 
       9             : #ifndef _KUNIT_TRY_CATCH_IMPL_H
      10             : #define _KUNIT_TRY_CATCH_IMPL_H
      11             : 
      12             : #include <kunit/try-catch.h>
      13             : #include <linux/types.h>
      14             : 
      15             : struct kunit;
      16             : 
      17             : static inline void kunit_try_catch_init(struct kunit_try_catch *try_catch,
      18             :                                         struct kunit *test,
      19             :                                         kunit_try_catch_func_t try,
      20             :                                         kunit_try_catch_func_t catch)
      21             : {
      22         333 :         try_catch->test = test;
      23         333 :         try_catch->try = try;
      24         333 :         try_catch->catch = catch;
      25             : }
      26             : 
      27             : #endif /* _KUNIT_TRY_CATCH_IMPL_H */

Generated by: LCOV version 1.14