Overview


Goals


  • A small, behavior-driven, test library for C.
  • No extensions to the C-library
  • Extensible assertions

Functionality


  • An elegant syntax
  • A variety of default assertions
  • Signal Capturing
  • Extensible
  • Configurable Output Formats

Example


#include "awry/awry.h"

describe("Awry", awry_suite)
  it("is defined")
    expect(&Awry) to equal(&Awry)
  end
  
  context(".register_block")
    when("a block has not had any it blocks defined")
      it("creates a new array with 1 element")
        Awry.register_block(IT_TYPE, &Awry, "it block test");
        expect(Awry.current->it_blocks.size) to equal(1);
      end
    end
  end
end

int main() {
  Awry.run();
  int failures = Awry.failures;
  Awry.clear(&Awry); // optional, frees memory and clears the test suite
  return failures > 0 ? 1 : 0;
}

Output

describe Awry:
  ✔ it is defined
  context .register_block
    when a block has not had any it blocks defined
      ✔ it creates a new array with 1 element