Skip to content

Commit

Permalink
Merge pull request google#1114 from antmicro:48292-move-xls-expect-ok…
Browse files Browse the repository at this point in the history
…-and-eq

PiperOrigin-RevId: 559914741
  • Loading branch information
copybara-github committed Aug 25, 2023
2 parents 1b669d9 + daa1c78 commit 6cdd064
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 6 additions & 0 deletions xls/common/status/matchers.h
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,12 @@ IsOkAndHolds(InnerMatcher&& inner_matcher) {
xls::status_testing::internal_status::AddFatalFailure( \
#rexpr, _))

// Executes an expression that returns a absl::StatusOr, and compares the
// contained variable to rexpr if the error code is OK.
// If the Status is non-OK it generates a nonfatal test failure
#define XLS_EXPECT_OK_AND_EQ(lhs, rexpr) \
EXPECT_THAT(lhs, status_testing::IsOkAndHolds(rexpr));

} // namespace status_testing
} // namespace xls

Expand Down
4 changes: 0 additions & 4 deletions xls/noc/simulation/indexer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
#include "xls/noc/config/network_config.pb.h"
#include "xls/noc/config/network_config_proto_builder.h"

// TODO(tedhong): 2021-01-10 Move this to xls/common
#define XLS_EXPECT_OK_AND_EQ(lhs, rexpr) \
EXPECT_THAT(lhs, status_testing::IsOkAndHolds(rexpr));

namespace xls {
namespace noc {
namespace {
Expand Down

0 comments on commit 6cdd064

Please sign in to comment.