| 1 | //! @file main.cpp |
| 2 | //! @author ryftchen |
| 3 | //! @brief The definitions (main) in the test module. |
| 4 | //! @version 0.1.0 |
| 5 | //! @copyright Copyright (c) 2022-2025 ryftchen. All rights reserved. |
| 6 | |
| 7 | #include <gtest/gtest.h> |
| 8 | |
| 9 | //! @brief The test module. |
| 10 | namespace test |
| 11 | { |
| 12 | //! @brief The run function. |
| 13 | //! @param argc - argument count |
| 14 | //! @param argv - argument vector |
| 15 | //! @return 0 if successful, otherwise 1 |
| 16 | static int run(int argc, char* argv[]) |
| 17 | { |
| 18 | ::testing::InitGoogleTest(argc: &argc, argv); |
| 19 | return ::RUN_ALL_TESTS(); |
| 20 | } |
| 21 | } // namespace test |
| 22 | |
| 23 | //! @brief The main function of the unit test. |
| 24 | //! @param argc - argument count |
| 25 | //! @param argv - argument vector |
| 26 | //! @return the argument to the implicit call to exit() |
| 27 | int main(int argc, char* argv[]) |
| 28 | { |
| 29 | return test::run(argc, argv); |
| 30 | } |
| 31 | |