add iochooks and pvxsIoc library

This commit is contained in:
Michael Davidsaver
2020-04-24 09:51:41 -07:00
parent b99e5c9ae6
commit 6bbcf8aebb
8 changed files with 405 additions and 3 deletions
+49
View File
@@ -0,0 +1,49 @@
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvxs is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#include <testMain.h>
#include <dbUnitTest.h>
#include <dbAccess.h>
#include <iocsh.h>
#include <pvxs/iochooks.h>
#include <pvxs/server.h>
#include <pvxs/unittest.h>
extern "C" {
extern int testioc_registerRecordDeviceDriver(struct dbBase*);
}
using namespace pvxs;
namespace {
} // namespace
MAIN(testioc)
{
testPlan(3);
testSetup();
testdbPrepare();
testThrows<std::logic_error>([]{
ioc::server();
});
testdbReadDatabase("testioc.dbd", nullptr, nullptr);
testEq(0, testioc_registerRecordDeviceDriver(pdbbase));
testTrue(!!ioc::server());
testIocInitOk();
testIocShutdownOk();
testdbCleanup();
return testDone();
}