Skip to content

Commit

Permalink
try to avoid ICE
Browse files Browse the repository at this point in the history
  • Loading branch information
PragmaTwice committed Mar 19, 2023
1 parent 71b0696 commit 35c626a
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions tests/cppunit/status_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ TEST(StatusOr, String) {

TEST(StatusOr, SharedPtr) {
struct A { // NOLINT
explicit A(int *x) : x(x) { *x = 233; }
A(int *x) : x(x) { *x = 233; }
~A() { *x = 0; }

int *x;
Expand Down Expand Up @@ -226,20 +226,3 @@ TEST(StatusOr, Prefixed) {
ASSERT_EQ(g(-2).Msg(), "oh: hi");
ASSERT_EQ(*g(5), 36);
}

TEST(Status, Normal) {
Status a = Status::OK(), b = {Status::NotOK, "something"};

ASSERT_TRUE(a);
ASSERT_FALSE(b);

Status c = std::move(a), d = std::move(b);

ASSERT_TRUE(c);
ASSERT_FALSE(d);

Status e = d.Prefixed("hello");

ASSERT_EQ(c.Msg(), "ok");
ASSERT_EQ(e.Msg(), "hello: something");
}

0 comments on commit 35c626a

Please sign in to comment.