-
Notifications
You must be signed in to change notification settings - Fork 447
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
lib: Add P4::warningCount() and P4::infoCount() #5098
Conversation
996d3cd
to
9e8d633
Compare
Signed-off-by: Vladimír Štill <[email protected]>
Signed-off-by: Vladimír Štill <[email protected]>
test/gtest/diagnostics.cpp
Outdated
@@ -69,51 +69,58 @@ TEST_F(Diagnostics, P4_16_Disable) { | |||
@diagnostic("uninitialized_out_param", "disable") | |||
)")); | |||
EXPECT_TRUE(test); | |||
EXPECT_EQ(0u, ::P4::diagnosticCount()); | |||
EXPECT_EQ(0u, P4::diagnosticCount()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably do not even need the P4::
qualifier here. Not sure what our general policy is but these functions are all available in the P4 namespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. I guess I am used to working on a code where P4
is just one of the namespaces :-).
Co-authored-by: Fabian Ruffy <[email protected]> Signed-off-by: Vladimír Štill <[email protected]>
Signed-off-by: Vladimír Štill <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certainly looks reasonable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall. Just have some nits.
Signed-off-by: Vladimír Štill <[email protected]>
Signed-off-by: Vladimír Štill <[email protected]>
Signed-off-by: Vladimír Štill <[email protected]>
There is
errorCount
anddiagnosticCount
but nowarningCount
and noinfoCount
. This PR adds them.