April 05
Prof. Ismael H. F. Santos -  ismael@tecgraf.puc-rio.br                                                          2
Framework de testes
nAs vezes para se testar um componente isoladamente é necessários criar um ambiente com características de onde este componente será executado
nex: testar funções mem* do C (como memset)
n
n/* memset: set the first n bytes of s to the byte c */
nvoid *memset(void *s, int c, size_t n) {
n    size_t i;
n    char *p; 
n    p = (char *)s;
n    for (i=0; i<n; i++) p[i] = c;
n    return s;
n}
n// memset(s0 + offset, c, n);
n// memset2(s1 + offset, c, n);
n// compare s0 e s1 byte a byte
n
nComo testar funções do math.h ?