Skip to content

Hypothesis errors are not propagated #27

Description

@echoumcp1
#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions