message: Fix check_array_values helper lambda to handle dynamic host/device memory correctly
diff: @@ -763,6 +763,9 @@ AXOM_TYPED_TEST(core_array_for_all, nontrivial_copy_ctor_obj)
  // Helper function to check all values in the array for consistency
  auto check_array_values = [=](const DynamicArray& arr, int expected) -> bool {
  + IntHostArray values_host;
  + if(arr.getAllocatorID() == kernelAllocID)
  + {
  // Copy device side values into int array
  IntArray values(arr.size(), arr.size(), kernelAllocID);
  const auto values_v = values.view();
  @@ -776,9 +779,18 @@ AXOM_TYPED_TEST(core_array_for_all, nontrivial_copy_ctor_obj)
  {
  axom::synchronize<ExecSpace>();
  }
  + values_host = IntHostArray(values, hostAllocID);
  + }
  + else
  + {
  + values_host.resize(arr.size());
  + for(int i = 0; i < arr.size(); i++)
  + {
  + values_host[i] = arr[i].m_val;
  + }
  + }
  // Check array contents on host
  - IntHostArray values_host(values, hostAllocID);
  bool allValuesEq = true;
  for(int i = 0; i < arr.size(); ++i)
  {
  @@ -828,11 +840,8 @@ AXOM_TYPED_TEST(core_array_for_all, nontrivial_copy_ctor_obj)
  EXPECT_TRUE(check_array_values(arr3, MAGIC_COPY_CTOR));
  // Transfers between memory spaces should invoke each element's copy constructor
  -// Segfaulting with hip policy
  -#ifndef AXOM_USE_HIP
  DynamicArray arr4(arr, hostAllocID);
  EXPECT_TRUE(check_array_values(arr4, MAGIC_COPY_CTOR));
  -#endif
  // Fill with instance of copy-constructed type - each element should be
  // copy-constructed from the argument
  