-
Notifications
You must be signed in to change notification settings - Fork 990
Improve groupby test utils to include the original location of failure #20718
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
Conversation
Signed-off-by: Nghia Truong <[email protected]>
Signed-off-by: Nghia Truong <[email protected]>
Signed-off-by: Nghia Truong <[email protected]>
Signed-off-by: Nghia Truong <[email protected]>
|
Instead of creating macros and modifying hundreds of call sites, you should just be able to add a default argument to the end of each method of std::source_location. The example in that link shows how you can default the argument to |
Signed-off-by: Nghia Truong <[email protected]>
Signed-off-by: Nghia Truong <[email protected]>
Signed-off-by: Nghia Truong <[email protected]>
Signed-off-by: Nghia Truong <[email protected]>
That is great. I've modified the code using that approach. |
Signed-off-by: Nghia Truong <[email protected]>
Signed-off-by: Nghia Truong <[email protected]>
6e8bd08 to
02f498a
Compare
|
This looks great. |
Yes, the output should look the same as reported in the PR description: #20718 (comment). |
|
/merge |
Currently, many groupby tests call to
test_single_agg()and other utility functions ingroupby_test_util.*(test_sum_agg()andtest_single_scan()) to execute the test. When a failure happens, GTest only issues a trace location to somewhere intest_single_agg()while there is not any information about the actual failed test. That makes debugging a bit tricky.This PR reimplements thesef test functions, adding one more parameter
std::source_location const& location = std::source_location::current()to carry the caller's information. With this, GTest will report an additional line containing the location of the failed test. For example: