You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 17, 2019. It is now read-only.
The documentation for CookBook.md contains the following phrase:
EXPECT_THAT(Bar(), MatchesRegex("Line \\d+"));
This phrase is misleading on linux because \d metacharacter (for digit) is not supported on linux (just tested on my latest Mint linux). The same applies to advanced.md file which also mentions \d+ a few times.
Consider adding a unit test that would verify if they are really supported or change the documentation to match reality.
Additional comment: I lost a few hours today chasing up why the matcher does not work. Even if it does not work when using the correct syntax I find this library very, very use full. Thank you for any ones effort in its creation.
The text was updated successfully, but these errors were encountered:
TEST(Matcher, general)
{
EXPECT_THAT("1", MatchesRegex("\\d")); // <- this line is failing
EXPECT_THAT("1", MatchesRegex("[0-9]"));
}
Result:
00:37:12: Debugging starts
Note: Google Test filter = Matcher*
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from Matcher
[ RUN ] Matcher.general
/home/radek/Projects/super-hat/test/src/model/streaminglivedata/streaminglivedataformatter_test.cpp:76: Failure
Value of: "1"
Expected: matches regular expression "\\d"
Actual: "1" (of type char [2])
[ FAILED ] Matcher.general (0 ms)
[----------] 1 test from Matcher (0 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (0 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] Matcher.general
1 FAILED TEST
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The documentation for CookBook.md contains the following phrase:
This phrase is misleading on linux because \d metacharacter (for digit) is not supported on linux (just tested on my latest Mint linux). The same applies to advanced.md file which also mentions \d+ a few times.
Consider adding a unit test that would verify if they are really supported or change the documentation to match reality.
Additional comment: I lost a few hours today chasing up why the matcher does not work. Even if it does not work when using the correct syntax I find this library very, very use full. Thank you for any ones effort in its creation.
The text was updated successfully, but these errors were encountered: