mirror of
https://github.com/boostorg/uuid.git
synced 2026-01-19 04:42:16 +00:00
Add compile-fail tests for random_provider
This commit is contained in:
18
test/compile-fail/random_provder_no_copy_ctor.cpp
Normal file
18
test/compile-fail/random_provder_no_copy_ctor.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
// (c) Copyright Andrey Semashev 2018
|
||||
// (c) Copyright Peter Dimov 2024
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// The test verifies that random_generator is not copy constructible
|
||||
|
||||
#include <boost/uuid/detail/random_provider.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
boost::uuids::detail::random_provider prov1;
|
||||
boost::uuids::detail::random_provider prov2(prov1);
|
||||
|
||||
return 1;
|
||||
}
|
||||
18
test/compile-fail/random_provider_no_copy_assign.cpp
Normal file
18
test/compile-fail/random_provider_no_copy_assign.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
// (c) Copyright Andrey Semashev 2018
|
||||
// (c) Copyright Peter Dimov 2024
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// The test verifies that random_generator is not copy assignable
|
||||
|
||||
#include <boost/uuid/detail/random_provider.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
boost::uuids::detail::random_provider prov1, prov2;
|
||||
prov2 = prov1;
|
||||
|
||||
return 1;
|
||||
}
|
||||
Reference in New Issue
Block a user