In Range

The in_range assertion checks if the expected numeric value is greater than or equal to the lower bound, and less than or equal to the upper bound.


Example


#include "awry/awry.h"

describe("in_range assertion", test_range_assertion)
  it("can check if in range")
    expect(1) to be in_range(0,1)
  end

  it("can check if not in range")
    expect(5) to not be in_range(0,2)
  end
end

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