Matrices.ut.cpp 776 B

123456789101112131415161718192021222324
  1. #include <gtest/gtest.h>
  2. #include <iostream>
  3. #include "Math.h"
  4. #include "MathCommon.ut.h"
  5. template<typename Type>
  6. void arithmeticOperations()
  7. {
  8. /*testOperators<Type, &Type::operator+, &Type::operator+=, &addf>();
  9. testOperators<Type, &Type::operator-, &Type::operator-=, &subf>();
  10. testOperatorsWithFloat<Type, &Type::operator+, &Type::operator+=, &operator+, &addf>();
  11. testOperatorsWithFloat<Type, &Type::operator-, &Type::operator-=, &operator-, &subf>();
  12. testOperatorsWithFloat<Type, &Type::operator*, &Type::operator*=, &operator*, &mulf>();*/
  13. testOperatorsWithFloat<Type, &Type::operator/, &Type::operator/=, &operator/, &divf>();
  14. /*testCmpOperators<Type>();*/
  15. }
  16. TEST(MathTests, MatrixOperators)
  17. {
  18. arithmeticOperations<Mat3>();
  19. arithmeticOperations<Mat4>();
  20. }