diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 45d6e46..5e54cdc 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -27,8 +27,11 @@ boost_test(TYPE run SOURCES test_io.cpp LINK_LIBRARIES Boost::lexical_cast Boost boost_test(TYPE run SOURCES test_uuid_clock.cpp) boost_test(TYPE run SOURCES test_nil_generator.cpp) -boost_test(TYPE run SOURCES test_name_generator.cpp LINK_LIBRARIES Boost::predef) boost_test(TYPE run SOURCES test_string_generator.cpp) + +boost_test(TYPE run SOURCES test_namespaces.cpp) +boost_test(TYPE run SOURCES test_name_generator.cpp LINK_LIBRARIES Boost::predef) + boost_test(TYPE run SOURCES test_random_generator.cpp LINK_LIBRARIES Boost::random Boost::predef) boost_test(TYPE run SOURCES test_time_generator_v1.cpp LINK_LIBRARIES $<$:atomic>) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 5ba542f..a7b8d2f 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -75,8 +75,11 @@ run test_uuid_clock.cpp ; # test generators run test_nil_generator.cpp ; -run test_name_generator.cpp ; run test_string_generator.cpp ; + +run test_namespaces.cpp ; +run test_name_generator.cpp ; + run test_random_generator.cpp ; lib atomic ; diff --git a/test/test_namespaces.cpp b/test/test_namespaces.cpp new file mode 100644 index 0000000..48e3f2c --- /dev/null +++ b/test/test_namespaces.cpp @@ -0,0 +1,22 @@ +// Copyright 2010 Andy Tompkins +// Copyright 2024 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt + +#include +#include +#include +#include +#include + +using namespace boost::uuids; + +int main() +{ + BOOST_TEST_EQ( ns::dns(), string_generator()("6ba7b810-9dad-11d1-80b4-00c04fd430c8")); + BOOST_TEST_EQ( ns::url(), string_generator()("6ba7b811-9dad-11d1-80b4-00c04fd430c8")); + BOOST_TEST_EQ( ns::oid(), string_generator()("6ba7b812-9dad-11d1-80b4-00c04fd430c8")); + BOOST_TEST_EQ( ns::x500dn(), string_generator()("6ba7b814-9dad-11d1-80b4-00c04fd430c8")); + + return boost::report_errors(); +}