Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
8b8d7873
Commit
8b8d7873
authored
6 years ago
by
Samuel Jones
Browse files
Options
Downloads
Patches
Plain Diff
Re #22515 Clang Formatting
parent
ee3d5338
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Framework/Algorithms/src/SortXAxis.cpp
+3
-2
3 additions, 2 deletions
Framework/Algorithms/src/SortXAxis.cpp
Framework/Algorithms/test/SortXAxisTest.h
+15
-17
15 additions, 17 deletions
Framework/Algorithms/test/SortXAxisTest.h
with
18 additions
and
19 deletions
Framework/Algorithms/src/SortXAxis.cpp
+
3
−
2
View file @
8b8d7873
...
@@ -223,8 +223,9 @@ bool isItSorted(Comparator const &compare,
...
@@ -223,8 +223,9 @@ bool isItSorted(Comparator const &compare,
specNum
++
)
{
specNum
++
)
{
if
(
!
std
::
is_sorted
(
inputWorkspace
.
x
(
specNum
).
begin
(),
if
(
!
std
::
is_sorted
(
inputWorkspace
.
x
(
specNum
).
begin
(),
inputWorkspace
.
x
(
specNum
).
end
(),
inputWorkspace
.
x
(
specNum
).
end
(),
[
&
](
double
lhs
,
double
rhs
)
[
&
](
double
lhs
,
double
rhs
)
->
bool
{
->
bool
{
return
compare
(
lhs
,
rhs
);
}))
{
return
compare
(
lhs
,
rhs
);
}))
{
return
false
;
return
false
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Framework/Algorithms/test/SortXAxisTest.h
+
15
−
17
View file @
8b8d7873
#ifndef MANTID_ALGORITHMS_SORTXAXISTEST_H_
#ifndef MANTID_ALGORITHMS_SORTXAXISTEST_H_
#define MANTID_ALGORITHMS_SORTXAXISTEST_H_
#define MANTID_ALGORITHMS_SORTXAXISTEST_H_
#include
"MantidAlgorithms/SortXAxis.h"
#include
"MantidAPI/MatrixWorkspace.h"
#include
"MantidAPI/MatrixWorkspace.h"
#include
"MantidAlgorithms/SortXAxis.h"
#include
"MantidKernel/Workspace.h"
#include
"MantidKernel/Workspace.h"
#include
<cxxtest/TestSuite.h>
#include
<cxxtest/TestSuite.h>
...
@@ -26,15 +26,15 @@ MatrixWorkspace_sptr createWorkspace(const HistogramX &xData,
...
@@ -26,15 +26,15 @@ MatrixWorkspace_sptr createWorkspace(const HistogramX &xData,
}
}
class
SortXAxisTest
:
public
CxxTest
::
TestSuite
{
class
SortXAxisTest
:
public
CxxTest
::
TestSuite
{
// This pair of boilerplate methods prevent the suite being created statically
// This pair of boilerplate methods prevent the suite being created statically
// This means the constructor isn't called when running other tests
// This means the constructor isn't called when running other tests
static
SortXAxisTest
*
createSuite
()
{
return
new
SortXAxisTest
();
}
static
SortXAxisTest
*
createSuite
()
{
return
new
SortXAxisTest
();
}
static
void
destroySuite
(
SortXAxisTest
*
suite
)
{
delete
suite
;
}
static
void
destroySuite
(
SortXAxisTest
*
suite
)
{
delete
suite
;
}
void
testXAscending
(){
void
testXAscending
()
{
std
::
vector
<
double
>
xData
=
{
1
,
2
,
3
};
std
::
vector
<
double
>
xData
=
{
1
,
2
,
3
};
std
::
vector
<
double
>
yData
=
{
1
,
2
,
3
};
std
::
vector
<
double
>
yData
=
{
1
,
2
,
3
};
std
::
vector
<
double
>
eData
=
{
1
,
2
,
3
};
std
::
vector
<
double
>
eData
=
{
1
,
2
,
3
};
MatrixWorkspace_sptr
unsortedws
=
createWorkspace
(
xData
,
yData
,
eData
);
MatrixWorkspace_sptr
unsortedws
=
createWorkspace
(
xData
,
yData
,
eData
);
...
@@ -42,26 +42,24 @@ class SortXAxisTest : public CxxTest::TestSuite {
...
@@ -42,26 +42,24 @@ class SortXAxisTest : public CxxTest::TestSuite {
alg
.
setProperty
(
"InputWorkspacd"
,
"unsortedws"
);
alg
.
setProperty
(
"InputWorkspacd"
,
"unsortedws"
);
alg
.
setProperty
(
"OutputWorkspace"
,
"sortedws"
);
alg
.
setProperty
(
"OutputWorkspace"
,
"sortedws"
);
alg
.
execute
();
alg
.
execute
();
MatrixWorkspace_sptr
sortedws
=
MatrixWorkspace_sptr
sortedws
=
}
}
void
testXDescending
(){}
void
testXDescending
()
{}
void
testOnMultipleSpectrum
(){}
void
testOnMultipleSpectrum
()
{}
void
testSortsXHistogramAscending
(){}
void
testSortsXHistogramAscending
()
{}
void
testSortsXHistogramDescending
(){}
void
testSortsXHistogramDescending
()
{}
void
testSortXWorksChild
(){}
void
testSortXWorksChild
()
{}
void
testDxMultipleSpectrum
(){}
void
testDxMultipleSpectrum
()
{}
void
testDxHistogramAscending
(){}
void
testDxHistogramAscending
()
{}
void
testSortDescending
(){}
void
testSortDescending
()
{}
};
};
#endif
/*MANTID_ALGORITHMS_SORTXAXISTEST_H_*/
#endif
/*MANTID_ALGORITHMS_SORTXAXISTEST_H_*/
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment