Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • CTA-LAPP/PHOENIX_LIBS2/PhoenixSocket
1 result
Show changes
Commits on Source (2)
......@@ -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(){
......