-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[cppyy] Mark most of the xfail-ed tests as "strict"
#20906
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
base: master
Are you sure you want to change the base?
Conversation
519d892 to
5f370c9
Compare
Test Results 22 files 22 suites 3d 16h 2m 42s ⏱️ For more details on these failures, see this check. Results for commit 5f370c9. |
e36515c to
16ab12d
Compare
| else if (name == "basic_string<wchar_t,char_traits<wchar_t>,allocator<wchar_t> >" | ||
| || name == "std::basic_string<wchar_t,char_traits<wchar_t>,allocator<wchar_t> >" | ||
| ) { |
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.
This is not exactly how it's done upstream
else if (name == "std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >") {
So I don't understand the commit message
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.
You're right, I got that wrong! I got confused when reading these long types. I'll fix this up.
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.
Updated. I think I got it right now.
| def has_cpp_20(): | ||
| import cppyy | ||
|
|
||
| return cppyy.gbl.gInterpreter.ProcessLine("__cplusplus;") >= 202002 |
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.
How does this work? ProcessLine is returning an integer corresponding to the value of __cplusplus?
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.
That's correct. I got this pattern from the upstream cppyy test suite:
https://github.com/wlav/cppyy/blob/92967c195e47361dc04a6f1b0a77cfc745f4d914/test/test_stltypes.py#L1673
Follows up on 760b6cc, where not all possible type names were used to match `std::wstring`. Somtimes, the initial `basic_string` part is still prefixed with `std::`. This enables the `test02_string_data_access` unit test in `test_stltypes` from the cppyy test suite on all platforms.
This means the tests will fail if it unexpectedly passes.
297fcf0 to
f6691d8
Compare
f6691d8 to
cead627
Compare
If tests are actually passing, they should not be skipped. This is enforced by the
strict=Truekeyword of thexfailmarker, which makes the tests fail if it unexpectedly succeeded.First step towards closing #20085.