mirror of
https://github.com/boostorg/uuid.git
synced 2026-01-19 04:42:16 +00:00
Add test_uuid_3.cpp
This commit is contained in:
@@ -16,6 +16,7 @@ set(BOOST_TEST_LINK_LIBRARIES Boost::uuid Boost::core)
|
||||
boost_test(TYPE run SOURCES test_uuid.cpp LINK_LIBRARIES Boost::container_hash COMPILE_DEFINITIONS BOOST_UUID_REPORT_IMPLEMENTATION=1)
|
||||
boost_test(TYPE run SOURCES test_uuid.cpp LINK_LIBRARIES Boost::container_hash COMPILE_DEFINITIONS BOOST_UUID_NO_SIMD=1 BOOST_UUID_REPORT_IMPLEMENTATION=1 NAME test_uuid_no_simd)
|
||||
boost_test(TYPE run SOURCES test_uuid_2.cpp)
|
||||
boost_test(TYPE run SOURCES test_uuid_3.cpp)
|
||||
|
||||
boost_test(TYPE run SOURCES test_alignment.cpp)
|
||||
boost_test(TYPE run SOURCES test_attribute_packed.cpp)
|
||||
|
||||
@@ -57,6 +57,7 @@ run test_uuid.cpp
|
||||
: : : <define>BOOST_UUID_REPORT_IMPLEMENTATION ;
|
||||
run test_uuid.cpp : : : <define>BOOST_UUID_NO_SIMD <define>BOOST_UUID_REPORT_IMPLEMENTATION : test_uuid_no_simd ;
|
||||
run test_uuid_2.cpp ;
|
||||
run test_uuid_3.cpp ;
|
||||
|
||||
# test type properties
|
||||
|
||||
|
||||
32
test/test_uuid_3.cpp
Normal file
32
test/test_uuid_3.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
// Copyright 2024 Peter Dimov
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/uuid/uuid.hpp>
|
||||
#include <boost/uuid/uuid_io.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
using namespace boost::uuids;
|
||||
|
||||
int main()
|
||||
{
|
||||
{
|
||||
uuid u;
|
||||
|
||||
std::uint8_t* p = u.data();
|
||||
|
||||
BOOST_TEST_EQ( p, u.begin() );
|
||||
BOOST_TEST_EQ( p + u.size(), u.end() );
|
||||
}
|
||||
|
||||
{
|
||||
uuid const u;
|
||||
|
||||
std::uint8_t const* p = u.data();
|
||||
|
||||
BOOST_TEST_EQ( p, u.begin() );
|
||||
BOOST_TEST_EQ( p + u.size(), u.end() );
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
Reference in New Issue
Block a user