Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix verilog_treebuilder_utils_test on Windows #786

Merged

Conversation

corco
Copy link
Collaborator

@corco corco commented Apr 22, 2021

The WrongClose test was failing on Windows with

external/com_google_googletest/googletest/src/gtest-port.cc(865): error: Failed
Syntax error at index 0 in simple regular expression "}": '}' is unsupported.
Stack trace:
  00007FF780051A8F: testing::internal::RE::Init
  00007FF78002BC9F: testing::internal::RE::RE
  00007FF78002BAAC: testing::ContainsRegex<const char *>
  00007FF78002B72C: testing::internal::MakeDeathTestMatcher
  00007FF780023CF7: verilog::`anonymous namespace'::MakeParenGroupTest_WrongClose_Test::TestBody
  00007FF78009B000: testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void>
  00007FF780085E3F: testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void>
  00007FF78006C8B9: testing::Test::Run
  00007FF78006D58C: testing::TestInfo::Run
  00007FF78006DF09: testing::TestSuite::Run
... Google Test internal frames ...

Running main() from gmock_main.cc
verilog/CST/verilog_treebuilder_utils_test.cc(55): error: Death test: MakeParenGroup(Leaf('(', "("), Leaf(1, "1"), Leaf('}', "}"))
    Result: died but not with expected error.
  Expected: contains regular expression "}"

Escaping the } fixes the issue. Note that this error is the same as if line 50 is not escaped. I could not figure out why the test passed on Linux, but now it passes on every platform.

@googlebot googlebot added the cla: yes All contributors in pull request have signed the CLA with Google. label Apr 22, 2021
@hzeller hzeller merged commit 8fb92a3 into chipsalliance:master Apr 22, 2021
@hzeller
Copy link
Collaborator

hzeller commented Apr 22, 2021

Interesting find!
Thanks, merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes All contributors in pull request have signed the CLA with Google.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants