Sierra Toolkit  Version of the Day
UnitTestTemplate.cpp
1 /*------------------------------------------------------------------------*/
2 /* Copyright 2010 Sandia Corporation. */
3 /* Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive */
4 /* license for use of this work by or on behalf of the U.S. Government. */
5 /* Export of this program may require a license from the */
6 /* United States Government. */
7 /*------------------------------------------------------------------------*/
8 
9 
10 #include <stk_util/parallel/Parallel.hpp>
11 #include <stk_util/unit_test_support/stk_utest_macros.hpp>
12 
13 STKUNIT_UNIT_TEST(UnitTestTemplate, testUnit)
14 {
15  int mpi_rank = 0;
16  int mpi_size = 1;
17 
18 #ifdef STK_HAS_MPI
19  STKUNIT_ASSERT_EQUAL(MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank), MPI_SUCCESS);
20  STKUNIT_ASSERT_EQUAL(MPI_Comm_size(MPI_COMM_WORLD, &mpi_size), MPI_SUCCESS);
21 #endif
22 
23  STKUNIT_ASSERT(mpi_rank < mpi_size);
24 }