From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 78E7D3858418; Tue, 19 Mar 2024 15:23:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 78E7D3858418 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710861814; bh=g1xWD8oe5IlvXlTT36E0M5BZCnzyKao2Bo4d6G81EL4=; h=From:To:Subject:Date:From; b=U+a67lH9RdYvXbTs7A/J8MxZAee9RGevONn7kZ/BjowDUeOvv7OCcwYTJ7oHbzkcj 4aOFhku2AG+bmNozDA7lkcmy4d7Ew7PWa0aE5ySpTpi++qnQLbxZbqmxLj+zufKySa K0WkOw/oWWs/a2ZLwsuevWRDnzOAoq5T4rEaN8+U= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r14-9546] libstdc++: Fix typos in MemoryChecker assertion messages in PSTL tests X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 16afbd9c9c4282d56062cef95e6eccfdcf3efe03 X-Git-Newrev: f5118546a8d0a99edb34fd672e7847370a1adae1 Message-Id: <20240319152334.78E7D3858418@sourceware.org> Date: Tue, 19 Mar 2024 15:23:34 +0000 (GMT) List-Id: https://gcc.gnu.org/g:f5118546a8d0a99edb34fd672e7847370a1adae1 commit r14-9546-gf5118546a8d0a99edb34fd672e7847370a1adae1 Author: Jonathan Wakely Date: Mon Mar 18 12:55:36 2024 +0000 libstdc++: Fix typos in MemoryChecker assertion messages in PSTL tests This has been reported upstream. libstdc++-v3/ChangeLog: * testsuite/util/pstl/test_utils.h: Fix typos in comments. Diff: --- libstdc++-v3/testsuite/util/pstl/test_utils.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libstdc++-v3/testsuite/util/pstl/test_utils.h b/libstdc++-v3/testsuite/util/pstl/test_utils.h index e35084eabb2..55b510098a0 100644 --- a/libstdc++-v3/testsuite/util/pstl/test_utils.h +++ b/libstdc++-v3/testsuite/util/pstl/test_utils.h @@ -252,7 +252,7 @@ struct MemoryChecker { MemoryChecker(MemoryChecker&& other) : _value(other.value()) { // check for EXPECT_TRUE(state() != alive_state, ...) has not been done since // compiler can optimize out the move ctor call that results in false positive failure - EXPECT_TRUE(other.state() == alive_state, "wrong effect from MemoryChecker(MemoryChecker&&): attemp to construct an object from non-existing object"); + EXPECT_TRUE(other.state() == alive_state, "wrong effect from MemoryChecker(MemoryChecker&&): attempt to construct an object from non-existing object"); // set constructed state and increment counter for living object inc_alive_objects(); _state = alive_state; @@ -260,15 +260,15 @@ struct MemoryChecker { MemoryChecker(const MemoryChecker& other) : _value(other.value()) { // check for EXPECT_TRUE(state() != alive_state, ...) has not been done since // compiler can optimize out the copy ctor call that results in false positive failure - EXPECT_TRUE(other.state() == alive_state, "wrong effect from MemoryChecker(const MemoryChecker&): attemp to construct an object from non-existing object"); + EXPECT_TRUE(other.state() == alive_state, "wrong effect from MemoryChecker(const MemoryChecker&): attempt to construct an object from non-existing object"); // set constructed state and increment counter for living object inc_alive_objects(); _state = alive_state; } MemoryChecker& operator=(MemoryChecker&& other) { // check if we do not assign over uninitialized memory - EXPECT_TRUE(state() == alive_state, "wrong effect from MemoryChecker::operator=(MemoryChecker&& other): attemp to assign to non-existing object"); - EXPECT_TRUE(other.state() == alive_state, "wrong effect from MemoryChecker::operator=(MemoryChecker&& other): attemp to assign from non-existing object"); + EXPECT_TRUE(state() == alive_state, "wrong effect from MemoryChecker::operator=(MemoryChecker&& other): attempt to assign to non-existing object"); + EXPECT_TRUE(other.state() == alive_state, "wrong effect from MemoryChecker::operator=(MemoryChecker&& other): attempt to assign from non-existing object"); // just assign new value, counter is the same, state is the same _value = other.value(); @@ -276,8 +276,8 @@ struct MemoryChecker { } MemoryChecker& operator=(const MemoryChecker& other) { // check if we do not assign over uninitialized memory - EXPECT_TRUE(state() == alive_state, "wrong effect from MemoryChecker::operator=(const MemoryChecker& other): attemp to assign to non-existing object"); - EXPECT_TRUE(other.state() == alive_state, "wrong effect from MemoryChecker::operator=(const MemoryChecker& other): attemp to assign from non-existing object"); + EXPECT_TRUE(state() == alive_state, "wrong effect from MemoryChecker::operator=(const MemoryChecker& other): attempt to assign to non-existing object"); + EXPECT_TRUE(other.state() == alive_state, "wrong effect from MemoryChecker::operator=(const MemoryChecker& other): attempt to assign from non-existing object"); // just assign new value, counter is the same, state is the same _value = other.value(); @@ -285,7 +285,7 @@ struct MemoryChecker { } ~MemoryChecker() { // check if we do not double destruct the object - EXPECT_TRUE(state() == alive_state, "wrong effect from ~MemoryChecker(): attemp to destroy non-existing object"); + EXPECT_TRUE(state() == alive_state, "wrong effect from ~MemoryChecker(): attempt to destroy non-existing object"); // set destructed state and decrement counter for living object static_cast(_state) = dead_state; dec_alive_objects();