Exemplo n.º 1
0
int main (int argc, char ** argv)
{
	printf ("FILECHECK	   TESTS\n");
	printf ("==================\n\n");

	init (argc, argv);
	testBom ("filecheck/BOMFILE", 0, 1);
	testBom ("filecheck/BOMFILE", 1, (-1));
	testBom ("filecheck/NOBOMFILE", 0, 1);
	testBom ("filecheck/NOBOMFILE", 1, 1);
	testNull ("filecheck/NULLBYTE", 0, 1);
	testNull ("filecheck/NULLBYTE", 1, (-1));
	testNull ("filecheck/NONULLBYTE", 0, 1);
	testNull ("filecheck/NONULLBYTE", 1, 1);
	testLEConsistency ("filecheck/inconsistent", 0, 1);
	testLEConsistency ("filecheck/inconsistent", 1, (-1));
	testLEcrlf ("filecheck/valid1", 1, 1);
	testLEcrlf ("filecheck/invalid", 1, (-1));

	testEncoding ("filecheck/utf.txt", 1, 1);
	testEncoding ("filecheck/iso.txt", 1, (-1));

	printf ("\ntestmod_filecheck RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);

	return nbError;
}
Exemplo n.º 2
0
int
main (int argc, char *argv[])
{
  int failureCount = 0;
  int i;

  GNUNET_log_setup ("test-crypto-hash", "WARNING", NULL);
  for (i = 0; i < 10; i++)
    failureCount += testEncoding ();
  failureCount += testArithmetic ();
  failureCount += testFileHash ();
  if (failureCount != 0)
    return 1;
  return 0;
}