You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Mike Percy (Code Review)" <ge...@cloudera.org> on 2017/05/22 22:01:44 UTC

[kudu-CR] Improve ASSERT STR CONTAINS()

Hello David Ribeiro Alves, Todd Lipcon,

I'd like you to do a code review.  Please visit

    http://gerrit.cloudera.org:8080/6956

to review the following change.

Change subject: Improve ASSERT_STR_CONTAINS()
......................................................................

Improve ASSERT_STR_CONTAINS()

This can just defer to built-in gtest functions instead of being
constructed by us. The benefit is that the implementation doesn't have
to wrap the macro in a do ... while loop so we are able to use syntax
like:

  ASSERT_STR_CONTAINS(a, b) << extra_info;

whereas previously you couldn't append extra_info to the error message.

Also fix some uses of ASSERT_STR_CONTAINS that were missing semicolons.

Change-Id: Idea2abc0115e13dbb9f3853a5b821ccbf833d184
---
M src/kudu/integration-tests/master_replication-itest.cc
M src/kudu/master/master-test.cc
M src/kudu/util/debug-util-test.cc
M src/kudu/util/flags-test.cc
M src/kudu/util/test_macros.h
5 files changed, 10 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/56/6956/1
-- 
To view, visit http://gerrit.cloudera.org:8080/6956
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idea2abc0115e13dbb9f3853a5b821ccbf833d184
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] Improve ASSERT STR CONTAINS()

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change.

Change subject: Improve ASSERT_STR_CONTAINS()
......................................................................


Patch Set 1: Code-Review+2

-- 
To view, visit http://gerrit.cloudera.org:8080/6956
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Idea2abc0115e13dbb9f3853a5b821ccbf833d184
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] Improve ASSERT STR CONTAINS()

Posted by "Mike Percy (Code Review)" <ge...@cloudera.org>.
Mike Percy has submitted this change and it was merged.

Change subject: Improve ASSERT_STR_CONTAINS()
......................................................................


Improve ASSERT_STR_CONTAINS()

This can just defer to built-in gtest functions instead of being
constructed by us. The benefit is that the implementation doesn't have
to wrap the macro in a do ... while loop so we are able to use syntax
like:

  ASSERT_STR_CONTAINS(a, b) << extra_info;

whereas previously you couldn't append extra_info to the error message.

Also fix some uses of ASSERT_STR_CONTAINS that were missing semicolons.

Change-Id: Idea2abc0115e13dbb9f3853a5b821ccbf833d184
Reviewed-on: http://gerrit.cloudera.org:8080/6956
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <to...@apache.org>
---
M src/kudu/integration-tests/master_replication-itest.cc
M src/kudu/master/master-test.cc
M src/kudu/util/debug-util-test.cc
M src/kudu/util/flags-test.cc
M src/kudu/util/test_macros.h
5 files changed, 10 insertions(+), 19 deletions(-)

Approvals:
  Todd Lipcon: Looks good to me, approved
  Kudu Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/6956
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Idea2abc0115e13dbb9f3853a5b821ccbf833d184
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>