Skip to content
Snippets Groups Projects
Commit e69b0bd5 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

TEST: add specific test for hexa pointers

parent c9eebafd
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ set(OTBTestKernelTests
otbCompareAsciiTests3.cxx
otbCompareAsciiTests4.cxx
otbCompareAsciiTests5.cxx
otbCompareAsciiTests6.cxx
otbCompareAsciiTestScientificNotation.cxx
otbCompareAsciiTests.cxx
otbCompareAsciiTestsEpsilon3_WhiteSpace.cxx
......@@ -114,3 +115,11 @@ otb_add_test(NAME tsTvCompareAsciiepsilon3_WhiteSpaceKO COMMAND otbTestKernelTes
${TEMP}/tsTvCompareAsciiEpsilon3_TestKO.txt
)
set_property(TEST tsTvCompareAsciiepsilon3_WhiteSpaceKO PROPERTY WILL_FAIL true)
otb_add_test(NAME tsTvCompareAscii6 COMMAND otbTestKernelTestDriver
--compare-ascii ${EPSILON_3}
${TEMP}/tsTvCompareAscii6_ref.txt
${TEMP}/tsTvCompareAscii6_test.txt
otbCompareAsciiTests6
${TEMP}/tsTvCompareAscii6_ref.txt
${TEMP}/tsTvCompareAscii6_test.txt
)
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include <iostream>
#include <fstream>
#include "otbMacro.h"
int otbCompareAsciiTests6(int argc, char * argv[])
{
if (argc != 3)
{
std::cerr << "Usage: " << argv[0];
std::cerr << " referenceFile testFile" << std::endl;
return EXIT_FAILURE;
}
std::ofstream fileRef;
fileRef.open(argv[1]);
fileRef << "ImageRegion (0x7fff1639a860)\n";
fileRef << "0x7fff1639a860\n";
fileRef << "0.142355\n";
fileRef.close();
std::ofstream fileTest;
fileTest.open(argv[2]);
fileTest << "ImageRegion (00C3F798)\n";
fileTest << "000000001AF56D20\n";
fileTest << "0.142356\n";
fileTest.close();
return EXIT_SUCCESS;
}
......@@ -5,6 +5,7 @@ void RegisterTests()
REGISTER_TEST(otbCompareAsciiTests3);
REGISTER_TEST(otbCompareAsciiTests4);
REGISTER_TEST(otbCompareAsciiTests5);
REGISTER_TEST(otbCompareAsciiTests6);
REGISTER_TEST(otbCompareAsciiTestScientificNotation);
REGISTER_TEST(otbCompareAsciiTests);
REGISTER_TEST(otbCompareAsciiTestsEpsilon3_WhiteSpace);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment