예제 #1
0
/* Tests retrieving the library version
 * Returns 1 if successful or 0 if not
 */
int csplit_test_get_version(
     void )
{
	const char *version_string = NULL;
	int result                 = 0;

	version_string = libcsplit_get_version();

	result = libcstring_narrow_string_compare(
	          version_string,
	          LIBCSPLIT_VERSION_STRING,
	          9 );

	if( result != 0 )
	{
		return( 0 );
	}
	return( 1 );
}
예제 #2
0
/* Tests the libcsplit_get_version function
 * Returns 1 if successful or 0 if not
 */
int csplit_test_get_version(
     void )
{
	const char *version_string = NULL;
	int result                 = 0;

	version_string = libcsplit_get_version();

	result = narrow_string_compare(
	          version_string,
	          LIBCSPLIT_VERSION_STRING,
	          9 );

	CSPLIT_TEST_ASSERT_EQUAL_INT(
	 "result",
	 result,
	 0 );

	return( 1 );

on_error:
	return( 0 );
}