[A] Added c++ tests

This commit is contained in:
seleznevae
2018-07-25 22:37:10 +03:00
parent fb6d6c0acc
commit 9bce3f259c
7 changed files with 209 additions and 20 deletions

View File

@@ -2,20 +2,6 @@
#include <stdio.h>
#include "fort.h"
void run_test_suit(const char *test_suit_name, int n_tests, struct test_case test_suit[])
{
fprintf(stderr, " == RUNNING %s ==\n", test_suit_name);
fprintf(stderr, "[==========] Running %d test(s).\n", n_tests);
int i;
for (i = 0; i < n_tests; ++i) {
fprintf(stderr, "[ RUN ] %s\n", test_suit[i].name);
test_suit[i].test();
fprintf(stderr, "[ OK ] %s\n", test_suit[i].name);
}
fprintf(stderr, "[==========] %d test(s) run.\n", n_tests);
fprintf(stderr, "[ PASSED ] %d test(s).\n", n_tests);
}
#ifdef FORT_WB_TESTING_ENABLED
struct test_case wb_test_suit [] = {
{"test_vector_basic", test_vector_basic},