MCPcopy Create free account
hub / github.com/apache/arrow / TEST

Function TEST

cpp/src/arrow/result_test.cc:405–412  ·  view source on GitHub ↗

Verify that a Result object can be constructed from a move-only type.

Source from the content-addressed store, hash-verified

403
404// Verify that a Result object can be constructed from a move-only type.
405TEST(ResultTest, InitializationMoveOnlyType) {
406 std::unique_ptr<std::string> value(new std::string(kStringElement));
407 auto str = value.get();
408 Result<std::unique_ptr<std::string>> result(std::move(value));
409
410 ASSERT_TRUE(result.ok());
411 EXPECT_EQ(result.ValueOrDie().get(), str);
412}
413
414// Verify that a Result object can be move-constructed from a move-only type.
415TEST(ResultTest, MoveConstructorMoveOnlyType) {

Callers

nothing calls this directly

Calls 15

resultFunction · 0.85
RaisesFunction · 0.85
ResultWithFunction · 0.85
ValueOrDieMethod · 0.80
ValueOrMethod · 0.80
ValueOrElseMethod · 0.80
strMethod · 0.80
InvalidFunction · 0.70
OKFunction · 0.70
TypeErrorFunction · 0.70
StatusClass · 0.50
getMethod · 0.45

Tested by

no test coverage detected