Commit 5c05c915 authored by Bill Lorensen's avatar Bill Lorensen
Browse files

COMP: Infinite loop compiling TestDataArrayAPI

On Mac OS 10.7.5, GCC 4.2.1 the compil for the test TestDayaArrayAPI
never completes. This patch breaks up ExerciseDataArray into into two
methods: ExerciseDataArrayAPI and ExerciseGetRange.
parent dfe3dfb7
...@@ -66,6 +66,8 @@ ...@@ -66,6 +66,8 @@
namespace { namespace {
template <typename ScalarT, typename ArrayT> template <typename ScalarT, typename ArrayT>
int ExerciseDataArray(); int ExerciseDataArray();
template <typename ScalarT, typename ArrayT>
int ExerciseGetRange();
} // end anon namespace } // end anon namespace
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
...@@ -93,6 +95,21 @@ int TestDataArrayAPI(int, char *[]) ...@@ -93,6 +95,21 @@ int TestDataArrayAPI(int, char *[])
errors += ExerciseDataArray<unsigned long long, vtkUnsignedLongLongArray>(); errors += ExerciseDataArray<unsigned long long, vtkUnsignedLongLongArray>();
errors += ExerciseDataArray<unsigned short, vtkUnsignedShortArray>(); errors += ExerciseDataArray<unsigned short, vtkUnsignedShortArray>();
errors += ExerciseGetRange<char, vtkCharArray>();
errors += ExerciseGetRange<float, vtkFloatArray>();
errors += ExerciseGetRange<double, vtkDoubleArray>();
errors += ExerciseGetRange<vtkIdType, vtkIdTypeArray>();
errors += ExerciseGetRange<int, vtkIntArray>();
errors += ExerciseGetRange<long, vtkLongArray>();
errors += ExerciseGetRange<long long, vtkLongLongArray>();
errors += ExerciseGetRange<short, vtkShortArray>();
errors += ExerciseGetRange<signed char, vtkSignedCharArray>();
errors += ExerciseGetRange<unsigned char, vtkUnsignedCharArray>();
errors += ExerciseGetRange<unsigned int, vtkUnsignedIntArray>();
errors += ExerciseGetRange<unsigned long, vtkUnsignedLongArray>();
errors += ExerciseGetRange<unsigned long long, vtkUnsignedLongLongArray>();
errors += ExerciseGetRange<unsigned short, vtkUnsignedShortArray>();
if (errors > 0) if (errors > 0)
{ {
std::cerr << "Test failed! Error count: " << errors << std::endl; std::cerr << "Test failed! Error count: " << errors << std::endl;
...@@ -1894,7 +1911,6 @@ int Test_GetRange_all_overloads() ...@@ -1894,7 +1911,6 @@ int Test_GetRange_all_overloads()
<< rangeArray[1] << "]."); << rangeArray[1] << "].");
} }
} }
DataArrayAPIFinish(); DataArrayAPIFinish();
} }
...@@ -1986,9 +2002,18 @@ int ExerciseDataArray() ...@@ -1986,9 +2002,18 @@ int ExerciseDataArray()
errors += Test_void_DeepCopy_array<ScalarT, ArrayT, vtkDataArray, unsigned long long>(); errors += Test_void_DeepCopy_array<ScalarT, ArrayT, vtkDataArray, unsigned long long>();
errors += Test_void_DeepCopy_array<ScalarT, ArrayT, vtkDataArray, unsigned short>(); errors += Test_void_DeepCopy_array<ScalarT, ArrayT, vtkDataArray, unsigned short>();
errors += Test_void_CopyComponent_j_from_fromComponent<ScalarT, ArrayT>(); errors += Test_void_CopyComponent_j_from_fromComponent<ScalarT, ArrayT>();
errors += Test_GetRange_all_overloads<ScalarT, ArrayT>();
return errors; return errors;
} // end ExerciseDataArray } // end ExerciseDataArray
template <typename ScalarT, typename ArrayT>
int ExerciseGetRange()
{
int errors = 0;
errors += Test_GetRange_all_overloads<ScalarT, ArrayT>();
return errors;
} // end ExerciseGetRange
} // end anon namespace } // end anon namespace
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment