bootstrap/test/runner.c

38 lines
1.1 KiB
C
Raw Normal View History

2023-11-23 11:09:32 +00:00
#include "sput.h"
#include "test_config.h"
2023-11-23 14:40:17 +00:00
#include "test_dyn_array.h"
2023-11-24 16:09:18 +00:00
#include "test_parser.h"
#include "test_path.h"
2023-11-24 17:27:44 +00:00
#include "test_validator.h"
2023-11-23 11:09:32 +00:00
int main(int argc, char *argv[]) {
sput_start_testing();
2023-11-23 14:40:17 +00:00
sput_enter_suite("config");
sput_run_test(test_config_load_invalid_args);
sput_run_test(test_config_load_spec_not_found);
sput_run_test(test_config_load_spec_not_dir);
2023-11-23 14:40:17 +00:00
sput_run_test(test_config_load_success);
sput_enter_suite("dyn_array");
sput_run_test(test_dyn_array_zero_capacity);
2023-11-23 14:40:17 +00:00
sput_run_test(test_dyn_array_nonzero_capacity);
2023-11-23 11:09:32 +00:00
sput_enter_suite("path");
sput_run_test(test_join_path_single_segments);
sput_run_test(test_join_path_multiple_segments);
2023-11-24 16:09:18 +00:00
sput_enter_suite("parser");
sput_run_test(test_parse_spec_json_missing);
sput_run_test(test_parse_spec_json_minimal);
sput_run_test(test_parse_spec_json_invalid);
2023-11-24 17:27:44 +00:00
sput_enter_suite("validator");
sput_run_test(test_validate_spec_json_not_toplevel_object);
2023-11-24 19:23:52 +00:00
sput_run_test(test_validate_spec_json_invalid_value_type);
2023-11-24 17:27:44 +00:00
2023-11-23 11:09:32 +00:00
sput_finish_testing();
return sput_get_return_value();
}