forked from DCMTK/dcmtk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtvrov.cc
50 lines (45 loc) · 1.47 KB
/
tvrov.cc
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
/*
*
* Copyright (C) 2019, OFFIS e.V.
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
*
* OFFIS e.V.
* R&D Division Health
* Escherweg 2
* D-26121 Oldenburg, Germany
*
*
* Module: dcmdata
*
* Author: Joerg Riesmeier
*
* Purpose: test program for class DcmOther64bitVeryLong
*
*/
#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
#include "dcmtk/ofstd/oftest.h"
#include "dcmtk/dcmdata/dcdatset.h"
#include "dcmtk/dcmdata/dcvrov.h"
#include "dcmtk/dcmdata/dcdeftag.h"
OFTEST(dcmdata_other64bitVeryLong)
{
DcmOther64bitVeryLong veryLong(DCM_ExtendedOffsetTable);
/* append new values */
OFCHECK(veryLong.putUint64(1, 0).good());
OFCHECK(veryLong.putUint64(22, 1).good());
OFCHECK(veryLong.putUint64(333, 2).good());
OFCHECK(veryLong.putUint64(4444, 3).good());
OFCHECK(veryLong.putUint64(55555, 4).good());
OFCHECK(veryLong.putUint64(666666, 5).good());
OFCHECK(veryLong.putUint64(7777777, 6).good());
OFCHECK(veryLong.putUint64(88888888, 7).good());
OFCHECK(veryLong.putUint64(999999999, 8).good());
OFCHECK(veryLong.putUint64(1111111111, 9).good());
OFCHECK(veryLong.putUint64(22222222222UL, 10).good());
/* value multiplicity should always be 1 */
OFCHECK_EQUAL(veryLong.getVM(), 1);
/* number of values should be higher */
OFCHECK_EQUAL(veryLong.getNumberOfValues(), 11);
}