indentation in strings

This commit is contained in:
Шишов Максим Денисович
2020-09-10 17:13:02 +03:00
committed by Gama
parent 05e935f552
commit 36fe9135db
2 changed files with 13 additions and 26 deletions

View File

@@ -5,8 +5,7 @@ const uint rows = 3;
const uint cols = 3;
template<typename Type>
bool cmpSquareMatrixWithValue(PIMathMatrixT<rows, cols, double> matrix, Type val, int num)
{
bool cmpSquareMatrixWithValue(PIMathMatrixT<rows, cols, double> matrix, Type val, int num) {
bool b = true;
for(int i = 0; i < num; i++) {
for(int j = 0; j < num; j++) {
@@ -18,8 +17,7 @@ bool cmpSquareMatrixWithValue(PIMathMatrixT<rows, cols, double> matrix, Type val
return b;
}
TEST(PIMathMatrixT_Test, identity)
{
TEST(PIMathMatrixT_Test, identity) {
auto matrix = PIMathMatrixT<rows, cols, double>::identity();
for(int i = 0; i < 3; i++){
if(matrix[i][i] != 1.0){
@@ -39,8 +37,7 @@ TEST(PIMathMatrixT_Test, identity)
ASSERT_TRUE(true);
}
TEST(PIMathMatrixT_Test, at)
{
TEST(PIMathMatrixT_Test, at) {
auto matrix1 = PIMathMatrixT<rows, cols, double>::identity();
for(uint i = 0; i < rows; i++) {
if(matrix1.at(i,i) != 1.0) {
@@ -324,27 +321,23 @@ TEST(PIMathMatrixT_Test, operator_Division_Assignment) {
ASSERT_TRUE(cmpSquareMatrixWithValue(matrix1, 3.36, rows));
}
TEST(PIMathMatrixT_Test, operator_Addition)
{
TEST(PIMathMatrixT_Test, operator_Addition) {
auto matrix1 = PIMathMatrixT<rows, cols, double>::filled(6.72);
auto matrix2 = PIMathMatrixT<rows, cols, double>::filled(8.28);
ASSERT_TRUE(cmpSquareMatrixWithValue(matrix1 + matrix2, 15.0, rows));
}
TEST(PIMathMatrixT_Test, operator_Subtraction)
{
TEST(PIMathMatrixT_Test, operator_Subtraction) {
auto matrix1 = PIMathMatrixT<rows, cols, double>::filled(6.0);
auto matrix2 = PIMathMatrixT<rows, cols, double>::filled(5.0);
ASSERT_TRUE(cmpSquareMatrixWithValue(matrix1 - matrix2, 1.0, rows));
}
TEST(PIMathMatrixT_Test, operator_Multiplication)
{
TEST(PIMathMatrixT_Test, operator_Multiplication) {
auto matrix1 = PIMathMatrixT<rows, cols, double>::filled(6.72);
ASSERT_TRUE(cmpSquareMatrixWithValue(matrix1 * 4.0, 26.88, rows));
}
TEST(PIMathMatrixT_Test, operator_Division)
{
TEST(PIMathMatrixT_Test, operator_Division) {
auto matrix1 = PIMathMatrixT<rows, cols, double>::filled(6.72);
ASSERT_TRUE(cmpSquareMatrixWithValue(matrix1 / 4.0, 1.68, rows));
}