api: Fixed APIs exports. Fixes #145.
This commit is contained in:
parent
805005a5e8
commit
525f2e0ce0
7 changed files with 14 additions and 15 deletions
|
@ -111,8 +111,8 @@ CR_API int criterion_handle_args(int argc, char *argv[], bool handle_unknown_arg
|
|||
CR_API void criterion_register_test(struct criterion_test_set *tests,
|
||||
struct criterion_test *test);
|
||||
|
||||
extern const struct criterion_test *const criterion_current_test;
|
||||
extern const struct criterion_suite *const criterion_current_suite;
|
||||
CR_API extern const struct criterion_test *const criterion_current_test;
|
||||
CR_API extern const struct criterion_suite *const criterion_current_suite;
|
||||
|
||||
CR_END_C_API
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
# include <stdbool.h>
|
||||
# include "logging.h"
|
||||
# include "internal/common.h"
|
||||
|
||||
struct criterion_options {
|
||||
|
||||
|
@ -131,7 +132,7 @@ CR_BEGIN_C_API
|
|||
/**
|
||||
* The runtime options for the test runner.
|
||||
*/
|
||||
extern struct criterion_options criterion_options;
|
||||
CR_API extern struct criterion_options criterion_options;
|
||||
|
||||
CR_END_C_API
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ typedef void criterion_reporter(FILE *stream, struct criterion_global_stats *);
|
|||
* @returns 1 if no output provider is registered at that name, 0 otherwise,
|
||||
* and -1 on error.
|
||||
*/
|
||||
int criterion_register_output_provider(const char *name, criterion_reporter *reporter);
|
||||
CR_API int criterion_register_output_provider(const char *name, criterion_reporter *reporter);
|
||||
|
||||
/**
|
||||
* Use an output provider to write a report in a specific path.
|
||||
|
@ -49,6 +49,6 @@ int criterion_register_output_provider(const char *name, criterion_reporter *rep
|
|||
* @param[in] path The path to the file to write the report to.
|
||||
* @returns -1 on error.
|
||||
*/
|
||||
int criterion_add_output(const char *provider, const char *path);
|
||||
CR_API int criterion_add_output(const char *provider, const char *path);
|
||||
|
||||
#endif /* !CRITERION_OUTPUT_H_ */
|
||||
|
|
|
@ -51,8 +51,6 @@ enum criterion_language {
|
|||
CR_LANG_SIZE_ // leave this at the end
|
||||
};
|
||||
|
||||
extern const char *const cr_language_names[CR_LANG_SIZE_];
|
||||
|
||||
/**
|
||||
* Enumerates the supported kinds of tests
|
||||
*/
|
||||
|
|
|
@ -113,7 +113,7 @@ static void dtor_test_set(void *ptr, CR_UNUSED void *meta) {
|
|||
sfree(t->suites);
|
||||
}
|
||||
|
||||
void criterion_register_test(struct criterion_test_set *set,
|
||||
CR_API void criterion_register_test(struct criterion_test_set *set,
|
||||
struct criterion_test *test) {
|
||||
|
||||
struct criterion_suite_set css = {
|
||||
|
@ -163,8 +163,8 @@ struct criterion_test_set *criterion_init(void) {
|
|||
return set;
|
||||
}
|
||||
|
||||
const struct criterion_test *criterion_current_test;
|
||||
const struct criterion_suite *criterion_current_suite;
|
||||
CR_API const struct criterion_test *criterion_current_test;
|
||||
CR_API const struct criterion_suite *criterion_current_suite;
|
||||
|
||||
void run_test_child(struct criterion_test *test,
|
||||
struct criterion_suite *suite) {
|
||||
|
@ -243,7 +243,7 @@ void disable_unmatching(struct criterion_test_set *set) {
|
|||
free_pattern();
|
||||
}
|
||||
|
||||
struct criterion_test_set *criterion_initialize(void) {
|
||||
CR_API struct criterion_test_set *criterion_initialize(void) {
|
||||
init_i18n();
|
||||
|
||||
#ifndef ENABLE_VALGRIND_ERRORS
|
||||
|
@ -266,7 +266,7 @@ struct criterion_test_set *criterion_initialize(void) {
|
|||
return criterion_init();
|
||||
}
|
||||
|
||||
void criterion_finalize(struct criterion_test_set *set) {
|
||||
CR_API void criterion_finalize(struct criterion_test_set *set) {
|
||||
sfree(set);
|
||||
|
||||
#ifndef ENABLE_VALGRIND_ERRORS
|
||||
|
@ -415,7 +415,7 @@ cleanup:
|
|||
return result;
|
||||
}
|
||||
|
||||
int criterion_run_all_tests(struct criterion_test_set *set) {
|
||||
CR_API int criterion_run_all_tests(struct criterion_test_set *set) {
|
||||
if (criterion_options.pattern) {
|
||||
disable_unmatching(set);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
# include "criterion/options.h"
|
||||
|
||||
struct criterion_options criterion_options = {
|
||||
CR_API struct criterion_options criterion_options = {
|
||||
.logging_threshold = CRITERION_IMPORTANT,
|
||||
.logger = &normal_logging,
|
||||
.measure_time = true,
|
||||
|
|
|
@ -130,7 +130,7 @@ int atou(const char *str) {
|
|||
return res < 0 ? 0 : res;
|
||||
}
|
||||
|
||||
int criterion_handle_args(int argc, char *argv[], bool handle_unknown_arg) {
|
||||
CR_API int criterion_handle_args(int argc, char *argv[], bool handle_unknown_arg) {
|
||||
static struct option opts[] = {
|
||||
{"verbose", optional_argument, 0, 'b'},
|
||||
{"quiet", no_argument, 0, 'q'},
|
||||
|
|
Loading…
Add table
Reference in a new issue