1 #include "ossl_random.hpp" 2 3 #include <gmock/gmock.h> // IWYU pragma: keep 4 #include <gtest/gtest.h> // IWYU pragma: keep 5 6 namespace 7 { 8 9 using testing::MatchesRegex; 10 11 TEST(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 22