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
885088de
Commit
885088de
authored
11 years ago
by
Gigg, Martyn Anthony
Browse files
Options
Downloads
Patches
Plain Diff
Avoid duplicate Algorithm registration in API tests. Refs #7263
parent
483acce7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Mantid/Framework/API/test/AlgorithmTest.h
+16
-16
16 additions, 16 deletions
Code/Mantid/Framework/API/test/AlgorithmTest.h
with
16 additions
and
16 deletions
Code/Mantid/Framework/API/test/AlgorithmTest.h
+
16
−
16
View file @
885088de
...
...
@@ -91,13 +91,13 @@ public:
};
class
WorkspaceAlgorithm
:
public
Algorithm
class
Stubbed
WorkspaceAlgorithm
:
public
Algorithm
{
public:
WorkspaceAlgorithm
()
:
Algorithm
()
{}
virtual
~
WorkspaceAlgorithm
()
{}
Stubbed
WorkspaceAlgorithm
()
:
Algorithm
()
{}
virtual
~
Stubbed
WorkspaceAlgorithm
()
{}
const
std
::
string
name
()
const
{
return
"WorkspaceAlgorithm"
;}
const
std
::
string
name
()
const
{
return
"
Stubbed
WorkspaceAlgorithm"
;}
int
version
()
const
{
return
1
;}
const
std
::
string
category
()
const
{
return
"Cat;Leopard;Mink"
;}
void
init
()
...
...
@@ -127,17 +127,17 @@ public:
setProperty
(
"OutputWorkspace2"
,
out2
);
}
};
DECLARE_ALGORITHM
(
WorkspaceAlgorithm
)
DECLARE_ALGORITHM
(
Stubbed
WorkspaceAlgorithm
)
class
WorkspaceAlgorithm2
:
public
Algorithm
class
Stubbed
WorkspaceAlgorithm2
:
public
Algorithm
{
public:
WorkspaceAlgorithm2
()
:
Algorithm
()
{}
virtual
~
WorkspaceAlgorithm2
()
{}
Stubbed
WorkspaceAlgorithm2
()
:
Algorithm
()
{}
virtual
~
Stubbed
WorkspaceAlgorithm2
()
{}
const
std
::
string
name
()
const
{
return
"WorkspaceAlgorithm2"
;}
int
version
()
const
{
return
1
;}
const
std
::
string
name
()
const
{
return
"
Stubbed
WorkspaceAlgorithm2"
;}
int
version
()
const
{
return
2
;}
const
std
::
string
category
()
const
{
return
"Cat;Leopard;Mink"
;}
void
init
()
{
...
...
@@ -148,14 +148,14 @@ public:
{
}
};
DECLARE_ALGORITHM
(
WorkspaceAlgorithm2
)
DECLARE_ALGORITHM
(
Stubbed
WorkspaceAlgorithm2
)
class
AlgorithmWithValidateInputs
:
public
Algorithm
{
public:
AlgorithmWithValidateInputs
()
:
Algorithm
()
{}
virtual
~
AlgorithmWithValidateInputs
()
{}
const
std
::
string
name
()
const
{
return
"WorkspaceAlgorithm2"
;}
const
std
::
string
name
()
const
{
return
"
Stubbed
WorkspaceAlgorithm2"
;}
int
version
()
const
{
return
1
;}
const
std
::
string
category
()
const
{
return
"Cat;Leopard;Mink"
;}
void
init
()
...
...
@@ -500,7 +500,7 @@ public:
boost
::
shared_ptr
<
WorkspaceTester
>
ws
(
new
WorkspaceTester
());
AnalysisDataService
::
Instance
().
addOrReplace
(
"ws"
+
Strings
::
toString
(
i
),
ws
);
}
WorkspaceAlgorithm
alg
;
Stubbed
WorkspaceAlgorithm
alg
;
alg
.
initialize
();
alg
.
setPropertyValue
(
"InputWorkspace1"
,
in1
);
alg
.
setPropertyValue
(
"InputWorkspace2"
,
in2
);
...
...
@@ -542,7 +542,7 @@ public:
// Get a write lock.
WriteLock
_lock
(
*
ws1
);
// The algorithm would hang waiting for the write-lock to release if the property were locking.
WorkspaceAlgorithm2
alg
;
Stubbed
WorkspaceAlgorithm2
alg
;
alg
.
initialize
();
alg
.
setPropertyValue
(
"NonLockingInputWorkspace"
,
"ws1"
);
alg
.
execute
();
...
...
@@ -552,7 +552,7 @@ public:
// Acquire a scoped read-lock on ws1.
ReadLock
_lock
(
*
ws1
);
// The algo would lock up when trying to WRITE-lock the workspace again
WorkspaceAlgorithm2
alg
;
Stubbed
WorkspaceAlgorithm2
alg
;
alg
.
initialize
();
alg
.
setPropertyValue
(
"NonLockingOutputWorkspace"
,
"ws1"
);
alg
.
execute
();
...
...
@@ -608,7 +608,7 @@ public:
makeWorkspaceGroup
(
group2
,
contents2
);
makeWorkspaceGroup
(
group3
,
contents3
);
WorkspaceAlgorithm
alg
;
Stubbed
WorkspaceAlgorithm
alg
;
alg
.
initialize
();
alg
.
setPropertyValue
(
"InputWorkspace1"
,
group1
);
alg
.
setPropertyValue
(
"InputWorkspace2"
,
group2
);
...
...
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