Fixed allocate tests to expect a return of 0 upon failure.