Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
PhoenixSocket
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
CTA-LAPP
PHOENIX_LIBS2
PhoenixSocket
Commits
6af98a4c
Commit
6af98a4c
authored
3 weeks ago
by
Thibaut OPRINSEN
Browse files
Options
Downloads
Patches
Plain Diff
add checkvalue function for DataStreamType
parent
e3bce967
No related branches found
Branches containing commit
No related tags found
1 merge request
!4
add checkvalue function for DataStreamType
Pipeline
#392087
passed
3 weeks ago
Stage: BuildTestinstall
Stage: DocCoverage
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/PMockBackend.cpp
+24
-0
24 additions, 0 deletions
src/PMockBackend.cpp
with
24 additions
and
0 deletions
src/PMockBackend.cpp
+
24
−
0
View file @
6af98a4c
...
...
@@ -9,6 +9,30 @@
#include
"data_stream_check_value.h"
#include
"PMockBackend.h"
///Check given value compare to the reference size
/** @param testName : name of the current test
* @param vecData : vector of data to be checked
* @param vecReferenceData : vector of reference data
* @return true on success, false otherwise
*/
template
<
>
bool
checkValue
<
DataStreamType
>
(
const
std
::
string
&
testName
,
const
std
::
vector
<
DataStreamType
>
&
vecData
,
const
std
::
vector
<
DataStreamType
>
&
vecReferenceData
){
if
(
vecData
.
size
()
!=
vecReferenceData
.
size
()){
std
::
cout
<<
"checkValue<DataStreamType> : "
<<
testName
<<
" => vecData.size("
<<
vecData
.
size
()
<<
") != vecReferenceData.size("
<<
vecReferenceData
.
size
()
<<
")"
<<
std
::
endl
;
return
false
;
}
bool
b
(
true
);
for
(
size_t
i
(
0lu
);
i
<
vecData
.
size
()
&&
b
;
++
i
){
b
&=
vecData
[
i
]
==
vecReferenceData
[
i
];
if
(
!
b
){
std
::
cout
<<
"checkValue<DataStreamType> : "
<<
testName
<<
" => vecData["
<<
i
<<
"]("
<<
(
int
)
vecData
[
i
]
<<
") != vecReferenceData["
<<
i
<<
"]("
<<
(
int
)
vecReferenceData
[
i
]
<<
")"
<<
std
::
endl
;
}
}
// if(b){std::cout << "checkValue : "<<testName<<" => Ok"<<std::endl;}
// else{std::cout << "checkValue : "<<testName<<" => WRONG!!!!"<<std::endl;}
return
b
;
}
///Default constructor of PMockBackend
PMockBackend
::
PMockBackend
(){
...
...
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