Newer
Older
#ifndef MANTID_KERNEL_SPECIALCOORDINATESYSTEMTEST
#define MANTID_KERNEL_SPECIALCOORDINATESYSTEMTEST
#include <cxxtest/TestSuite.h>
#include "MantidKernel/SpecialCoordinateSystem.h"
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
/*
* We are testing the enum because the order of the elements in the enum is critical. There are various places in the codebase where the
* enum integer values are assumed to be constant. A proper fix for this would be a type replacment enum->object, but while that has not been done,
* a santiy check (these tests) on the enum ordering will prevent unintentional reordering.
*/
class SpecialCoordinateSystemTest : public CxxTest::TestSuite
{
public:
// This pair of boilerplate methods prevent the suite being created statically
// This means the constructor (& destructor) isn't called when running other tests
static SpecialCoordinateSystemTest *createSuite() { return new SpecialCoordinateSystemTest(); }
static void destroySuite( SpecialCoordinateSystemTest *suite ) { delete suite; }
void test_none()
{
// Do not change
SpecialCoordinateSystem none = None;
TS_ASSERT_EQUALS(0, none);
}
void test_qLab()
{
// Do not change
SpecialCoordinateSystem qlab = QLab;
TS_ASSERT_EQUALS(1, qlab);
}
void test_qSample()
{
// Do not change
SpecialCoordinateSystem qSample = QSample;
TS_ASSERT_EQUALS(2, qSample);
}
void test_HKL()
{
// Do not change
SpecialCoordinateSystem hkl = HKL;
TS_ASSERT_EQUALS(3, hkl);
}
};
#endif