Return-Path: X-Original-To: apmail-apr-commits-archive@www.apache.org Delivered-To: apmail-apr-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CDC0017A3B for ; Fri, 13 Mar 2015 22:53:20 +0000 (UTC) Received: (qmail 98603 invoked by uid 500); 13 Mar 2015 22:53:20 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 98555 invoked by uid 500); 13 Mar 2015 22:53:20 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 98546 invoked by uid 99); 13 Mar 2015 22:53:20 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Mar 2015 22:53:20 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 836E2AC0163 for ; Fri, 13 Mar 2015 22:53:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1666602 - /apr/apr/trunk/test/testskiplist.c Date: Fri, 13 Mar 2015 22:53:20 -0000 To: commits@apr.apache.org From: ylavic@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150313225320.836E2AC0163@hades.apache.org> Author: ylavic Date: Fri Mar 13 22:53:19 2015 New Revision: 1666602 URL: http://svn.apache.org/r1666602 Log: skiplist: sync tests with 1.5.x. Modified: apr/apr/trunk/test/testskiplist.c Modified: apr/apr/trunk/test/testskiplist.c URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testskiplist.c?rev=1666602&r1=1666601&r2=1666602&view=diff ============================================================================== --- apr/apr/trunk/test/testskiplist.c (original) +++ apr/apr/trunk/test/testskiplist.c Fri Mar 13 22:53:19 2015 @@ -249,17 +249,17 @@ typedef struct elem { static void add_int_to_skiplist(apr_skiplist *list, int n){ int* a = apr_skiplist_alloc(list, sizeof(int)); *a = n; - apr_skiplist_add(list, a); + apr_skiplist_insert(list, a); } static void add_elem_to_skiplist(apr_skiplist *list, elem n){ elem* a = apr_skiplist_alloc(list, sizeof(elem)); *a = n; - apr_skiplist_add(list, a); + apr_skiplist_insert(list, a); } static int comp(void *a, void *b){ - return *((int*) a) - *((int*) b); + return (*((int*) a) < *((int*) b)) ? -1 : 1; } static int compk(void *a, void *b){ @@ -267,7 +267,7 @@ static int compk(void *a, void *b){ } static int scomp(void *a, void *b){ - return ((elem*) a)->a - ((elem*) b)->a; + return (((elem*) a)->a < ((elem*) b)->a) ? -1 : 1; } static int scompk(void *a, void *b){