Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/tests/BLI_uuid_test.cc')
-rw-r--r--source/blender/blenlib/tests/BLI_uuid_test.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/blenlib/tests/BLI_uuid_test.cc b/source/blender/blenlib/tests/BLI_uuid_test.cc
index 731489c6c9e..42aa618963f 100644
--- a/source/blender/blenlib/tests/BLI_uuid_test.cc
+++ b/source/blender/blenlib/tests/BLI_uuid_test.cc
@@ -18,6 +18,8 @@
#include "BLI_uuid.h"
+namespace blender::tests {
+
TEST(BLI_uuid, generate_random)
{
const bUUID uuid = BLI_uuid_generate_random();
@@ -51,7 +53,7 @@ TEST(BLI_uuid, generate_many_random)
TEST(BLI_uuid, nil_value)
{
const bUUID nil_uuid = BLI_uuid_nil();
- const bUUID zeroes_uuid = {0, 0, 0, 0, 0, 0};
+ const bUUID zeroes_uuid{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
EXPECT_TRUE(BLI_uuid_equal(nil_uuid, zeroes_uuid));
EXPECT_TRUE(BLI_uuid_is_nil(nil_uuid));
@@ -91,13 +93,13 @@ TEST(BLI_uuid, string_formatting)
EXPECT_EQ("00000001-0002-0003-0405-060000000007", buffer);
/* Somewhat more complex bit patterns. This is a version 1 UUID generated from Python. */
- const bUUID uuid1 = {3540651616, 5282, 4588, 139, 153, {0xf7, 0x73, 0x69, 0x44, 0xdb, 0x8b}};
+ const bUUID uuid1 = {3540651616, 5282, 4588, 139, 153, 0xf7, 0x73, 0x69, 0x44, 0xdb, 0x8b};
BLI_uuid_format(buffer.data(), uuid1);
EXPECT_EQ("d30a0e60-14a2-11ec-8b99-f7736944db8b", buffer);
/* Namespace UUID, example listed in RFC4211. */
const bUUID namespace_dns = {
- 0x6ba7b810, 0x9dad, 0x11d1, 0x80, 0xb4, {0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}};
+ 0x6ba7b810, 0x9dad, 0x11d1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8};
BLI_uuid_format(buffer.data(), namespace_dns);
EXPECT_EQ("6ba7b810-9dad-11d1-80b4-00c04fd430c8", buffer);
}
@@ -139,7 +141,9 @@ TEST(BLI_uuid, string_parsing_fail)
TEST(BLI_uuid, stream_operator)
{
std::stringstream ss;
- const bUUID uuid = {3540651616, 5282, 4588, 139, 153, {0xf7, 0x73, 0x69, 0x44, 0xdb, 0x8b}};
+ const bUUID uuid = {3540651616, 5282, 4588, 139, 153, 0xf7, 0x73, 0x69, 0x44, 0xdb, 0x8b};
ss << uuid;
EXPECT_EQ(ss.str(), "d30a0e60-14a2-11ec-8b99-f7736944db8b");
}
+
+} // namespace blender::tests