From 0d8fb0a89592c3b4f6e03b3edc6ec00b7d634549 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Sat, 18 Apr 2020 08:21:23 -0700 Subject: [PATCH] epicsLoadTest: test expected failure --- modules/libcom/test/epicsLoadTest.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/libcom/test/epicsLoadTest.cpp b/modules/libcom/test/epicsLoadTest.cpp index 809081072..3062f3b22 100644 --- a/modules/libcom/test/epicsLoadTest.cpp +++ b/modules/libcom/test/epicsLoadTest.cpp @@ -17,6 +17,11 @@ namespace { +void loadBad() +{ + testOk1(!epicsFindSymbol("noSuchFunction")); +} + // lookup a symbol from libCom // which this executable is linked against (maybe statically) // Doesn't work for static builds on windows @@ -70,13 +75,14 @@ void loadCA() MAIN(epicsLoadTest) { - testPlan(3); + testPlan(4); // reference to ensure linkage when linking statically, // and actually use the result to make extra doubly sure that // this call isn't optimized out by eg. an LTO pass. testDiag("# of CPUs %d", epicsThreadGetCPUs()); + loadBad(); #if defined(__rtems__) || defined(vxWorks) testSkip(3, "Target does not implement epicsFindSymbol()"); #else