2014-02-10 18:58:41 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
2019-04-15 23:24:21 +00:00
|
|
|
//
|
2014-02-10 18:58:41 +00:00
|
|
|
// This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
// PURPOSE. See the above copyright notice for more information.
|
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
#include <vtkm/internal/ConfigureFor32.h>
|
|
|
|
|
|
|
|
#include <vtkm/Types.h>
|
|
|
|
|
|
|
|
#include <vtkm/testing/Testing.h>
|
|
|
|
|
|
|
|
// Size of 32 bits.
|
|
|
|
#define EXPECTED_SIZE 4
|
|
|
|
|
2018-01-17 14:57:51 +00:00
|
|
|
#if defined(VTKM_USE_64BIT_IDS)
|
|
|
|
#error vtkm::Id an unexpected size.
|
2014-02-10 18:58:41 +00:00
|
|
|
#endif
|
|
|
|
|
2018-01-17 14:57:51 +00:00
|
|
|
#if defined(VTKM_USE_DOUBLE_PRECISION)
|
|
|
|
#error vtkm::FloatDefault an unexpected size.
|
2014-02-10 18:58:41 +00:00
|
|
|
#endif
|
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
namespace
|
|
|
|
{
|
2014-02-10 18:58:41 +00:00
|
|
|
|
|
|
|
void TestTypeSizes()
|
|
|
|
{
|
2017-05-18 14:29:41 +00:00
|
|
|
VTKM_TEST_ASSERT(sizeof(vtkm::Id) == EXPECTED_SIZE, "vtkm::Id an unexpected size.");
|
2014-10-09 14:54:56 +00:00
|
|
|
VTKM_TEST_ASSERT(sizeof(vtkm::FloatDefault) == EXPECTED_SIZE,
|
2014-12-10 15:38:03 +00:00
|
|
|
"vtkm::FloatDefault an unexpected size.");
|
2014-02-10 18:58:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-01 22:19:02 +00:00
|
|
|
int UnitTestConfigureFor32(int argc, char* argv[])
|
2014-02-10 18:58:41 +00:00
|
|
|
{
|
2019-01-01 22:19:02 +00:00
|
|
|
return vtkm::testing::Testing::Run(TestTypeSizes, argc, argv);
|
2014-02-10 18:58:41 +00:00
|
|
|
}
|