* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* @brief command line tool for PLATO ICU/RDCU compression/decompression
* @see README.md
* @see Data Compression User Manual PLATO-UVIE-PL-UM-0001
* @brief unit tests for cmp_tool_lib.c
*/
#include<stdio.h>
...
...
@@ -28,13 +26,14 @@
#include<CUnit/Console.h>
#include"../../include/cmp_tool_lib.h"
#include"../../include/cmp_guess.h"
#define PROGRAM_NAME "cmp_tool"
/* TODO */
/* used to redirect stdout to file */
intfd;
/* TODO */
/* used to redirect stdout to file */
fpos_tpos;
/* @brief The init cmp_tool test suite cleanup functionr. Redirect stdout to
...
...
@@ -172,7 +171,7 @@ void test_read_file8(void)
CU_ASSERT_EQUAL(buf[i],0);
}
}
CU_ASSERT_STRING_EQUAL(s=read_std_err_log(),"cmp_tool: test_read_file8_2.txt: Warning: The file may contain more data than specified by the samples parameter.\n");
CU_ASSERT_STRING_EQUAL(s=read_std_err_log(),"cmp_tool: test_read_file8_2.txt: Warning: The file may contain more data than specified by the samples or cmp_size parameter.\n");
free(s);
/* tests read 0 words in */
...
...
@@ -185,7 +184,7 @@ void test_read_file8(void)
for(i=0;i<33;++i){
CU_ASSERT_EQUAL(buf[i],0);
}
CU_ASSERT_STRING_EQUAL(s=read_std_err_log(),"cmp_tool: test_read_file8_2.txt: Warning: The file may contain more data than specified by the samples parameter.\n");
CU_ASSERT_STRING_EQUAL(s=read_std_err_log(),"cmp_tool: test_read_file8_2.txt: Warning: The file may contain more data than specified by the samples or cmp_size parameter.\n");