#include "test/lib/common.hpp"
#include "test/lib/env.hpp"
+#include "libmemcached/common.h"
+#include "test/fixtures/parser.hpp"
+
TEST_CASE("memcached_parser") {
SECTION("fail: null string") {
REQUIRE_FALSE(memcached(nullptr, 123));
REQUIRE_FALSE(memcached(nullptr, 0));
}
}
+
+ SECTION("fixtures") {
+ for (const auto &test : tests) {
+ DYNAMIC_SECTION(test.name) {
+ for (size_t i = 0; i < test.ntests; ++i) {
+ auto &tc = test.tests[i];
+ DYNAMIC_SECTION(tc.option.c_str) {
+ MemcachedPtr memc(memcached(tc.option.c_str, tc.option.size));
+ test.check(*memc, tc.result);
+ }
+ }
+ }
+ }
+ }
}