Merge pull request #2048 from kuhnmarek/MK3_prusastat_test

Prusa statistics test shows only errors
This commit is contained in:
DRracer 2019-07-26 14:27:45 +02:00 committed by GitHub
commit be598687d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,7 @@
#include "catch.hpp"
#include <iostream>
static bool VERBOSE_MODE = false; // If true - output additional info to std:cout
std::string itostr3(int i){
return std::to_string(i);
@ -652,10 +653,12 @@ int SERIALS_COMPARE(){
new_code::SERIAL_BUFFER.pop_back();
}
std::cout << "Comparing: \n";
std::cout << old_code::SERIAL_BUFFER << "\n";
std::cout << new_code::SERIAL_BUFFER << "\n";
if(VERBOSE_MODE){
std::cout << "Comparing: \n";
std::cout << old_code::SERIAL_BUFFER << "\n";
std::cout << new_code::SERIAL_BUFFER << "\n";
}
return old_code::SERIAL_BUFFER.compare(new_code::SERIAL_BUFFER);
}
@ -726,7 +729,10 @@ TEST_CASE("Prusa_statistics test", "[prusa_stats]")
int size = sizeof(test_codes)/sizeof(test_codes[0]);
for(int i = 0; i < size; i++){
std::cout << "Testing prusa_statistics(" << std::to_string(i) << ")\n";
if(VERBOSE_MODE){
std::cout << "Testing prusa_statistics(" << std::to_string(i) << ")\n";
}
switch(i)
{