#include "spec.hpp" #include #include int main (int argc, char * argv[]) { int v = 10; spec::spec variable = spec::value(v); variable.should.equal(10); variable.should.not_equal(11); variable.should.be_less_than(11); variable.should.be_more_than(9); variable.should.be_between(5).and(15); try { spec::value(v).should.equal(11); } catch (std::exception & e) { std::cerr << e.what() << '\n'; }; try { spec::value(v).should.not_equal(10); } catch (std::exception & e) { std::cerr << e.what() << '\n'; }; try { spec::value(v).should.be_between(20).and(25); } catch (std::exception & e) { std::cerr << e.what() << '\n'; }; try { spec::value(v).should.be_between(0).and(1); } catch (std::exception & e) { std::cerr << e.what() << '\n'; }; return 0; };