Skip to content
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

io rules: test with array input followed by other inputs #1252

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pcanal
Copy link
Member

@pcanal pcanal commented Jan 25, 2025

This is the companion PR to root-project/root#17523

Copy link
Collaborator

@jalopezg-git jalopezg-git left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @pcanal; you invoked me (as reviewer), so here's the review (taking into account context from sibling root PR)! Other than that, it LGTM!

Hope everything is going well at CERN / Fermilab - and Happy New 2025 🎉!

Comment on lines +278 to +279
template<size_t N, typename V> // = decltype(T::f)[N]>
bool check_array(int arr[N], V ref)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that we could make the two parameters of the same type (esp. given that they are being compared 1-to1 below), right?

@@ -454,6 +514,9 @@ int readfile(const char *filename = "sourcetypes.root")
res = res && check(n->fListExplicit, {"b1", "b2", "b3"});
res = res && check(n->fListImplicitExplicit, {"c1", "c2", "c3"});

res = res && check_array<3>(n->fHitPattern, std::vector<int>{111, 112, 113});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly use initializer list or std::array<int, 3> instead.

Suggested change
res = res && check_array<3>(n->fHitPattern, std::vector<int>{111, 112, 113});
res = res && check_array<3>(n->fHitPattern, std::initializer_list<int>{111, 112, 113});

Comment on lines +126 to +127
std::cout << "The double";
std::cout << " value is: " << a;
Copy link
Collaborator

@jalopezg-git jalopezg-git Jan 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why double; isn't that an int?

Suggested change
std::cout << "The double";
std::cout << " value is: " << a;
std::cout << "The integer value is: " << a;

@dpiparo
Copy link
Member

dpiparo commented Jan 26, 2025

thanks @jalopezg-git !!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants