ZeroTierOne/ext/opentelemetry-cpp-1.21.0/api/test/plugin/dynamic_load_test.cc
2025-07-11 10:37:21 -07:00

16 lines
437 B
C++

// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
#include <gtest/gtest.h>
#include <string>
#include "opentelemetry/plugin/dynamic_load.h"
#include "opentelemetry/plugin/factory.h"
TEST(LoadFactoryTest, FailureTest)
{
std::string error_message;
auto factory = opentelemetry::plugin::LoadFactory("no-such-plugin", error_message);
EXPECT_EQ(factory, nullptr);
EXPECT_FALSE(error_message.empty());
}