From f5ed7880b0404bdbf4ac5f370bcd88e14f377694 Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 1 Dec 2021 23:19:20 +0100 Subject: [PATCH] Fix defines proxy not being able to process parameters with underscores --- src/Parser/Parsing/Impl/DefinesStreamProxy.cpp | 2 +- .../Parsing/Impl/DefinesStreamProxyTests.cpp | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/Parser/Parsing/Impl/DefinesStreamProxy.cpp b/src/Parser/Parsing/Impl/DefinesStreamProxy.cpp index f0926825..3bbcabc1 100644 --- a/src/Parser/Parsing/Impl/DefinesStreamProxy.cpp +++ b/src/Parser/Parsing/Impl/DefinesStreamProxy.cpp @@ -70,7 +70,7 @@ void DefinesStreamProxy::Define::IdentifyParameters(const std::vector lines + { + "#define test(test_parameter) this is test_parameter", + "Apparently test(a very cool text);" + }; + + MockParserLineStream mockStream(lines); + DefinesStreamProxy proxy(&mockStream); + + ExpectLine(&proxy, 1, ""); + ExpectLine(&proxy, 2, "Apparently this is a very cool text;"); + + REQUIRE(proxy.Eof()); + } + TEST_CASE("DefinesStreamProxy: Ensure simple if is working with truthy value", "[parsing][parsingstream]") { const std::vector lines