Skip to content

Commit

Permalink
Minor fixes. (#29)
Browse files Browse the repository at this point in the history
* Check for Status explicitly when calling IsOk.

* Remove unused "using" statement.

* Fix tests for TRUE filter.
  • Loading branch information
tcsnfkx authored Jan 19, 2022
1 parent 9e4ece1 commit 8dd8d59
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ cc_test(

cc_test(
name = "true_filter_test",
srcs = ["and_filter_test.cc"],
srcs = ["true_filter_test.cc"],
deps = [
"//src/main/cc/wfa/virtual_people/common/field_filter",
"//src/main/proto/wfa/virtual_people/common:field_filter_cc_proto",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ namespace wfa_virtual_people {
namespace {

using ::wfa::StatusIs;
using ::wfa_virtual_people::test::TestProto;

TEST(TrueFilterTest, TestIsMatch) {
FieldFilterProto field_filter_proto;
Expand All @@ -47,7 +48,7 @@ TEST(TrueFilterTest, TestIsMatchNotEmptyEvent) {
FieldFilter::New(TestProto().GetDescriptor(), field_filter_proto));

TestProto test_proto;
test_proto.set_person_country_code("COUNTRY_1");
test_proto.mutable_a()->mutable_b()->set_string_value("a");
EXPECT_TRUE(field_filter->IsMatch(test_proto));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ using ::google::protobuf::Message;
using ::testing::FieldsAre;
using ::wfa::EqualsProto;
using ::wfa::IsOk;
using ::wfa::IsOkAndHolds;
using ::wfa::StatusIs;
using ::wfa_virtual_people::test::TestProto;
using ::wfa_virtual_people::test::TestProtoB;
Expand Down

0 comments on commit 8dd8d59

Please sign in to comment.