Adam Snaider | c8b7e75 | 2023-09-14 14:27:53 -0700 | [diff] [blame^] | 1 | use aos_init::init; |
| 2 | |
| 3 | autocxx::include_cpp! ( |
| 4 | #include "aos/testing/tmpdir.h" |
| 5 | |
| 6 | safety!(unsafe) |
| 7 | |
| 8 | generate!("aos::testing::SetTestShmBase") |
| 9 | ); |
| 10 | |
| 11 | // TODO(Brian): Should we provide a proc macro attribute that handles calling this? |
| 12 | /// Initializes things for a test. |
| 13 | /// |
| 14 | /// # Panics |
| 15 | /// |
| 16 | /// Panics if non-test initialization has already been performed. |
| 17 | pub fn test_init() { |
| 18 | init(); |
| 19 | ffi::aos::testing::SetTestShmBase(); |
| 20 | // TODO(Brian): Do we want any of the other stuff that `:gtest_main` has? |
| 21 | } |