blob: 512b5c8f83107ed4d7cd42922a339215b3b36d03 [file] [log] [blame]
Ed Tanous2c6ffdb2023-06-28 11:28:38 -07001#include "ossl_random.hpp"
2
Ed Tanous2c6ffdb2023-06-28 11:28:38 -07003#include <gmock/gmock.h> // IWYU pragma: keep
4#include <gtest/gtest.h> // IWYU pragma: keep
5
6namespace
7{
8
9using testing::MatchesRegex;
10
11TEST(Bmcweb, GetRandomUUID)
12{
13 using bmcweb::getRandomUUID;
14 // 78e96a4b-62fe-48d8-ac09-7f75a94671e0
15 EXPECT_THAT(
16 getRandomUUID(),
17 MatchesRegex(
18 "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"));
19}
20
21} // namespace