npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

rexo.c

v0.2.6

Published

Neat single-file cross-platform unit testing framework for C/C++; Christopher Crouzet (2018).

Downloads

37

Readme

Rexo

Rexo is a neat single-file cross-platform unit testing framework for C/C++.

It offers the same xUnit-like structure than most other unit testing frameworks but aims at providing a truly polished API.

Features

  • sleek: polished API with great attention to details.
  • easy: no learning curve, it's yet another framework based on xUnit with test suites, test cases, and fixtures.
  • convenient: automatic registration of tests.
  • granular: high level or low level API? You choose.
  • portable: compatible with C89 (ANSI C) and C++.
  • cross-platform: tested on Linux, macOS, and Windows.
  • simple: straightforward implementation—KISS all the things!
  • cascading configuration: configure a whole test suite at once and/or tweak specific options for each test case.
  • painless: deployment couldn't be easier—it all fits into a single header file and has no external dependencies.

But also...

  • fully standard compliant minus the optional automatic registration of tests that relies on a widespread compiler-specific feature.
  • designated initializer-like syntax to all C and C++ versions.

Roadmap

  • implement a command-line option parser (e.g.: for filtering test cases).
  • allow choosing the output format of the summary (e.g.: jUnit XML).
  • support more assertion macros (e.g.: array comparison, signal handling).
  • improve failure messages to be more visual (e.g.: an arrow pointing where strings differ).

Installation

Run:

$ npm i rexo.c

And then include rexo.h as follows:

// main.c
#include <rexo.h>

int main() { /* ... */ }

Finally, compile while adding the path node_modules/rexo.c to your compiler's include paths.

$ clang -I./node_modules/rexo.c main.c  # or, use gcc
$ gcc   -I./node_modules/rexo.c main.c

You may also use a simpler approach with the cpoach tool, which automatically adds the necessary include paths of all the installed dependencies for your project.

$ cpoach clang main.c  # or, use gcc
$ cpoach gcc   main.c

Usage

Minimal

#include <rexo.h>

RX_TEST_CASE(foo, bar)
{
    RX_INT_REQUIRE_EQUAL(2 * 3 * 7, 42);
}

int
main(int argc, const char **argv)
{
    return rx_main(0, NULL, argc, argv) == RX_SUCCESS ? 0 : 1;
}

Fixture

#include <rexo.h>

struct foo_data {
    const char *value;
};

RX_SET_UP(foo_set_up)
{
    struct foo_data *data;

    data = (struct foo_data *)RX_DATA;
    data->value = "world!";
    return RX_SUCCESS;
}

RX_FIXTURE(foo_fixture, struct foo_data, .set_up = foo_set_up);

RX_TEST_CASE(foo, bar, .fixture = foo_fixture)
{
    struct foo_data *data;

    data = (struct foo_data *)RX_DATA;
    RX_STR_REQUIRE_EQUAL("Hello", data->value);
}

int
main(int argc, const char **argv)
{
    return rx_main(0, NULL, argc, argv) == RX_SUCCESS ? 0 : 1;
}

Documentation

https://christophercrouzet.github.io/rexo

Repository

https://github.com/christophercrouzet/rexo

License

Unlicense.

SRC ORG