Reverting unintended commit

This commit is contained in:
Erik Ekman 2007-02-05 19:47:03 +00:00
parent 9355cd7829
commit c58df44dc6

View file

@ -25,21 +25,23 @@
START_TEST(test_encoding_base32) START_TEST(test_encoding_base32)
{ {
char temp[256]; char temp[256];
char end[256]; char *start = "HELLOTEST";
char *start = "1HELLOTEST"; char *out = "1HELLOTEST";
char *end;
char *tempend; char *tempend;
int len; int codedlength;
memset(temp, 0, sizeof(temp)); memset(temp, 0, sizeof(temp));
memset(end, 0, sizeof(end)); end = malloc(16);
memset(end, 0, 16);
encode_data(start, 9, 256, temp); codedlength = encode_data(start, 9, 256, temp);
tempend = temp + strlen(temp); tempend = temp + strlen(temp);
printf("%d '%s'\n", strlen(temp), temp); decode_data(end, 16, temp, tempend);
len = decode_data(end, sizeof(end), temp, tempend);
printf("%d %d '%s'\n", len, strlen(end), end); fail_unless(strcmp(out, end) == 0, NULL);
fail_unless(strcmp(start, end) == 0, NULL);
free(end);
} }
END_TEST END_TEST