Looking at the mettle test framework they have code like this:
#include <mettle.hpp>
using namespace mettle;
suite<> basic("a basic suite", [](auto &_) {
_.test("a test", []() {
expect(true, equal_to(true));
});
for(int i = 0; i < 4; i++) {
_.test("test number " + std::to_string(i), [i]() {
expect(i % 2, less(2));
});
}
subsuite<>(_, "a subsuite", [](auto &_) {
_.test("a sub-test", []() {
expect(true, equal_to(true));
});
});
});
Is there something special going on with the use of underscore or is it a valid variable name?