From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 54AC11F5AE for ; Sun, 12 Jul 2020 20:31:14 +0000 (UTC) Received: from localhost ([::1]:40942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1juicz-0003HT-1I for normalperson@yhbt.net; Sun, 12 Jul 2020 16:31:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1juicv-0003H9-4V for bug-gnulib@gnu.org; Sun, 12 Jul 2020 16:31:09 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.24]:20613) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1juicr-00060g-Ss for bug-gnulib@gnu.org; Sun, 12 Jul 2020 16:31:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1594585861; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=tkTYiBpjieUI27/tIiNkrM3DuF7rNp2q+nx+NLjhlKY=; b=bDWq8wz2MV2LUHSy8SDL+89nYORDQHxUUyxoFKcR9Uf54NwxLVMHnBJ5Z37+4g2whW BeR2qEHXkmObZlihpKwMkovmcsLY/KBMCpczYvdFjCwQbPbgaRDmXSXkxuUJ77OuyAaG DegRqO5+vaNHKoBPoFEtTGTHPdsgEJkuuKkIeLKXTI2rOQZjkK4ll0LcdaDG5K46FUlc SRETjwSCriGAHkvTgb77gMbaHIB7z4+pBrK79OjNEQHAhIPa7BrZ48CqfKcqtZRJ12Ay JVnUaDdA5j3VYKAFnH6H/N1eh5TYOiudc+LG2ryAoK09nWEPwMfmKQLXcxuxg++ecwvK ggCw== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOH6fzxfs=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 46.10.5 DYNA|AUTH) with ESMTPSA id R03d1aw6CKUpghb (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Sun, 12 Jul 2020 22:30:51 +0200 (CEST) From: Bruno Haible To: bug-gnulib@gnu.org Subject: Re: [PATCH] libgmp: new module Date: Sun, 12 Jul 2020 22:30:50 +0200 Message-ID: <2050940.tvXc5eTxTp@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-179-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20200707020333.1533949-1-eggert@cs.ucla.edu> References: <20200707020333.1533949-1-eggert@cs.ucla.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=85.215.255.24; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/12 16:31:01 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Eggert Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Paul Eggert wrote: > --- /dev/null > +++ b/tests/test-libgmp.c > @@ -0,0 +1,24 @@ > +#include > + > +#include > + > +#include "macros.h" > + > +int > +main () > +{ > + /* A simple sanity check that 2 + 2 = 4. */ > + static mp_limb_t const twobody[] = { 2 }; > + static mpz_t const two = MPZ_ROINIT_N ((mp_limb_t *) twobody, 1); > + ASSERT (mpz_fits_slong_p (two)); > + ASSERT (mpz_get_si (two) == 2); > + > + mpz_t four; > + mpz_init (four); > + mpz_add (four, two, two); > + ASSERT (mpz_fits_slong_p (four)); > + ASSERT (mpz_get_si (four) == 4); > + mpz_clear (four); > + > + return 0; > +} > This file is longer than 10 lines and apparently hand-written; therefore it needs a copyright header. diff --git a/tests/test-libgmp.c b/tests/test-libgmp.c index af8e4d7..f72a74c 100644 --- a/tests/test-libgmp.c +++ b/tests/test-libgmp.c @@ -1,3 +1,19 @@ +/* Test of libgmp or its mini-gmp substitute. + Copyright (C) 2020 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + #include #include