Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
physics_benchmarks
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
benchmarks
physics_benchmarks
Commits
9dfe9233
Commit
9dfe9233
authored
4 years ago
by
Sylvester Joosten
Browse files
Options
Downloads
Patches
Plain Diff
Changed capitalization of Test and related classes to be more consistent with our general style
parent
436c5c0d
No related branches found
Branches containing commit
No related tags found
1 merge request
!17
Aggregate benchmark results
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dvmp/analysis/vm_mass.cxx
+1
-1
1 addition, 1 deletion
dvmp/analysis/vm_mass.cxx
util/benchmark.hh
+7
-7
7 additions, 7 deletions
util/benchmark.hh
util/exception.hh
+3
-3
3 additions, 3 deletions
util/exception.hh
with
11 additions
and
11 deletions
dvmp/analysis/vm_mass.cxx
+
1
−
1
View file @
9dfe9233
...
...
@@ -41,7 +41,7 @@ int vm_mass(const std::string& config_name) {
// create our test definition
// test_tag
eic
::
util
::
t
est
vm_mass_resolution_test
{
eic
::
util
::
T
est
vm_mass_resolution_test
{
{{
"name"
,
fmt
::
format
(
"{}_{}_{}_mass_resolution"
,
test_tag
,
vm_name
,
decay_name
)},
{
"title"
,
...
...
This diff is collapsed.
Click to expand it.
util/benchmark.hh
+
7
−
7
View file @
9dfe9233
...
...
@@ -14,7 +14,7 @@
// Usage Example 1 (single test):
// ==============================
// 1. define our test
// eic::util::
t
est test1{
// eic::util::
T
est test1{
// {{"name", "example_test"},
// {"title", "Example Test"},
// {"description", "This is an example of a test definition"},
...
...
@@ -28,13 +28,13 @@
// Usage Example 2 (multiple tests):
// =================================
// 1. define our tests
// eic::util::
t
est test1{
// eic::util::
T
est test1{
// {{"name", "example_test"},
// {"title", "Example Test"},
// {"description", "This is an example of a test definition"},
// {"quantity", "efficiency"},
// {"target", "1"}}};
// eic::util::
t
est test2{
// eic::util::
T
est test2{
// {{"name", "another_test"},
// {"title", "Another example Test"},
// {"description", "This is a second example of a test definition"},
...
...
@@ -49,8 +49,8 @@
// library
namespace
eic
::
util
{
struct
t
est
_d
efinition
_e
rror
:
exception
{
t
est
_d
efinition
_e
rror
(
std
::
string_view
msg
)
struct
T
est
D
efinition
E
rror
:
exception
{
T
est
D
efinition
E
rror
(
std
::
string_view
msg
)
:
exception
(
msg
,
"test_definition_error"
)
{}
};
...
...
@@ -67,7 +67,7 @@ struct test_definition_error : exception {
// - value: Actual value of <quantity>
// - weight: Weight for this test (this is defaulted to 1.0 if not specified)
// - result: pass/fail/error
struct
t
est
{
struct
T
est
{
test
(
nlohmann
::
json
definition
)
:
json
{
std
::
move
(
definition
)}
{
// initialize with error (as we don't have a value yet)
error
();
...
...
@@ -75,7 +75,7 @@ struct test {
for
(
const
auto
&
field
:
{
"name"
,
"title"
,
"description"
,
"quantity"
,
"target"
,
"value"
,
"result"
})
{
if
(
json
.
find
(
field
)
==
json
.
end
())
{
throw
t
est
_d
efinition
_e
rror
{
throw
T
est
D
efinition
E
rror
{
fmt
::
format
(
"Error in test definition: field '{}' missing"
,
field
)};
}
}
...
...
This diff is collapsed.
Click to expand it.
util/exception.hh
+
3
−
3
View file @
9dfe9233
...
...
@@ -5,14 +5,14 @@
#include
<string>
namespace
eic
::
util
{
class
e
xception
:
public
std
::
exception
{
class
E
xception
:
public
std
::
exception
{
public:
e
xception
(
std
::
string_view
msg
,
std
::
string_view
type
=
"exception"
)
E
xception
(
std
::
string_view
msg
,
std
::
string_view
type
=
"exception"
)
:
msg_
{
msg
},
type_
{
type
}
{}
virtual
const
char
*
what
()
const
throw
()
{
return
msg_
.
c_str
();
}
virtual
const
char
*
type
()
const
throw
()
{
return
type_
.
c_str
();
}
virtual
~
e
xception
()
throw
()
{}
virtual
~
E
xception
()
throw
()
{}
private
:
std
::
string
msg_
;
...
...
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