Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
2a4822d4
Commit
2a4822d4
authored
4 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
GUIStandardTest now using checkSimulation
parent
147feaf8
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
Tests/Functional/GUI/GUIStandardTest/GUIStandardTest.cpp
+12
-5
12 additions, 5 deletions
Tests/Functional/GUI/GUIStandardTest/GUIStandardTest.cpp
with
12 additions
and
5 deletions
Tests/Functional/GUI/GUIStandardTest/GUIStandardTest.cpp
+
12
−
5
View file @
2a4822d4
...
@@ -48,15 +48,22 @@ std::unique_ptr<OutputData<double>> domainData(const std::string& /*test_name*/,
...
@@ -48,15 +48,22 @@ std::unique_ptr<OutputData<double>> domainData(const std::string& /*test_name*/,
return
std
::
unique_ptr
<
OutputData
<
double
>>
(
domain_simulation
->
result
().
data
());
return
std
::
unique_ptr
<
OutputData
<
double
>>
(
domain_simulation
->
result
().
data
());
}
}
bool
checkSimulation
(
const
std
::
string
&
name
,
const
Simulation
&
direct_simulation
,
const
double
limit
)
{
const
std
::
unique_ptr
<
OutputData
<
double
>>
domain_data
=
domainData
(
name
,
direct_simulation
);
const
std
::
unique_ptr
<
OutputData
<
double
>>
ref_data
=
direct_simulation
.
result
().
data
();
return
IntensityDataFunctions
::
checkRelativeDifference
(
*
domain_data
,
*
ref_data
,
limit
);
}
}
// namespace
}
// namespace
bool
GUIStandardTest
::
runTest
()
bool
GUIStandardTest
::
runTest
()
{
{
m_reference_simulation
->
runSimulation
();
m_reference_simulation
->
runSimulation
();
const
std
::
unique_ptr
<
OutputData
<
double
>>
ref_data
=
m_reference_simulation
->
result
().
data
();
const
std
::
unique_ptr
<
OutputData
<
double
>>
domain_data
=
domainData
(
m_name
,
*
m_reference_simulation
);
return
IntensityDataFunctions
::
checkRelativeDifference
(
*
domain_data
,
*
ref
_data
,
m_threshold
);
return
checkSimulation
(
m_name
,
*
m_
ref
erence_simulation
,
m_threshold
);
}
}
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