Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Florian Uhlig
cbmroot
Commits
9ad55774
Commit
9ad55774
authored
Jun 07, 2021
by
Administrator
Browse files
Use type_traits functions to do some checks
parent
34cce724
Changes
3
Hide whitespace changes
Inline
Side-by-side
core/data/sts/CbmStsDigi.h
View file @
9ad55774
...
...
@@ -161,7 +161,7 @@ public:
private:
friend
class
boost
::
serialization
::
access
;
//
friend class boost::serialization::access;
static
constexpr
int
kNumAdcBits
=
5
;
...
...
core/data/test/CMakeLists.txt
View file @
9ad55774
...
...
@@ -107,7 +107,7 @@ Set(CbmClusterSources
)
CreateGTestExeAndAddTest
(
_GTestCbmCluster
"
${
INCLUDE_DIRECTORIES
}
"
"
${
LINK_DIRECTORIES
}
"
"
${
CbmClusterSources
}
"
"
${
DEPENDENCIES
}
"
"_GTestCbm
Digi
"
)
"
${
CbmClusterSources
}
"
"
${
DEPENDENCIES
}
"
"_GTestCbm
Match
"
)
Set
(
CbmHitSources
${
CBMDATA_DIR
}
/CbmHit.cxx
...
...
core/data/test/sts/_GTestCbmStsDigi.cxx
View file @
9ad55774
...
...
@@ -14,6 +14,7 @@
static
const
int32_t
kTestAddress
=
CbmStsAddress
::
GetAddress
(
5
,
6
,
1
,
8
,
0
,
0
,
1
);
#include
<type_traits>
TEST
(
_GTestCbmStsDigi
,
CheckDefaultConstructor
)
{
...
...
@@ -158,4 +159,15 @@ TEST(_GTestCbmStsDigi, CheckSerialization)
boost
::
archive
::
binary_iarchive
inArchive
(
s
);
inArchive
>>
read
;
compareStsDigiDataMembers
(
read
,
kTestAddress
,
23
,
42
,
ECbmModuleId
::
kSts
,
987654321
);
TEST
(
_GTestCbmStsDigi
,
CheckPOD
)
{
// #include <iostream>
// std::cout << std::boolalpha;
// std::cout << std::is_pod<A>::value << '\n';
// std::cout << std::is_pod<B>::value << '\n';
// std::cout << std::is_pod<C>::value << '\n';
EXPECT_EQ
(
true
,
std
::
is_default_constructible
<
CbmStsDigi
>::
value
);
// EXPECT_EQ(true , std::is_trivial<CbmStsDigi>::value );
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment