Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit a0aafa6

Browse files
committed
ogre_log test: ignore GLX extension line
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
1 parent 4ff6570 commit a0aafa6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/integration/ogre_log.cc

+11
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,17 @@ TEST_F(OgreLog, LogError)
6565
if (line.find(" GL_EXTENSIONS =") < 12)
6666
continue;
6767

68+
// A GLX extension may have the word "error" in its name. For example:
69+
// GLX_ARB_create_context_no_error.
70+
// We will skip the line that lists all the extensions. This line starts
71+
// with a date, so we just check that "Supported GLX extensions:" is
72+
// toward the beginning.
73+
// False positive cppcheck
74+
// https://sourceforge.net/p/cppcheck/discussion/general/thread/0c113d65/
75+
// cppcheck-suppress stlIfStrFind
76+
if (line.find(" Supported GLX extensions: ") < 12)
77+
continue;
78+
6879
EXPECT_EQ(line.find("Error"), std::string::npos) << line;
6980
EXPECT_EQ(line.find("error"), std::string::npos) << line;
7081
EXPECT_EQ(line.find("ERROR"), std::string::npos) << line;

0 commit comments

Comments
 (0)