CCTests, testing framwork for the C language

Overview

This package installs a C11 language library; it implements a simple testing framework for C11 language code. The library targets posix systems.

The package depends upon the external package CCExceptions, and relies on pkg-config to find it installed on the system.

The package makes use of the gnu Autotools and it is tested, using Travis CI, on both Ubuntu gnu+Linux systems and OS X systems.

This project is still in the development phase; the project is hosted at Github.

Introduction

A test suite written under CCTests is meant to be a collection of C11 language programs, preferable build using the gnu Autotools. Each test program must be linked with the CCTests library and the CCExceptions library.

A test program should look like this:<p>

#include <cctests.h>

cctests_fun_t   test_1_1;
cctests_fun_t   test_1_2;
cctests_fun_t   test_2_1;
cctests_fun_t   test_2_2;

int
main (void)
{
  cctests_init("demo");
  {
    cctests_begin_group("one");
    {
      cctests_run(test_1_1);
      cctests_run(test_1_2);
    }
    cctests_end_group();

    cctests_begin_group("two");
    {
      cctests_run(test_2_1);
      cctests_run(test_2_2);
    }
    cctests_end_group();
  }
  cctests_final();
}

void test_1_1 (cce_destination_t L) { ... }
void test_1_2 (cce_destination_t L) { ... }
void test_2_1 (cce_destination_t L) { ... }
void test_2_2 (cce_destination_t L) { ... }

License

CCTests is free software: you can redistribute it and/or modify it under the terms of the gnu Lesser General Public License, either version 3 of the License, or (at your option) any later version.

Reporting errors and vulnerabilities

Error and vulnerability reports are appreciated, all the vulnerability reports are public; register them using the Issue Tracker at the project’s GitHub site. For contributions and patches please use the Pull Requests feature at the project’s GitHub site.

Contributions

Contributions are welcome. For contributions and patches please use the Pull Requests feature at the project’s GitHub site. Code must come in standard C11 language; there are no strict coding conventions. The hierarchy of built-in condition objects can be augmented following the same coding practices already used in the library.