diff options
Diffstat (limited to '')
-rw-r--r-- | test/multiple_tracer_link_test.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/multiple_tracer_link_test.cpp b/test/multiple_tracer_link_test.cpp new file mode 100644 index 0000000..60a9425 --- /dev/null +++ b/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; +} |