Merge pull request #2048 from kuhnmarek/MK3_prusastat_test
Prusa statistics test shows only errors
This commit is contained in:
commit
be598687d0
@ -8,6 +8,7 @@
|
|||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
static bool VERBOSE_MODE = false; // If true - output additional info to std:cout
|
||||||
|
|
||||||
std::string itostr3(int i){
|
std::string itostr3(int i){
|
||||||
return std::to_string(i);
|
return std::to_string(i);
|
||||||
@ -652,9 +653,11 @@ int SERIALS_COMPARE(){
|
|||||||
new_code::SERIAL_BUFFER.pop_back();
|
new_code::SERIAL_BUFFER.pop_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(VERBOSE_MODE){
|
||||||
std::cout << "Comparing: \n";
|
std::cout << "Comparing: \n";
|
||||||
std::cout << old_code::SERIAL_BUFFER << "\n";
|
std::cout << old_code::SERIAL_BUFFER << "\n";
|
||||||
std::cout << new_code::SERIAL_BUFFER << "\n";
|
std::cout << new_code::SERIAL_BUFFER << "\n";
|
||||||
|
}
|
||||||
|
|
||||||
return old_code::SERIAL_BUFFER.compare(new_code::SERIAL_BUFFER);
|
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]);
|
int size = sizeof(test_codes)/sizeof(test_codes[0]);
|
||||||
|
|
||||||
for(int i = 0; i < size; i++){
|
for(int i = 0; i < size; i++){
|
||||||
|
|
||||||
|
if(VERBOSE_MODE){
|
||||||
std::cout << "Testing prusa_statistics(" << std::to_string(i) << ")\n";
|
std::cout << "Testing prusa_statistics(" << std::to_string(i) << ")\n";
|
||||||
|
}
|
||||||
|
|
||||||
switch(i)
|
switch(i)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user