test shuffle
This commit is contained in:
+1
-51
@@ -14,7 +14,6 @@
|
||||
#include "utilpvt.h"
|
||||
#include "pvaproto.h"
|
||||
#include "dataimpl.h"
|
||||
#include "pvrequest.h"
|
||||
|
||||
using namespace pvxs;
|
||||
namespace {
|
||||
@@ -205,54 +204,6 @@ void testIterUnion()
|
||||
}
|
||||
}
|
||||
|
||||
void testPvRequest()
|
||||
{
|
||||
namespace M = members;
|
||||
|
||||
testDiag("%s", __func__);
|
||||
|
||||
auto def = nt::NTScalar{TypeCode::String}.build();
|
||||
auto val = def.create();
|
||||
testShow()<<val;
|
||||
|
||||
{
|
||||
auto rdef = TypeDef(TypeCode::Struct, {
|
||||
M::Struct("field", {})
|
||||
});
|
||||
|
||||
auto mask = request2mask(Value::Helper::desc(val), rdef.create());
|
||||
|
||||
testEq(mask, BitMask({0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, 10u));
|
||||
}
|
||||
|
||||
{
|
||||
auto rdef = TypeDef(TypeCode::Struct, {
|
||||
M::Struct("field", {
|
||||
M::Struct("value", {}),
|
||||
})
|
||||
});
|
||||
|
||||
auto mask = request2mask(Value::Helper::desc(val), rdef.create());
|
||||
|
||||
testEq(mask, BitMask({0, 1}, 10u));
|
||||
}
|
||||
|
||||
{
|
||||
auto rdef = TypeDef(TypeCode::Struct, {
|
||||
M::Struct("field", {
|
||||
M::Struct("timeStamp", {}),
|
||||
M::Struct("alarm", {
|
||||
M::Struct("status", {}),
|
||||
}),
|
||||
})
|
||||
});
|
||||
|
||||
auto mask = request2mask(Value::Helper::desc(val), rdef.create());
|
||||
|
||||
testEq(mask, BitMask({0, 2, 4, 6, 7, 8, 9}, 10u));
|
||||
}
|
||||
}
|
||||
|
||||
template<typename Store, typename Inout>
|
||||
void testConvertScalar(const Store& store, const Inout& inout)
|
||||
{
|
||||
@@ -362,7 +313,7 @@ void testAssignSimilar()
|
||||
|
||||
MAIN(testdata)
|
||||
{
|
||||
testPlan(111);
|
||||
testPlan(108);
|
||||
testSetup();
|
||||
testTraverse();
|
||||
testAssign();
|
||||
@@ -370,7 +321,6 @@ MAIN(testdata)
|
||||
testName();
|
||||
testIterStruct();
|
||||
testIterUnion();
|
||||
testPvRequest();
|
||||
|
||||
testConvertScalar<double, bool>(1.0, true);
|
||||
testConvertScalar<double, bool>(0.0, false);
|
||||
|
||||
Reference in New Issue
Block a user