UnitTests: Disable self move warnings

We want to test self move, so we cannot avoid the warning.

Change-Id: Id785690d40cfc5299e65c9f0e69abe6e336ba9ff
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2023-02-22 11:52:43 +01:00
parent cc0af7c3f1
commit 20c366aa48

View File

@@ -1535,6 +1535,11 @@ TEST(SmallString, LongPathStringMoveConstuctor)
"text")); "text"));
} }
#if __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wself-move"
#endif
TEST(SmallString, ShortSmallStringMoveConstuctorToSelf) TEST(SmallString, ShortSmallStringMoveConstuctorToSelf)
{ {
SmallString text("text"); SmallString text("text");
@@ -1580,6 +1585,10 @@ TEST(SmallString, LongPathStringMoveConstuctorToSelf)
"text")); "text"));
} }
#if __clang__
#pragma clang diagnostic pop
#endif
TEST(SmallString, ShortSmallStringCopyAssignment) TEST(SmallString, ShortSmallStringCopyAssignment)
{ {
SmallString text("text"); SmallString text("text");