From patchwork Wed May 24 15:46:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lu, Hongjiu" X-Patchwork-Id: 20562 Received: (qmail 122575 invoked by alias); 24 May 2017 15:46:58 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 122527 invoked by uid 89); 24 May 2017 15:46:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, NO_DNS_FOR_FROM, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mga03.intel.com X-ExtLoop1: 1 Date: Wed, 24 May 2017 08:46:56 -0700 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] Add memchr tests for n == 0 Message-ID: <20170524154656.GA14807@lucon.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.8.0 (2017-02-23) Any comments? H.J. * string/test-memchr.c (test_main): Add tests for n == 0. --- string/test-memchr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/string/test-memchr.c b/string/test-memchr.c index 669e092..73a93f0 100644 --- a/string/test-memchr.c +++ b/string/test-memchr.c @@ -179,6 +179,10 @@ test_main (void) for (i = 1; i < 8; ++i) { + /* Test n == 0. */ + do_test (i, i, 0, 0, 23); + do_test (i, i, 0, 0, 0); + do_test (0, 16 << i, 2048, 2048, 23); do_test (i, 64, 256, 256, 23); do_test (0, 16 << i, 2048, 2048, 0);