[jira] [Commented] (ARROW-6772) [C++] Add operator== for interfaces with an Equals() method

2022-09-02 Thread Antoine Pitrou (Jira)


[ 
https://issues.apache.org/jira/browse/ARROW-6772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17599618#comment-17599618
 ] 

Antoine Pitrou commented on ARROW-6772:
---

I think it would be nice to add at least _basic_ tests to ensure that the 
operators properly redirect. No need to duplicate all tests though.

> [C++] Add operator== for interfaces with an Equals() method
> ---
>
> Key: ARROW-6772
> URL: https://issues.apache.org/jira/browse/ARROW-6772
> Project: Apache Arrow
>  Issue Type: Improvement
>  Components: C++
>Reporter: Ben Kietzman
>Assignee: Ben Harkins
>Priority: Major
>  Labels: good-first-issue
>
> A common pattern in tests is {{ASSERT_TRUE(schm->Equals(*other)}}. The 
> addition of overloaded equality operators will allow this o be written 
> {{ASSERT_EQ(*schm, *other)}}, which is more idiomatic GTEST usage and will 
> allow more informative assertion failure messages.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (ARROW-6772) [C++] Add operator== for interfaces with an Equals() method

2022-09-02 Thread Ben Harkins (Jira)


[ 
https://issues.apache.org/jira/browse/ARROW-6772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17599617#comment-17599617
 ] 

Ben Harkins commented on ARROW-6772:


I'm currently working on this one - planning on adding 
{{util::EqualityComparable}} to {{{}DataType{}}}, {{{}Field{}}}, and 
{{{}FieldRef{}}}. Should additional comparison tests be added (in addition to 
AssertXXXEqual) to type_test.cc or would that be considered redundant?

> [C++] Add operator== for interfaces with an Equals() method
> ---
>
> Key: ARROW-6772
> URL: https://issues.apache.org/jira/browse/ARROW-6772
> Project: Apache Arrow
>  Issue Type: Improvement
>  Components: C++
>Reporter: Ben Kietzman
>Assignee: Ben Harkins
>Priority: Major
>  Labels: good-first-issue
>
> A common pattern in tests is {{ASSERT_TRUE(schm->Equals(*other)}}. The 
> addition of overloaded equality operators will allow this o be written 
> {{ASSERT_EQ(*schm, *other)}}, which is more idiomatic GTEST usage and will 
> allow more informative assertion failure messages.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (ARROW-6772) [C++] Add operator== for interfaces with an Equals() method

2021-08-05 Thread Antoine Pitrou (Jira)


[ 
https://issues.apache.org/jira/browse/ARROW-6772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17394127#comment-17394127
 ] 

Antoine Pitrou commented on ARROW-6772:
---

This still would need to be done for {{Field}} and {{DataType}}, at least.

> [C++] Add operator== for interfaces with an Equals() method
> ---
>
> Key: ARROW-6772
> URL: https://issues.apache.org/jira/browse/ARROW-6772
> Project: Apache Arrow
>  Issue Type: Improvement
>  Components: C++
>Reporter: Ben Kietzman
>Assignee: Ben Kietzman
>Priority: Major
>
> A common pattern in tests is {{ASSERT_TRUE(schm->Equals(*other)}}. The 
> addition of overloaded equality operators will allow this o be written 
> {{ASSERT_EQ(*schm, *other)}}, which is more idiomatic GTEST usage and will 
> allow more informative assertion failure messages.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)