[io] Add gtest-based cpp11Containers unordered_map test - #23021
[io] Add gtest-based cpp11Containers unordered_map test#23021vepadulano wants to merge 1 commit into
Conversation
8060e9c to
ebcd9f7
Compare
Test Results 22 files 22 suites 3d 16h 48m 39s ⏱️ For more details on these failures, see this check. Results for commit f4badb0. ♻️ This comment has been updated with latest results. |
8193652 to
4a52dd2
Compare
This is a re-write of the cpp11Containers-unorderedMap test as a compiled C++ program based on gtest. Given the recent intermittent CI failures, the new test could help identify in a more fine-grained way the root cause. It is an addition rather than a substitution because there is no guarantee that the cause of the CI failure is in the test itself.
4a52dd2 to
f4badb0
Compare
|
I've seen the |
| auto copy = obj; | ||
| fillObj(copy, gaus, uniform, rng); | ||
|
|
||
| // Write objects to file row-wise, i.e. as a whole object |
There was a problem hiding this comment.
Odd semantic. We usually use row-wise for case of TTree/RNTuple where the object is stored in a single (unsplit) branch/field.
| // Write objects to file row-wise, i.e. as a whole object | |
| // Write objects directly in the TFile, as a whole object |
In addition the content of the collection itself can be stored is member-wise or object-wise (the former is writing for each data member for each object and the later `for each object for each data member)
There was a problem hiding this comment.
If there is interest in test the internal member-wise vs objects wise storing of a collection, this can be controlled by call TClass::SetCanSplit( bool ) for the contained class (eg. std::pair<K,V>) before the I/O operation.
| // We want to match associative containers of the `key:value` type. The variadic | ||
| // template parameter list is used to help all compilers match this overload | ||
| template <typename KeyType, typename ValueType, template <typename... Args> typename Cont, typename... Args> | ||
| void check_eq(const Cont<KeyType, ValueType, Args...> &a, const Cont<KeyType, ValueType, Args...> &b) |
There was a problem hiding this comment.
Should there be a different test for ordered and un-ordered containers? (i.e. to (double) check the ordering is correct for the ordered containers?)
This is a re-write of the cpp11Containers-unorderedMap test as a compiled C++ program based on gtest. Given the recent intermittent CI failures, the new test could help identify in a more fine-grained way the root cause. It is an addition rather than a substitution because there is no guarantee that the cause of the CI failure is in the test itself.