remove examples (moved to exampleCPP) ; test is now a regresion test (make runtests)
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
*/
|
||||
|
||||
/* Author: Marty Kraimer */
|
||||
#include <epicsUnitTest.h>
|
||||
#include <testMain.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
@@ -36,6 +38,8 @@ using namespace epics::pvData;
|
||||
using namespace epics::pvDatabase;
|
||||
using std::string;
|
||||
|
||||
static bool debug = false;
|
||||
|
||||
static PVRecordPtr createScalar(
|
||||
string const & recordName,
|
||||
ScalarType scalarType,
|
||||
@@ -58,31 +62,44 @@ static PVRecordPtr createScalarArray(
|
||||
|
||||
static void scalarTest()
|
||||
{
|
||||
cout << endl << endl << "****scalarTest****" << endl;
|
||||
if(debug) {cout << endl << endl << "****scalarTest****" << endl; }
|
||||
PVRecordPtr pvRecord;
|
||||
pvRecord = createScalar("doubleRecord",pvDouble,"alarm,timeStamp.display");
|
||||
testOk1(pvRecord.get()!=0);
|
||||
if(pvRecord && debug) {
|
||||
cout << pvRecord << endl;
|
||||
}
|
||||
pvRecord->destroy();
|
||||
}
|
||||
|
||||
static void arrayTest()
|
||||
{
|
||||
cout << endl << endl << "****arrayTest****" << endl;
|
||||
if(debug) {cout << endl << endl << "****arrayTest****" << endl; }
|
||||
PVRecordPtr pvRecord;
|
||||
pvRecord = createScalarArray("doubleArrayRecord",pvDouble,"alarm,timeStamp");
|
||||
testOk1(pvRecord.get()!=0);
|
||||
if(pvRecord && debug) {
|
||||
cout << pvRecord << endl;
|
||||
}
|
||||
pvRecord->destroy();
|
||||
}
|
||||
|
||||
static void powerSupplyTest()
|
||||
{
|
||||
cout << endl << endl << "****powerSupplyTest****" << endl;
|
||||
if(debug) {cout << endl << endl << "****powerSupplyTest****" << endl; }
|
||||
PVRecordPtr pvRecord;
|
||||
PVStructurePtr pv = createPowerSupply();
|
||||
pvRecord = PowerSupply::create("powerSupply",pv);
|
||||
testOk1(pvRecord.get()!=0);
|
||||
if(pvRecord && debug) {
|
||||
cout << pvRecord << endl;
|
||||
}
|
||||
pvRecord->destroy();
|
||||
}
|
||||
|
||||
int main(int argc,char *argv[])
|
||||
MAIN(testPVRecord)
|
||||
{
|
||||
testPlan(3);
|
||||
scalarTest();
|
||||
arrayTest();
|
||||
powerSupplyTest();
|
||||
|
||||
Reference in New Issue
Block a user