File: multiple_tracer_link_test.cpp

package info (click to toggle)
opentracing-cpp 1.6.0-4.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,572 kB
  • sloc: cpp: 14,234; ansic: 68; sh: 16; makefile: 5
file content (16 lines) | stat: -rw-r--r-- 520 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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;
}