MCPcopy Create free account
hub / github.com/ElementsProject/elements / TEST

Function TEST

src/leveldb/util/status_test.cc:13–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11namespace leveldb {
12
13TEST(Status, MoveConstructor) {
14 {
15 Status ok = Status::OK();
16 Status ok2 = std::move(ok);
17
18 ASSERT_TRUE(ok2.ok());
19 }
20
21 {
22 Status status = Status::NotFound("custom NotFound status message");
23 Status status2 = std::move(status);
24
25 ASSERT_TRUE(status2.IsNotFound());
26 ASSERT_EQ("NotFound: custom NotFound status message", status2.ToString());
27 }
28
29 {
30 Status self_moved = Status::IOError("custom IOError status message");
31
32 // Needed to bypass compiler warning about explicit move-assignment.
33 Status& self_moved_reference = self_moved;
34 self_moved_reference = std::move(self_moved);
35 }
36}
37
38} // namespace leveldb
39

Callers

nothing calls this directly

Calls 4

OKFunction · 0.85
NotFoundFunction · 0.85
IOErrorFunction · 0.85
ToStringMethod · 0.45

Tested by

no test coverage detected