It

It constructs contain the assertion for the current test scenario. They can be scoped to any construct.


it(char* description)

The it construct takes in the description of an assertion to reflect what is being tested.


Output

describe My Test Suite:
  context .add_two_ints
    it returns the sum of two numbers
    when the sum overflows
      it returns 0
        ...

Example


#include "awry/awry.h"

describe("it construct", test_it_construct)
  it("can run in the describe context")
    expect(1) to equal(1)
  end

  context("within a context block")
    it("can run")
      expect(1) to equal(1)
    end    
  end

  given("an assertion is in a given block")
    it("can run")
      expect(1) to equal(1)
    end
  end

  when("an it block is defined inside a when construct")
    it("can run")
      expect(1) to equal(1)
    end

    and("an and construct is included")
      it("can run")
        expect(1) to equal(1)
      end
    end
  end
end

int main(void) {
  Awry.run();
  Awry.clear(&Awry);
  return 0;
}