Tests are running again

Revised Readme.md

Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>
This commit is contained in:
Paulchen-Panther
2019-07-09 23:07:31 +02:00
parent d40aa71aa9
commit ff93dd3b25
15 changed files with 116 additions and 117 deletions

View File

@@ -53,6 +53,7 @@ int TC_NO_BORDER()
std::cerr << "Failed to correctly detect no border" << std::endl;
result = -1;
}
else std::cout << "Correctly detected no border" << std::endl;
}
return result;
@@ -67,11 +68,12 @@ int TC_TOP_BORDER()
{
Image<ColorRgb> image = createImage(64, 64, 12, 0);
BlackBorder border = detector.process(image);
if (border.unknown != false && border.horizontalSize != 12 && border.verticalSize != 0)
if (border.unknown != false && border.horizontalSize == 12 && border.verticalSize != 0)
{
std::cerr << "Failed to correctly detect horizontal border with correct size" << std::endl;
result = -1;
}
else std::cout << "Correctly detected horizontal border with correct size" << std::endl;
}
return result;
@@ -86,11 +88,12 @@ int TC_LEFT_BORDER()
{
Image<ColorRgb> image = createImage(64, 64, 0, 12);
BlackBorder border = detector.process(image);
if (border.unknown != false && border.horizontalSize != 0 && border.verticalSize != 12)
if (border.unknown != false && border.horizontalSize != 0 && border.verticalSize == 12)
{
std::cerr << "Failed to detected vertical border with correct size" << std::endl;
std::cerr << "Failed to correctly detect vertical border with correct size" << std::endl;
result = -1;
}
else std::cout << "Correctly detected vertical border with correct size" << std::endl;
}
return result;
@@ -105,11 +108,12 @@ int TC_DUAL_BORDER()
{
Image<ColorRgb> image = createImage(64, 64, 12, 12);
BlackBorder border = detector.process(image);
if (border.unknown != false && border.horizontalSize != 12 && border.verticalSize != 12)
if (border.unknown != false && border.horizontalSize == 12 && border.verticalSize == 12)
{
std::cerr << "Failed to detected two-sided border" << std::endl;
std::cerr << "Failed to correctly detect two-sided border" << std::endl;
result = -1;
}
else std::cout << "Correctly detected two-sided border" << std::endl;
}
return result;
}
@@ -125,9 +129,10 @@ int TC_UNKNOWN_BORDER()
BlackBorder border = detector.process(image);
if (border.unknown != true)
{
std::cerr << "Failed to detected unknown border" << std::endl;
std::cerr << "Failed to correctly detect unknown border" << std::endl;
result = -1;
}
else std::cout << "Correctly detected unknown border" << std::endl;
}
return result;
}