@@ -42,43 +42,43 @@ OFOutOfRangeException) \ \ puts("Trying to add something after that error..."); \ p = [a allocWithSize: 4096]; \ memset(p, 255, 4096); \ - [a add: p]; \ - if (!memcmp([a last], p, 4096)) \ - puts("[a last] matches with p!"); \ + [a addItem: p]; \ + if (!memcmp([a lastItem], p, 4096)) \ + puts("[a lastItem] matches with p!"); \ else { \ - puts("[a last] does not match p!"); \ + puts("[a lastItem] does not match p!"); \ abort(); \ } \ [a freeMem: p]; \ \ puts("Adding more data..."); \ q = [a allocWithSize: 4096]; \ memset(q, 42, 4096); \ - [a add: q]; \ - if (!memcmp([a last], q, 4096)) \ - puts("[a last] matches with q!"); \ + [a addItem: q]; \ + if (!memcmp([a lastItem], q, 4096)) \ + puts("[a lastItem] matches with q!"); \ else { \ - puts("[a last] does not match q!"); \ + puts("[a lastItem] does not match q!"); \ abort(); \ } \ [a freeMem: q]; \ \ puts("Adding multiple items at once..."); \ p = [a allocWithSize: 8192]; \ memset(p, 64, 8192); \ [a addNItems: 2 \ fromCArray: p]; \ - if (!memcmp([a last], [a itemAtIndex: [a count] - 2], 4096) && \ + if (!memcmp([a lastItem], [a itemAtIndex: [a count] - 2], 4096) && \ !memcmp([a itemAtIndex: [a count] - 2], p, 4096)) \ - puts("[a last], [a itemAtIndex: [a count] - 2] and p " \ - "match!"); \ + puts("[a lastItem], [a itemAtIndex: [a count] - 2] " \ + "and p match!"); \ else { \ - puts("[a last], [a itemAtIndex: [a count] - 2] and p " \ - "do not match!"); \ + puts("[a lastItem], [a itemAtIndex: [a count] - 2] " \ + "and p do not match!"); \ abort(); \ } \ [a freeMem: p]; \ \ i = [a count]; \ @@ -101,12 +101,12 @@ \ puts("Creating new array and using it to build a string..."); \ a = [[type alloc] initWithItemSize: 1]; \ \ for (i = 0; i < strlen(str); i++) \ - [a add: (void*)&str[i]]; \ - [a add: ""]; \ + [a addItem: (void*)&str[i]]; \ + [a addItem: ""]; \ \ if (!strcmp([a data], str)) \ puts("Built string matches!"); \ else { \ puts("Built string does not match!"); \ @@ -142,11 +142,11 @@ if ([x hash] != [y hash]) { puts("FAIL 2!"); return 1; } - [x add: "x"]; + [x addItem: "x"]; if ([x isEqual: y]) { puts("FAIL 3!"); return 1; } [pool releaseObjects]; @@ -167,11 +167,11 @@ if ([x compare: y]) { puts("FAIL 5!"); return 1; } - [y add: "de"]; + [y addItem: "de"]; if ([x compare: y] != -100) { puts("FAIL 6!"); return 1; }