MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / TEST

Function TEST

test/cpp/utils/exception_test.cc:22–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20#include "gtest/gtest.h"
21
22TEST(error_message_test, optional_with_value) {
23 std::optional<int> value = 42;
24 std::string msg = common::ErrorMessage("value=", value).to_string();
25 EXPECT_EQ(msg, "value=42");
26}
27
28TEST(error_message_test, optional_without_value) {
29 std::optional<int> value = std::nullopt;

Callers

nothing calls this directly

Calls 5

ErrorMessageClass · 0.85
to_stringMethod · 0.45
findMethod · 0.45
whatMethod · 0.45
has_valueMethod · 0.45

Tested by

no test coverage detected