forked from npshub/mantid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MantidVersionTest.h.in
39 lines (31 loc) · 1.26 KB
/
MantidVersionTest.h.in
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
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
@AUTO_GENERATE_WARNING@
/********** Source = MantidVersionTest.h.in *****************************************************/
#pragma once
#include "MantidKernel/MantidVersion.h"
#include <cxxtest/TestSuite.h>
using namespace Mantid::Kernel;
class MantidVersionTest : public CxxTest::TestSuite {
public:
void test_full_version_string() {
std::string vers = "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@@VERSION_TWEAK@";
TS_ASSERT_EQUALS(MantidVersion::version(), vers);
}
void test_major_version_from_info() {
std::string major = "@VERSION_MAJOR@";
TS_ASSERT_EQUALS(MantidVersion::versionInfo().major, major);
}
void test_minor_version_from_info() {
std::string minor = "@VERSION_MINOR@";
TS_ASSERT_EQUALS(MantidVersion::versionInfo().minor, minor);
}
void test_patch_version_from_info() {
std::string patch = "@VERSION_PATCH@@VERSION_TWEAK@";
TS_ASSERT_EQUALS(MantidVersion::versionInfo().patch, patch);
}
};