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
d59cfc75
Commit
d59cfc75
authored
5 years ago
by
Nick Draper
Browse files
Options
Downloads
Patches
Plain Diff
Adjust mock algorithms to work correctly with state changes
parent
d1ac2f84
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Framework/API/test/AlgorithmManagerTest.h
+8
-2
8 additions, 2 deletions
Framework/API/test/AlgorithmManagerTest.h
with
8 additions
and
2 deletions
Framework/API/test/AlgorithmManagerTest.h
+
8
−
2
View file @
d59cfc75
...
...
@@ -82,10 +82,16 @@ public:
int
version
()
const
override
{
return
(
1
);
}
const
std
::
string
category
()
const
override
{
return
(
"Cat1"
);
}
const
std
::
string
summary
()
const
override
{
return
"Test summary"
;
}
// Override method so we can manipulate whether it appears to be running
bool
isRunning
()
const
override
{
return
isRunningFlag
;
}
// Override methods so we can manipulate whether it appears to be running
ExecutionState
executionState
()
const
override
{
return
isRunningFlag
?
ExecutionState
::
Running
:
ExecutionState
::
Finished
;
}
ResultState
resultState
()
const
override
{
return
isRunningFlag
?
ResultState
::
NotFinished
:
ResultState
::
Failed
;
}
void
setIsRunningTo
(
bool
runningFlag
)
{
isRunningFlag
=
runningFlag
;
}
void
cancel
()
override
{
isRunningFlag
=
false
;
}
};
DECLARE_ALGORITHM
(
AlgTest
)
...
...
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