1 #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 8 namespace 9 { 10 11 using testing::MatchesRegex; 12 13 TEST(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 24