diff options
Diffstat (limited to 'src/jaegertracing/opentracing-cpp/test/multiple_tracer_link_test.cpp')
-rw-r--r-- | src/jaegertracing/opentracing-cpp/test/multiple_tracer_link_test.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/jaegertracing/opentracing-cpp/test/multiple_tracer_link_test.cpp b/src/jaegertracing/opentracing-cpp/test/multiple_tracer_link_test.cpp new file mode 100644 index 000000000..60a9425ac --- /dev/null +++ b/src/jaegertracing/opentracing-cpp/test/multiple_tracer_link_test.cpp @@ -0,0 +1,16 @@ +// Links in tracer_a.o and tracer_b.o to verify that there's no multiple +// definition error from OpenTracingMakeTracerFactory. +#include <opentracing/dynamic_load.h> + +extern "C" { +extern OpenTracingMakeTracerFactoryType* const OpenTracingMakeTracerFactory; +} // extern "C" + +int main() { + // Call OpenTracingMakeTracerFactory to make sure it's not elided. + if ((*OpenTracingMakeTracerFactory)(nullptr, nullptr, nullptr, nullptr, + nullptr) != -1) { + return -1; + } + return 0; +} |