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