-
Notifications
You must be signed in to change notification settings - Fork 56
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
tests: Refactor driver error assertions #933
Conversation
Signed-off-by: Brad Keryan <brad.keryan@ni.com>
Signed-off-by: Brad Keryan <brad.keryan@ni.com>
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.
Looks really good!
FYI,
|
…h MSVC" This reverts commit fc093c6.
Signed-off-by: Brad Keryan <brad.keryan@ni.com>
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.
Declining to review since I'm not code owner on any of the files now.
Signed-off-by: Brad Keryan <brad.keryan@ni.com>
Signed-off-by: Brad Keryan <brad.keryan@ni.com>
|
||
#include "client_helpers.h" | ||
|
||
inline void expect_driver_error(const nidevice_grpc::experimental::client::grpc_driver_error& ex, int32_t expected_error) |
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.
What does this Pull Request accomplish?
Add new assertion macros and helper functions to
test_helpers.h
:EXPECT_THROW_DRIVER_ERROR
EXPECT_THROW_DRIVER_ERROR_WITH_SUBSTR
EXPECT_DRIVER_ERROR
expect_driver_error
helper functionEXPECT_DRIVER_ERROR_WITH_SUBSTR
get_driver_error()
:grpc_driver_error
exceptionint
.ni-error
key is not found,get_driver_error()
fails the test and returns 0.Why should this Pull Request be merged?
Reduce boilerplate and increase consistency in tests.
What testing has been done?
Built on Windows and Linux.
Ran DAQmx tests on Windows.