示例#1
0
int
main (void)
{
    int i = 0;
    bgp_master_init ();
    master = bm->master;
    bgp_option_set (BGP_OPT_NO_LISTEN);
    bgp_attr_init ();

    while (test_segments[i].name)
    {
        printf ("test %u\n", i);
        parse_test (&test_segments[i]);
        empty_prepend_test (&test_segments[i++]);
    }

    i = 0;
    while (prepend_tests[i].test1)
    {
        printf ("prepend test %u\n", i);
        prepend_test (&prepend_tests[i++]);
    }

    i = 0;
    while (aggregate_tests[i].test1)
    {
        printf ("aggregate test %u\n", i);
        aggregate_test (&aggregate_tests[i++]);
    }

    i = 0;

    while (reconcile_tests[i].test1)
    {
        printf ("reconcile test %u\n", i);
        as4_reconcile_test (&reconcile_tests[i++]);
    }

    i = 0;

    cmp_test();

    i = 0;

    empty_get_test();

    i = 0;

    while (aspath_tests[i].desc)
    {
        printf ("aspath_attr test %d\n", i);
        attr_test (&aspath_tests[i++]);
    }

    printf ("failures: %d\n", failed);
    printf ("aspath count: %ld\n", aspath_count());

    return (failed + aspath_count());
}
示例#2
0
int
main (void)
{
  int i = 0;
  aspath_init();
  while (test_segments[i].name)
    {
      parse_test (&test_segments[i]);
      empty_prepend_test (&test_segments[i++]);
    }
  
  i = 0;
  while (prepend_tests[i].test1)
    prepend_test (&prepend_tests[i++]);
  
  i = 0;
  while (aggregate_tests[i].test1)
    aggregate_test (&aggregate_tests[i++]);
  
  i = 0;
  
  while (reconcile_tests[i].test1)
    as4_reconcile_test (&reconcile_tests[i++]);
  
  i = 0;
  
  cmp_test();
  
  i = 0;
  
  empty_get_test();
  
  printf ("failures: %d\n", failed);
  printf ("aspath count: %ld\n", aspath_count());
  
  return (failed + aspath_count());
}