From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100215 invoked by alias); 28 Sep 2017 19:59:50 -0000 Mailing-List: contact libstdc++-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libstdc++-owner@gcc.gnu.org Received: (qmail 99387 invoked by uid 89); 28 Sep 2017 19:59:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Simply, highly, HContent-Transfer-Encoding:8bit X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-wm0-f47.google.com Received: from mail-wm0-f47.google.com (HELO mail-wm0-f47.google.com) (74.125.82.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 28 Sep 2017 19:59:48 +0000 Received: by mail-wm0-f47.google.com with SMTP id u138so4405894wmu.5; Thu, 28 Sep 2017 12:59:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=sOiL7StgsX4C+APlQWA/C9f0qywIcqsaLsEEe5Gfuc4=; b=lvmGpdcG6IM484SYCeFkFXy+LKR1vmJQXOkWBAvrjtca6x68qHdoZ7NuejObwRAVgX 4RPbNX9/fPif1rynOR1F6mzpWCIs8I5/aPezIqzfDm5rBGvX1a50Brl5NMtCdRDwuRE0 qpc4R2rVQ/wWG0Sp+Qc4aUbT3BlzJYkwphk9QD3Wfx6uWb3nWVrJlIyn8rKUOmaBlZ30 cyvVi09UeA04eMaRZDa/e0KP6Cjyt3udIHajkRUwU/Vr4rqod25a7yXlJFWnbNEirLCe GIes4PdglV5HydD9Jh8ZD1AX0GLtLNQ0QKqMZi9JQvZUcZS5AcI/qDRn5OrlpI0NM7gX +daA== X-Gm-Message-State: AHPjjUjnfDdst2cfF26CrL+r4zXmKzrgBx7mvbE+k5JoIw8aLGRhUYfz xpZeElf6Uxid170HGKvQg1UiqQ== X-Google-Smtp-Source: AOwi7QCw2ifWV/0VsBdrcCRa4rMR0HWnVOKjNm+IgM5iypmY5NFvVLGj4nJcrx1sTEmOzJLOMvmENQ== X-Received: by 10.80.137.83 with SMTP id f19mr6996507edf.77.1506628786321; Thu, 28 Sep 2017 12:59:46 -0700 (PDT) Received: from [192.168.0.23] (arf62-1-82-237-250-248.fbx.proxad.net. [82.237.250.248]) by smtp.googlemail.com with ESMTPSA id y8sm2669679edb.86.2017.09.28.12.59.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Sep 2017 12:59:45 -0700 (PDT) Subject: Re: Make tests less istreambuf_iterator implementation dependent To: Jonathan Wakely Cc: "libstdc++@gcc.gnu.org" , gcc-patches References: <154b3b11-5b95-2c81-fb4d-408e9e0db374@gmail.com> <20170928121213.GM4582@redhat.com> From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= Message-ID: Date: Thu, 28 Sep 2017 19:59:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170928121213.GM4582@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00102.txt.bz2 On 28/09/2017 14:12, Jonathan Wakely wrote: > On 27/09/17 22:16 +0200, François Dumont wrote: >> Hi >> >>     I just committed attached patch as trivial. >> >>     Those tests were highly istreambuf_iterator implementation, it is >> the result of the call to money_get<>::get which is pointing >> immediately beyond the last character recognized to quote Standard >> words. > > But according to the standard's specification for istreambuf_iterator > it makes no difference, because both iterators point to the same > streambuf and share the state. > > Simply adding a: VERIFY( *ibeg2 == '0' ); before calling money_get<>::get method would have broken the test. The current istreambuf_iterator implementation capture the current streambuf state each time it is tested for eof or evaluated. This is why I considered those tests as fragile. François