8 #ifndef META_OCEAN_TEST_TESTBASE_TEST_VALUE_H
9 #define META_OCEAN_TEST_TESTBASE_TEST_VALUE_H
38 static bool test(
const double testDuration);
59 static bool testCopy(
const double testDuration);
66 static bool testMove(
const double testDuration);
92 static bool verifyValue(
const Value&
object,
const T& value);
98 if (!
object.isBool() ||
object.boolValue() != value)
103 if (!
object ||
object.isNull())
114 if (!
object.isInt() ||
object.intValue() != value)
119 if (!
object ||
object.isNull())
130 if (!
object.isInt64() ||
object.int64Value() != value)
135 if (!
object ||
object.isNull())
146 if (!
object.isFloat() ||
object.floatValue() != value)
151 if (!
object ||
object.isNull())
162 if (!
object.isFloat64() ||
object.float64Value() != value)
167 if (!
object ||
object.isNull())
178 if (!
object.isString() ||
object.stringValue() != value)
183 if (!
object ||
object.isNull())
194 if (!
object.isBuffer())
200 const void* data =
object.bufferValue(size);
202 if (size == value.size())
204 if (size >= 1 && memcmp(value.data(), data, size) != 0)
214 if (!
object ||
object.isNull())
222 template <
typename T>
225 ocean_assert(
false &&
"Missing implementation!");
This class implements a generator for random numbers.
Definition: RandomGenerator.h:42
This class implements a Value test.
Definition: TestValue.h:30
static bool testCopy(const double testDuration)
Tests the copy function.
static bool test(const double testDuration)
Invokes all Value tests.
static bool verifyValue(const Value &object, const T &value)
Verifies that the given value object has a specific type and value.
Definition: TestValue.h:223
static bool testComparison(const double testDuration)
Tests the comparison operators.
static bool testReadWrite(const double testDuration)
Tests the read/read to/from buffer functions.
static bool testMove(const double testDuration)
Tests the move function.
static Value createRandomValue(RandomGenerator &randomGenerator)
Returns a random valid Value object.
static bool testConstructor(const double testDuration)
Tests the constructor function.
This class implements a type independent value.
Definition: Value.h:23
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15