mirror of
https://github.com/boostorg/uuid.git
synced 2026-01-19 04:42:16 +00:00
Add test_namespaces.cpp
This commit is contained in:
@@ -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 $<$<CXX_COMPILER_ID:GNU>:atomic>)
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
22
test/test_namespaces.cpp
Normal file
22
test/test_namespaces.cpp
Normal file
@@ -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 <boost/uuid/namespaces.hpp>
|
||||
#include <boost/uuid/uuid.hpp>
|
||||
#include <boost/uuid/uuid_io.hpp>
|
||||
#include <boost/uuid/string_generator.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
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();
|
||||
}
|
||||
Reference in New Issue
Block a user