Newer
Older
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
#ifndef MANTID_KERNEL_MULTIFILENAMEPARSERTEST_H_
#define MANTID_KERNEL_MULTIFILENAMEPARSERTEST_H_
#include <cxxtest/TestSuite.h>
#include "MantidKernel/MultiFileNameParser.h"
using namespace Mantid::Kernel;
class MultiFileNameParserTest : public CxxTest::TestSuite
{
public:
void basic(const std::string & multiFileName)
{
MultiFileNameParser parser;
std::string error;
TS_ASSERT_THROWS_NOTHING( error = parser.parse(multiFileName) );
TS_ASSERT_EQUALS(error, std::string(""));
// @TODO test contents
}
void test_single()
{
basic("c:/data/INST1.ext");
}
void test_list()
{
basic("c:/data/INST1,2,3,4.ext");
}
void test_range()
{
basic("c:/data/INST1:4.ext");
}
void test_steppedRange()
{
basic("c:/data/INST1:4:2.ext");
}
void test_addedList()
{
basic("c:/data/INST1+2.ext");
}
void test_addedRange()
{
basic("c:/data/INST1-4.ext");
}
void test_addedSteppedRange()
{
basic("c:/data/INST1-4:2.ext");
}
};
#endif /* MANTID_KERNEL_MULTIFILENAMEPARSERTEST_H_ */