~bkerensa/ubuntu/raring/valgrind/merge-from-deb

« back to all changes in this revision

Viewing changes to memcheck/tests/str_tester.c

  • Committer: Bazaar Package Importer
  • Author(s): Andrés Roldán
  • Date: 2008-06-13 02:31:40 UTC
  • mto: (1.4.1 upstream) (2.2.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: james.westby@ubuntu.com-20080613023140-iwk33rz9rhvfkr96
Import upstream version 3.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
463
463
   }
464
464
}
465
465
 
 
466
#if !defined(_AIX)
466
467
static void
467
468
test_strchrnul (void)
468
469
{
496
497
      }
497
498
   }
498
499
}
 
500
#endif /* !defined(_AIX) */
499
501
 
 
502
#if !defined(_AIX)
500
503
static void
501
504
test_rawmemchr (void)
502
505
{
523
526
      }
524
527
   }
525
528
}
 
529
#endif /* !defined(_AIX) */
526
530
 
527
531
static void
528
532
test_index (void)
570
574
   }
571
575
}
572
576
 
 
577
#if !defined(_AIX)
573
578
static void
574
579
test_memrchr (void)
575
580
{
615
620
    }
616
621
  }
617
622
}
 
623
#endif /* !defined(_AIX) */
618
624
 
619
625
static void
620
626
test_rindex (void)
890
896
  equal(one+4, "c", 50);
891
897
 
892
898
  {
 
899
#   if !defined(_AIX)
893
900
    char text[] = "This,is,a,test";
894
901
    char *list = strdupa (text);
895
902
    equal (strsep (&list, ","), "This", 51);
897
904
    equal (strsep (&list, ","), "a", 53);
898
905
    equal (strsep (&list, ","), "test", 54);
899
906
    check (strsep (&list, ",") == NULL, 55);
 
907
#   endif
900
908
  }
901
909
 
902
910
  cp = strcpy(one, "a,b, c,, ,d,");
1049
1057
    }
1050
1058
}
1051
1059
 
 
1060
#if !defined(_AIX)
1052
1061
static void
1053
1062
test_mempcpy (void)
1054
1063
{
1085
1094
      equal (two, "hi there", 12 + (i * 6));
1086
1095
    }
1087
1096
}
 
1097
#endif /* !defined(_AIX) */
1088
1098
 
1089
1099
static void
1090
1100
test_memmove (void)
1390
1400
  /* strchr.  */
1391
1401
  test_strchr ();
1392
1402
 
 
1403
# if !defined(_AIX)
1393
1404
  /* strchrnul.  */
1394
1405
  test_strchrnul ();
 
1406
# endif
1395
1407
 
 
1408
# if !defined(_AIX)
1396
1409
  /* rawmemchr.  */
1397
1410
  test_rawmemchr ();
 
1411
# endif
1398
1412
 
1399
1413
  /* index - just like strchr.  */
1400
1414
  test_index ();
1402
1416
  /* strrchr.  */
1403
1417
  test_strrchr ();
1404
1418
 
 
1419
# if !defined(_AIX)
1405
1420
  /* memrchr.  */
1406
1421
  test_memrchr ();
 
1422
# endif
1407
1423
 
1408
1424
  /* rindex - just like strrchr.  */
1409
1425
  test_rindex ();
1441
1457
  /* memmove - must work on overlap.  */
1442
1458
  test_memmove ();
1443
1459
 
 
1460
# if !defined(_AIX)
1444
1461
  /* mempcpy */
1445
1462
  test_mempcpy ();
 
1463
# endif
1446
1464
 
1447
1465
  /* memccpy.  */
1448
1466
  test_memccpy ();
1479
1497
  else
1480
1498
    {
1481
1499
      status = EXIT_FAILURE;
1482
 
      printf("%Zd errors.\n", errors);
 
1500
      printf("%d errors.\n", (int)errors);
1483
1501
    }
1484
1502
 
1485
1503
  return status;