blob: bf30a35724eff90c1c31d015b710470b852a7def (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/* Copyright 2023 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/**
* @file
* @brief Tests that want to utilize googletest should include this header file.
*
* There's no need to include the googletest header files directly.
*/
#ifndef __CROS_EC_TEST_EC_GTEST_H
#define __CROS_EC_TEST_EC_GTEST_H
#include <gtest/gtest.h>
static inline void run_all_googletest_tests()
{
testing::InitGoogleTest();
int ret = RUN_ALL_TESTS();
if (ret == 0)
printf("Pass!\n");
else
printf("Fail!\n");
}
extern "C" void run_test(int, const char **)
{
run_all_googletest_tests();
}
#endif /* __CROS_EC_TEST_EC_GTEST_H */
|