diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bef61e91d5..8de8539a4c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,7 +43,7 @@ jobs: buildType: RELEASE containerImage: ghcr.io/gafferhq/build/build:2.0.0 options: .github/workflows/main/options.posix - dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/6.0.0/gafferDependencies-6.0.0-linux.tar.gz + dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/7.0.0/gafferDependencies-7.0.0-linux.tar.gz tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB publish: true @@ -52,7 +52,7 @@ jobs: buildType: DEBUG containerImage: ghcr.io/gafferhq/build/build:2.0.0 options: .github/workflows/main/options.posix - dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/6.0.0/gafferDependencies-6.0.0-linux.tar.gz + dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/7.0.0/gafferDependencies-7.0.0-linux.tar.gz tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB publish: false @@ -60,7 +60,7 @@ jobs: os: windows-2019 buildType: RELEASE options: .github/workflows/main/options.windows - dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/6.0.0/gafferDependencies-6.0.0-windows.zip + dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/7.0.0/gafferDependencies-7.0.0-windows.zip tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB publish: true @@ -68,7 +68,7 @@ jobs: os: windows-2019 buildType: RELWITHDEBINFO options: .github/workflows/main/options.windows - dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/6.0.0/gafferDependencies-6.0.0-windows.zip + dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/7.0.0/gafferDependencies-7.0.0-windows.zip tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB publish: false diff --git a/test/IECore/CompilerTest.h b/test/IECore/CompilerTest.h index f9cc552beb..0a103f6709 100644 --- a/test/IECore/CompilerTest.h +++ b/test/IECore/CompilerTest.h @@ -39,11 +39,17 @@ #include "IECore/Export.h" IECORE_PUSH_DEFAULT_VISIBILITY +#include "OpenEXR/OpenEXRConfig.h" +#if OPENEXR_VERSION_MAJOR < 3 #include "OpenEXR/ImathBox.h" #include "OpenEXR/ImathVec.h" -IECORE_POP_DEFAULT_VISIBILITY - #include "OpenEXR/ImathLineAlgo.h" +#else +#include "Imath/ImathBox.h" +#include "Imath/ImathVec.h" +#include "Imath/ImathLineAlgo.h" +#endif +IECORE_POP_DEFAULT_VISIBILITY IECORE_PUSH_DEFAULT_VISIBILITY #include "boost/test/unit_test.hpp" diff --git a/test/IECore/DataConversionTest.h b/test/IECore/DataConversionTest.h index dce6c80aff..ec5ed4a3ed 100644 --- a/test/IECore/DataConversionTest.h +++ b/test/IECore/DataConversionTest.h @@ -46,7 +46,6 @@ IECORE_PUSH_DEFAULT_VISIBILITY IECORE_POP_DEFAULT_VISIBILITY #include "boost/random.hpp" -#include "boost/test/floating_point_comparison.hpp" #include diff --git a/test/IECore/DataConvertTest.h b/test/IECore/DataConvertTest.h index e03cda9c52..0e4d06d9b9 100644 --- a/test/IECore/DataConvertTest.h +++ b/test/IECore/DataConvertTest.h @@ -44,8 +44,6 @@ IECORE_PUSH_DEFAULT_VISIBILITY #include "boost/test/unit_test.hpp" IECORE_POP_DEFAULT_VISIBILITY -#include "boost/test/floating_point_comparison.hpp" - #include namespace IECore diff --git a/test/IECore/DespatchTypedDataTest.h b/test/IECore/DespatchTypedDataTest.h index d47a021eef..1e2d0ba638 100644 --- a/test/IECore/DespatchTypedDataTest.h +++ b/test/IECore/DespatchTypedDataTest.h @@ -45,8 +45,6 @@ IECORE_PUSH_DEFAULT_VISIBILITY #include "boost/test/unit_test.hpp" IECORE_POP_DEFAULT_VISIBILITY -#include "boost/test/floating_point_comparison.hpp" - #include using namespace Imath; diff --git a/test/IECore/IECoreTest.cpp b/test/IECore/IECoreTest.cpp index 6b2a16647c..9bbf2e2760 100644 --- a/test/IECore/IECoreTest.cpp +++ b/test/IECore/IECoreTest.cpp @@ -35,7 +35,12 @@ #include "IECore/Export.h" IECORE_PUSH_DEFAULT_VISIBILITY +#include "OpenEXR/OpenEXRConfig.h" +#if OPENEXR_VERSION_MAJOR < 3 #include "OpenEXR/ImathColor.h" +#else +#include "Imath/ImathColor.h" +#endif IECORE_POP_DEFAULT_VISIBILITY #include diff --git a/test/IECore/Imath.py b/test/IECore/Imath.py index d783c113c7..f922b700d0 100644 --- a/test/IECore/Imath.py +++ b/test/IECore/Imath.py @@ -81,8 +81,8 @@ def testConstructors(self): self.assertEqual(v.x, 1) self.assertEqual(v.y, 1) - self.assertRaises( RuntimeError, imath.V2f, [ 1 ] ) - self.assertRaises( RuntimeError, imath.V2f, [ 1, 2, 3 ] ) + self.assertRaises( Exception, imath.V2f, [ 1 ] ) + self.assertRaises( Exception, imath.V2f, [ 1, 2, 3 ] ) def testDimensions(self): """Test V2f dimensions""" @@ -291,9 +291,9 @@ def testConstructors(self): self.assertEqual(v.y, 1) self.assertEqual(v.z, 1) - self.assertRaises( RuntimeError, imath.V3f, [ 1 ] ) - self.assertRaises( RuntimeError, imath.V3f, [ 1, 2 ] ) - self.assertRaises( RuntimeError, imath.V3f, [ 1, 2, 3, 4 ] ) + self.assertRaises( Exception, imath.V3f, [ 1 ] ) + self.assertRaises( Exception, imath.V3f, [ 1, 2 ] ) + self.assertRaises( Exception, imath.V3f, [ 1, 2, 3, 4 ] ) def testDimensions(self): """Test V3f dimensions""" diff --git a/test/IECore/IndexedIOTest.h b/test/IECore/IndexedIOTest.h index 4c895d34ac..e9293da541 100755 --- a/test/IECore/IndexedIOTest.h +++ b/test/IECore/IndexedIOTest.h @@ -43,8 +43,6 @@ IECORE_PUSH_DEFAULT_VISIBILITY #include "boost/test/unit_test.hpp" IECORE_POP_DEFAULT_VISIBILITY -#include "boost/test/floating_point_comparison.hpp" - #include #include #include diff --git a/test/IECore/InternedStringTest.cpp b/test/IECore/InternedStringTest.cpp index c300f1df7d..98455f351e 100644 --- a/test/IECore/InternedStringTest.cpp +++ b/test/IECore/InternedStringTest.cpp @@ -36,7 +36,12 @@ #include "IECore/InternedString.h" +#include "OpenEXR/OpenEXRConfig.h" +#if OPENEXR_VERSION_MAJOR < 3 #include "OpenEXR/ImathRandom.h" +#else +#include "Imath/ImathRandom.h" +#endif #include "boost/lexical_cast.hpp" diff --git a/test/IECore/InterpolatorTest.h b/test/IECore/InterpolatorTest.h index 7c47d9c7ad..82d6390b0f 100644 --- a/test/IECore/InterpolatorTest.h +++ b/test/IECore/InterpolatorTest.h @@ -39,18 +39,23 @@ #include "IECore/Interpolator.h" IECORE_PUSH_DEFAULT_VISIBILITY +#include "OpenEXR/OpenEXRConfig.h" +#if OPENEXR_VERSION_MAJOR < 3 #include "OpenEXR/ImathMatrix.h" +#include "OpenEXR/ImathMatrixAlgo.h" #include "OpenEXR/ImathVec.h" +#else +#include "Imath/ImathMatrix.h" +#include "Imath/ImathMatrixAlgo.h" +#include "Imath/ImathVec.h" +#endif IECORE_POP_DEFAULT_VISIBILITY -#include "OpenEXR/ImathMatrixAlgo.h" IECORE_PUSH_DEFAULT_VISIBILITY #include "boost/test/unit_test.hpp" IECORE_POP_DEFAULT_VISIBILITY -#include "boost/test/floating_point_comparison.hpp" - namespace IECore { void addInterpolatorTest(boost::unit_test::test_suite* test); diff --git a/test/IECore/KDTreeTest.h b/test/IECore/KDTreeTest.h index b966e10eca..3dfa96cf15 100644 --- a/test/IECore/KDTreeTest.h +++ b/test/IECore/KDTreeTest.h @@ -39,10 +39,15 @@ #include "IECore/KDTree.h" IECORE_PUSH_DEFAULT_VISIBILITY +#include "OpenEXR/OpenEXRConfig.h" +#if OPENEXR_VERSION_MAJOR < 3 #include "OpenEXR/ImathVec.h" -IECORE_POP_DEFAULT_VISIBILITY - #include "OpenEXR/ImathRandom.h" +#else +#include "Imath/ImathVec.h" +#include "Imath/ImathRandom.h" +#endif +IECORE_POP_DEFAULT_VISIBILITY IECORE_PUSH_DEFAULT_VISIBILITY #include "boost/test/unit_test.hpp" diff --git a/test/IECore/LevenbergMarquardtTest.h b/test/IECore/LevenbergMarquardtTest.h index ba6592bf44..28f3aa671a 100644 --- a/test/IECore/LevenbergMarquardtTest.h +++ b/test/IECore/LevenbergMarquardtTest.h @@ -39,11 +39,16 @@ #include "IECore/LevenbergMarquardt.h" IECORE_PUSH_DEFAULT_VISIBILITY +#include "OpenEXR/OpenEXRConfig.h" +#if OPENEXR_VERSION_MAJOR < 3 +#include "OpenEXR/ImathRandom.h" #include "OpenEXR/ImathVec.h" +#else +#include "Imath/ImathRandom.h" +#include "Imath/ImathVec.h" +#endif IECORE_POP_DEFAULT_VISIBILITY -#include "OpenEXR/ImathRandom.h" - IECORE_PUSH_DEFAULT_VISIBILITY #include "boost/test/unit_test.hpp" IECORE_POP_DEFAULT_VISIBILITY diff --git a/test/IECore/LevenbergMarquardtTest.inl b/test/IECore/LevenbergMarquardtTest.inl index 67217dffc8..feaf2f1a0e 100644 --- a/test/IECore/LevenbergMarquardtTest.inl +++ b/test/IECore/LevenbergMarquardtTest.inl @@ -32,11 +32,7 @@ // ////////////////////////////////////////////////////////////////////////// -#include "OpenEXR/ImathMath.h" -#include "OpenEXR/ImathRandom.h" - #include "boost/math/tools/rational.hpp" -#include "boost/test/floating_point_comparison.hpp" using namespace IECore; using namespace Imath; @@ -63,7 +59,7 @@ class LevenbergMarquardtTestSimple::Fn for ( unsigned i = 1; i <= m_num; i ++ ) { /// Distance between our guess and the real function - errors->writable()[i-1] = Imath::Math::fabs( + errors->writable()[i-1] = std::abs( parameters->readable()[i-1] - i * i ); @@ -137,7 +133,7 @@ class LevenbergMarquardtTestPolynomialFit::Fn ) { - boost::array testCoeffs; + T testCoeffs[N]; for ( unsigned i = 0; i < N; i ++ ) { testCoeffs[i] = parameters->readable()[i]; @@ -150,7 +146,7 @@ class LevenbergMarquardtTestPolynomialFit::Fn T v2 = boost::math::tools::evaluate_polynomial( m_coeffs, (T(i) / m_num - 0.5) * 10.0); /// Distance between our guess and the real function - errors->writable()[i] = Imath::Math::fabs( v1 - v2 ); + errors->writable()[i] = std::abs( v1 - v2 ); } } @@ -171,7 +167,7 @@ class LevenbergMarquardtTestPolynomialFit::Fn protected : unsigned m_num; - boost::array m_coeffs; + T m_coeffs[N]; }; template diff --git a/test/IECore/ParameterThreadingTest.cpp b/test/IECore/ParameterThreadingTest.cpp index b66b1e9251..2a8d997438 100644 --- a/test/IECore/ParameterThreadingTest.cpp +++ b/test/IECore/ParameterThreadingTest.cpp @@ -42,7 +42,12 @@ #include "IECore/TypedObjectParameter.h" #include "IECore/VectorTypedParameter.h" +#include "OpenEXR/OpenEXRConfig.h" +#if OPENEXR_VERSION_MAJOR < 3 #include "OpenEXR/ImathRandom.h" +#else +#include "Imath/ImathRandom.h" +#endif #include "tbb/parallel_for.h" diff --git a/test/IECore/RadixSortTest.h b/test/IECore/RadixSortTest.h index 8ff5b3c264..ec34ebb21d 100644 --- a/test/IECore/RadixSortTest.h +++ b/test/IECore/RadixSortTest.h @@ -44,7 +44,6 @@ IECORE_PUSH_DEFAULT_VISIBILITY IECORE_POP_DEFAULT_VISIBILITY #include "boost/random.hpp" -#include "boost/test/floating_point_comparison.hpp" #include #include diff --git a/test/IECore/SpaceTransformTest.h b/test/IECore/SpaceTransformTest.h index 62b7df0539..8ef1fc7a28 100644 --- a/test/IECore/SpaceTransformTest.h +++ b/test/IECore/SpaceTransformTest.h @@ -40,17 +40,21 @@ #include "IECore/SphericalToEuclideanTransform.h" IECORE_PUSH_DEFAULT_VISIBILITY +#include "OpenEXR/OpenEXRConfig.h" +#if OPENEXR_VERSION_MAJOR < 3 #include "OpenEXR/ImathVec.h" +#include "OpenEXR/ImathRandom.h" +#else +#include "Imath/ImathVec.h" +#include "Imath/ImathRandom.h" +#endif IECORE_POP_DEFAULT_VISIBILITY -#include "OpenEXR/ImathRandom.h" IECORE_PUSH_DEFAULT_VISIBILITY #include "boost/test/unit_test.hpp" IECORE_POP_DEFAULT_VISIBILITY -#include "boost/test/floating_point_comparison.hpp" - #include #include diff --git a/test/IECore/SweepAndPruneTest.h b/test/IECore/SweepAndPruneTest.h index d07fc80c21..9cb2e17398 100644 --- a/test/IECore/SweepAndPruneTest.h +++ b/test/IECore/SweepAndPruneTest.h @@ -43,8 +43,14 @@ #include "IECore/VectorTraits.h" IECORE_PUSH_DEFAULT_VISIBILITY +#include "OpenEXR/OpenEXRConfig.h" +#if OPENEXR_VERSION_MAJOR < 3 #include "OpenEXR/ImathBox.h" #include "OpenEXR/ImathVec.h" +#else +#include "Imath/ImathBox.h" +#include "Imath/ImathVec.h" +#endif IECORE_POP_DEFAULT_VISIBILITY IECORE_PUSH_DEFAULT_VISIBILITY @@ -52,7 +58,6 @@ IECORE_PUSH_DEFAULT_VISIBILITY IECORE_POP_DEFAULT_VISIBILITY #include "boost/random.hpp" -#include "boost/test/floating_point_comparison.hpp" #include #include diff --git a/test/IECore/TypedDataTest.h b/test/IECore/TypedDataTest.h index 4412f2264c..04b6f681b0 100644 --- a/test/IECore/TypedDataTest.h +++ b/test/IECore/TypedDataTest.h @@ -39,7 +39,11 @@ #include "IECore/SimpleTypedData.h" #include "IECore/VectorTypedData.h" +#if OPENEXR_VERSION_MAJOR < 3 #include "OpenEXR/ImathRandom.h" +#else +#include "Imath/ImathRandom.h" +#endif IECORE_PUSH_DEFAULT_VISIBILITY #include "boost/test/unit_test.hpp"