From ce61895f3ef6c256122419ae9f46a2ed5a5f14cb Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Mon, 23 Sep 2002 21:08:51 +0000 Subject: [PATCH] We now support MIME strings of maximal length B_MIME_TYPE_LENGTH including the null only. Adjusted the tests accordingly. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1132 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tests/kits/storage/MimeTypeTest.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tests/kits/storage/MimeTypeTest.cpp b/src/tests/kits/storage/MimeTypeTest.cpp index 66205a100e..d73db507f9 100644 --- a/src/tests/kits/storage/MimeTypeTest.cpp +++ b/src/tests/kits/storage/MimeTypeTest.cpp @@ -2746,7 +2746,13 @@ static void init_long_types(char *notTooLongType, char *tooLongType) { +// R5: Allows buffer sizes up to `B_MIME_TYPE_LENGTH + 1' +// OBOS: We stay consistent: `*_LENGTH' defines the buffer size. +#ifdef TEST_R5 const int notTooLongLength = B_MIME_TYPE_LENGTH; +#else + const int notTooLongLength = B_MIME_TYPE_LENGTH - 1; +#endif const int tooLongLength = notTooLongLength + 1; strcpy(notTooLongType, "image/"); memset(notTooLongType + strlen(notTooLongType), 'a',