Пример #1
0
int main(int argc, char ** argv)
{
  testBernoulli();
  testCauchy();
  testExponential();
  testGeometric();			       
  testInitialSeed();
  testLogNormal();
  testManualSeed();
  testNormal();
  testRandom();
  testSeed();
  testUniform();

  UnitTest_report();

}
Пример #2
0
int
main ()
{
    testUniform("psyc://foo.tld:4404d/@bar#baz", PSYC_SCHEME_PSYC);
    testUniform("psyc://foo.tld:4404d/#baz", PSYC_SCHEME_PSYC);
    testUniform("psyc://*****:*****@host", PSYC_PARSE_UNIFORM_INVALID_SCHEME);
    testUniform("psyc:host", PSYC_PARSE_UNIFORM_INVALID_SLASHES);
    testUniform("psyc://", PSYC_PARSE_UNIFORM_INVALID_HOST);
    testUniform("psyc://:123/", PSYC_PARSE_UNIFORM_INVALID_HOST);
    testUniform("psyc://host:/~foo", PSYC_PARSE_UNIFORM_INVALID_PORT);
    testUniform("psyc://host:d/~foo", PSYC_PARSE_UNIFORM_INVALID_PORT);
    testUniform("psyc://1234567890abcdef:1g/~foo",
		PSYC_PARSE_UNIFORM_INVALID_TRANSPORT);

    printf("SUCCESS: psyc_uniform_parse passed all tests.\n");
    return 0;
}