Releases: sunxfancy/zeroerr
Releases · sunxfancy/zeroerr
v.0.3.0
There are many new features in this version:
- support multiple log stream
- add lock free algorithm for log system
- get log data using message as ID
- log to multiple folders by date/category
- log data iterator
- add CHECK_THROWS
- fix bugs in log system/assertion
- improve unit testing report
- reduce warnings
v0.2.1
What's Changed
- Now seeds in fuzzer can be provided by user.
- A few bugs are fixed.
- BDD style macro is supported:
SCENARIO("vectors can be sized and resized") {
GIVEN("A vector with some items") {
std::vector<int> v(5);
REQUIRE(v.size() == 5);
REQUIRE(v.capacity() >= 5);
WHEN("the size is increased") {
v.resize(10);
THEN("the size and capacity change") {
CHECK(v.size() == 20);
CHECK(v.capacity() >= 10);
};
};
WHEN("the size is reduced") {
v.resize(0);
THEN("the size changes but not capacity") {
CHECK(v.size() == 0);
CHECK(v.capacity() >= 5);
};
};
WHEN("more capacity is reserved") {
v.reserve(10);
THEN("the capacity changes but not the size") {
CHECK(v.size() == 5);
CHECK(v.capacity() >= 10);
};
};
WHEN("less capacity is reserved") {
v.reserve(0);
THEN("neither size nor capacity are changed") {
CHECK(v.size() == 10);
CHECK(v.capacity() >= 5);
};
};
};
}
Full Changelog: v0.2.0...v0.2.1
v0.2.0
This version added a new feature to support libFuzzer. Now it can define domains and generate structured fuzzing input from it.
An example fuzz test case can be written like that:
FUZZ_TEST_CASE("fuzz_test") {
LOG("Run fuzz_test");
FUZZ_FUNC([=](int k, std::string num) {
int t = atoi(num.c_str());
LOG("k: {k}, num:{num}, t: {t}", k, num, t);
REQUIRE(k == t);
})
.WithDomains(InRange<int>(0, 10), Arbitrary<std::string>())
.WithSeeds({{5, "Foo"}, {10, "Bar"}})
.Run(10);
}