dynamic_load_test.cc 437 B

12345678910111213141516
  1. // Copyright The OpenTelemetry Authors
  2. // SPDX-License-Identifier: Apache-2.0
  3. #include <gtest/gtest.h>
  4. #include <string>
  5. #include "opentelemetry/plugin/dynamic_load.h"
  6. #include "opentelemetry/plugin/factory.h"
  7. TEST(LoadFactoryTest, FailureTest)
  8. {
  9. std::string error_message;
  10. auto factory = opentelemetry::plugin::LoadFactory("no-such-plugin", error_message);
  11. EXPECT_EQ(factory, nullptr);
  12. EXPECT_FALSE(error_message.empty());
  13. }