// Copyright (C) 2008 Trustees of Indiana University // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // A test of the transmission of enumeration values #include #include #include #include enum color_t { red, blue }; namespace boost { namespace mpi { template<> struct is_mpi_datatype : mpl::true_ { }; } } // end namespace boost::mpi int test_main(int argc, char* argv[]) { using namespace boost::mpi; environment env(argc, argv); communicator comm; color_t color = red; if (comm.rank() == 0) { comm.send(1, 0, red); } else { color_t recv_color; comm.recv(0, 0, recv_color); BOOST_CHECK(color == recv_color); } return 0; }