Skip to content

Gtest SEH Exception #709

Description

@SimonEbner

Running the following test using GTest causes an SEH Exception for me using VS 2017 / gcc 5.4

TEST(foo, fail1)
{
    auto obj = json{ {"foo", "bar"} };
    ASSERT_THAT(obj, Eq(obj));
}

MATCHER(IsFooObject, "")
{
    return arg == json{ { "foo", "bar" } };
}

TEST(foo, fail2)
{
    auto obj = json{ { "foo", "bar" } };
    ASSERT_THAT(obj, IsFooObject());
}

These 'simpler' tests, however, work fine.

TEST(foo, success1)
{
    auto obj = json{ { "foo", "bar" } };
    ASSERT_EQ(obj, obj);
}

TEST(foo, success2)
{
    auto obj = json{ { "foo", "bar" } };
    ASSERT_TRUE(obj == obj);
}

I could not find any information on how to make json.hpp together with Gtest work. Is there a chance to make custom matchers (MATCHER_P) work?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions