#include "hegel/hegel.h"
int main() {
hegel::hegel([]() {
using namespace hegel::generators;
auto n = integers<int>({.min_value = 0, .max_value = -1}).generate();
if (n < 0 || n > 100) {
throw std::runtime_error("out of bounds");
}
});
return 0;
}
The code above should return an InvalidArgument, but while the error is bubbling up, somewhere it is discarded altogether so the output appears as though the Hypothesis test found a bug but provided no counterexample.
The code above should return an InvalidArgument, but while the error is bubbling up, somewhere it is discarded altogether so the output appears as though the Hypothesis test found a bug but provided no counterexample.