Skip to content

REQUIRE fails to print user defined message on error. #2

@takev

Description

@takev

The following test failed, but did not print the result.error() message.

TEST_CASE(color_rgb_test) {
        auto result = hi::parse_style("foreground-color=rgb(1.0, 2.0, 3.0) background-color = rgba(2.0,3, 4.0, 0.5)");
        REQUIRE(result.has_value(), result.error());
        auto [attributes, path_segment] = *result;
        REQUIRE(attributes.foreground_color() == hi::color(1.0, 2.0, 3.0, 1.0));
        REQUIRE(attributes.background_color() == hi::color(2.0, 3.0, 4.0, 0.5));
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions