From patchwork Sun Mar 8 22:52:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 45516 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9C4B4214AE for ; Sun, 8 Mar 2015 22:53:14 +0000 (UTC) Received: by lbdu14 with SMTP id u14sf20480421lbd.3 for ; Sun, 08 Mar 2015 15:53:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=vIm2v1odHtdbIN/6VW4CLQmfgwJwERtaVBE1oX/prHU=; b=FC2PjosSkgwggCxBx3sCjNc4DEbwTPa8FaAiQfWVXx445jWt/y838cH29sLnbVt4NY dnnMA/pyWSaezwsHaPbpt0R1QEX9f2o3aHq//EOj6agvFAzcVtdJgCaWdyOkDQKOmaRg rvzx8M7cWFxMU2EfmyBhh/PPbZLlnvTq4s24HhmaB5oB7dIe+d23UlUWY0rom1G7zD0I OiAruQA++wVz2sUYe56fymOLFwhDx3Q4T3G1YiV1RfmXnk0R/A1yBCDOVIWVKyzLwP+i dUyCm/tjI/vp8U4HEPmEXMDHrY4fFos6ZTFvSA1VyMtFBX4psjMS7q25AjalUxNmjO4m v9Pw== X-Gm-Message-State: ALoCoQkWiJNhxfb5A9zR2nRP88pGvykBWusi952AaHGnm8vXuUo0+K85zomToUPCD2+tjtjtbvWa X-Received: by 10.194.161.194 with SMTP id xu2mr3527124wjb.1.1425855193102; Sun, 08 Mar 2015 15:53:13 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.132 with SMTP id q4ls225847laj.26.gmail; Sun, 08 Mar 2015 15:53:12 -0700 (PDT) X-Received: by 10.152.10.66 with SMTP id g2mr22973149lab.44.1425855192937; Sun, 08 Mar 2015 15:53:12 -0700 (PDT) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id g1si12833794laa.128.2015.03.08.15.53.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Mar 2015 15:53:12 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by labhs14 with SMTP id hs14so67398148lab.1 for ; Sun, 08 Mar 2015 15:53:12 -0700 (PDT) X-Received: by 10.112.185.66 with SMTP id fa2mr22436672lbc.117.1425855192461; Sun, 08 Mar 2015 15:53:12 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp1137196lbj; Sun, 8 Mar 2015 15:53:11 -0700 (PDT) X-Received: by 10.229.35.136 with SMTP id p8mr5148267qcd.4.1425855191167; Sun, 08 Mar 2015 15:53:11 -0700 (PDT) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id 63si16628258qhw.119.2015.03.08.15.53.09 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 08 Mar 2015 15:53:11 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YUk4I-0000jD-F9; Sun, 08 Mar 2015 22:53:06 +0000 Received: from mail-oi0-f54.google.com ([209.85.218.54]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YUk4D-0000iu-7p for lng-odp@lists.linaro.org; Sun, 08 Mar 2015 22:53:01 +0000 Received: by oigh136 with SMTP id h136so26256237oig.1 for ; Sun, 08 Mar 2015 15:52:56 -0700 (PDT) X-Received: by 10.202.212.214 with SMTP id l205mr17822198oig.117.1425855175924; Sun, 08 Mar 2015 15:52:55 -0700 (PDT) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by mx.google.com with ESMTPSA id ku2sm10720711obc.12.2015.03.08.15.52.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 08 Mar 2015 15:52:55 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Sun, 8 Mar 2015 17:52:44 -0500 Message-Id: <1425855170-4191-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: Classification patch Subject: [lng-odp] [PATCHv3 1/7] validation: classification: add unit tests for strong type display functions X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bill.fischofer@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Bill Fischofer Reviewed-by: Mike Holmes Reviewed-by: Balasubramanian Manoharan --- test/validation/classification/odp_classification_basic.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/validation/classification/odp_classification_basic.c b/test/validation/classification/odp_classification_basic.c index ac2fe8e..2d4c2ac 100644 --- a/test/validation/classification/odp_classification_basic.c +++ b/test/validation/classification/odp_classification_basic.c @@ -15,6 +15,7 @@ static void classification_create_cos(void) sprintf(name, "ClassOfService"); cos = odp_cos_create(name); CU_ASSERT_FATAL(cos != ODP_COS_INVALID); + CU_ASSERT(odp_cos_to_u64(cos) != odp_cos_to_u64(ODP_COS_INVALID)); odp_cos_destroy(cos); } @@ -41,6 +42,7 @@ static void classification_create_pmr_match(void) mask = 0xffff; pmr = odp_pmr_create_match(ODP_PMR_TCP_SPORT, &val, &mask, sizeof(val)); CU_ASSERT(pmr != ODP_PMR_INVAL); + CU_ASSERT(odp_pmr_to_u64(pmr) != odp_pmr_to_u64(ODP_PMR_INVAL)); odp_pmr_destroy(pmr); } @@ -54,6 +56,7 @@ static void classification_create_pmr_range(void) pmr = odp_pmr_create_range(ODP_PMR_TCP_SPORT, &val1, &val2, sizeof(val1)); CU_ASSERT(pmr != ODP_PMR_INVAL); + CU_ASSERT(odp_pmr_to_u64(pmr) != odp_pmr_to_u64(ODP_PMR_INVAL)); odp_pmr_destroy(pmr); } @@ -132,6 +135,8 @@ static void classification_pmr_match_set_create(void) retval = odp_pmr_match_set_create(PMR_SET_NUM, pmr_terms, &pmr_set); CU_ASSERT(retval > 0); + CU_ASSERT(odp_pmr_set_to_u64(pmr_set) != + odp_pmr_set_to_u64(ODP_PMR_SET_INVAL)); retval = odp_pmr_match_set_destroy(pmr_set); CU_ASSERT(retval == 0);