1 // (C) Copyright Andy Tompkins 2010. Permission to copy, use, modify, sell and 2 // distribute this software is granted provided this copyright notice appears 3 // in all copies. This software is provided "as is" without express or implied 4 // warranty, and with no claim as to its suitability for any purpose. 5 6 // Distributed under the Boost Software License, Version 1.0. (See 7 // accompanying file LICENSE_1_0.txt or copy at 8 // https://www.boost.org/LICENSE_1_0.txt) 9 10 // libs/uuid/test/test_nil_generator.cpp -------------------------------// 11 12 #include <boost/uuid/uuid.hpp> 13 #include <boost/uuid/uuid_io.hpp> 14 #include <boost/uuid/nil_generator.hpp> 15 #include <boost/detail/lightweight_test.hpp> 16 main(int,char * [])17int main(int, char*[]) 18 { 19 using namespace boost::uuids; 20 21 uuid u1 = nil_generator()(); 22 uuid u2 = {{0}}; 23 BOOST_TEST_EQ(u1, u2); 24 25 uuid u3 = nil_uuid(); 26 BOOST_TEST_EQ(u3, u2); 27 28 return boost::report_errors(); 29 } 30