-
Make an awesome C project.
-
Put
tim.h
andtim.c
to your project. -
Write some tim-tests in files that end with
_test.c
.
TIM_TEST(cool_stuff) {
TIM_ASSERT_EQ(true, false);
TIM_SUCCESS();
}
-
Create a
CMakeLists.txt
in the project root. -
Write some cmake stuff. (Don't forget to add
tim.c
to your sources)
if (DEFINED TIM_TEST_BUILD)
add_library(my_awesome_lib SHARED foo_test.c bar_test.c tim.c)
# These will hopefully won't be necessary in the future :)
set_target_properties(rtw PROPERTIES PREFIX "")
set_target_properties(rtw PROPERTIES SUFFIX "")
set_target_properties(rtw PROPERTIES OUTPUT_NAME "tim-test-lib")
endif()
- Run TIM.
tim -p /path/to/my/project
tim
is not yet published to crates.io. So it is necessary to clone the repository.
git clone https://github.com/aeryz/tim
cargo install --path /path/to/tim
Build System | Supported |
---|---|
CMake | ✔️ |
Premake | ✖️ 🔜 ✔️ |
Make | ✖️ 🔜 ✔️ |