1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#include <BALL/CONCEPT/classTest.h>
#include <BALLTestConfig.h>
///////////////////////////
#include <BALL/common.h>
///////////////////////////
// Verify that the globally defined data types (from
// COMMON/global.h) have the correct size on all platforms.
// This is required for portable persistence.
START_TEST(sizes of the global data types)
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
using namespace BALL;
CHECK(size of Distance)
TEST_EQUAL(sizeof(Distance), 4)
RESULT
CHECK(size of Handle)
TEST_EQUAL(sizeof(Handle), 4)
RESULT
CHECK(size of Index)
TEST_EQUAL(sizeof(Index), 4)
RESULT
CHECK(size of Size)
TEST_EQUAL(sizeof(Size), 4)
RESULT
CHECK(size of Time)
TEST_EQUAL(sizeof(Time), sizeof(time_t))
RESULT
CHECK(size of HashIndex)
TEST_EQUAL(sizeof(HashIndex), 4)
RESULT
CHECK(size of Position)
TEST_EQUAL(sizeof(Position), 4)
RESULT
CHECK(size of Real)
TEST_EQUAL(sizeof(Real), 4)
RESULT
CHECK(size of DoubleReal)
TEST_EQUAL(sizeof(DoubleReal), 8)
RESULT
CHECK(size of Property)
TEST_EQUAL(sizeof(Property), 4)
RESULT
CHECK(size of ErrorCode)
TEST_EQUAL(sizeof(ErrorCode), 4)
RESULT
CHECK(size of Byte)
TEST_EQUAL(sizeof(Byte), 1)
RESULT
CHECK(size of PointerSizeInt)
TEST_EQUAL(sizeof(LongSize), 8)
RESULT
CHECK(size of LongSize)
TEST_EQUAL(sizeof(LongSize), 8)
RESULT
CHECK(size of LongIndex)
TEST_EQUAL(sizeof(LongIndex), 8)
RESULT
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
END_TEST
|