Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
fx_coordinates_unittest.cpp File Reference

(0ccf980226462398d5097987466bcffd8236e1e9)

#include "core/fxcrt/fx_coordinates.h"
#include <limits>
#include <vector>
#include "core/fxcrt/fx_coordinates_test_support.h"
#include "core/fxcrt/fx_system.h"
#include "testing/gtest/include/gtest/gtest.h"
Include dependency graph for fx_coordinates_unittest.cpp:

Go to the source code of this file.

Macros

#define EXPECT_NEAR_FIVE_PLACES(a, b)

Functions

 TEST (CFX_FloatRect, FromFXRect)
 TEST (CFX_FloatRect, GetBBox)
 TEST (CFX_FloatRect, GetInnerRect)
 TEST (CFX_FloatRect, GetOuterRect)
 TEST (CFX_FloatRect, Normalize)
 TEST (CFX_FloatRect, Scale)
 TEST (CFX_FloatRect, ScaleEmpty)
 TEST (CFX_FloatRect, ScaleFromCenterPoint)
 TEST (CFX_FloatRect, ScaleFromCenterPointEmpty)
 TEST (CFX_FloatRect, Print)
 TEST (CFX_RectF, Print)
 TEST (CFX_Matrix, ReverseIdentity)
 TEST (CFX_Matrix, SetIdentity)
 TEST (CFX_Matrix, GetInverse)
 TEST (CFX_Matrix, GetInverseCR702041)
 TEST (CFX_Matrix, GetInverseCR714187)
 TEST (CFX_Matrix, ComposeTransformations)
 TEST (CFX_Matrix, TransformRectForRectF)
 TEST (CFX_Matrix, TransformRectForFloatRect)

Macro Definition Documentation

◆ EXPECT_NEAR_FIVE_PLACES

#define EXPECT_NEAR_FIVE_PLACES ( a,
b )
Value:
EXPECT_NEAR((a), (b), 1e-5)
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a

Definition at line 454 of file fx_coordinates_unittest.cpp.

Function Documentation

◆ TEST() [1/19]

TEST ( CFX_FloatRect ,
FromFXRect  )

Definition at line 24 of file fx_coordinates_unittest.cpp.

References CFX_FloatRect::CFX_FloatRect(), FX_RECT::FX_RECT(), CFX_FloatRect::bottom, CFX_FloatRect::left, CFX_FloatRect::right, and CFX_FloatRect::top.

Here is the call graph for this function:

◆ TEST() [2/19]

◆ TEST() [3/19]

TEST ( CFX_FloatRect ,
GetInnerRect  )

Definition at line 89 of file fx_coordinates_unittest.cpp.

References CFX_FloatRect::CFX_FloatRect(), FX_RECT::bottom, CFX_FloatRect::GetInnerRect(), FX_RECT::left, CFX_FloatRect::operator=(), FX_RECT::operator=(), FX_RECT::right, and FX_RECT::top.

Here is the call graph for this function:

◆ TEST() [4/19]

TEST ( CFX_FloatRect ,
GetOuterRect  )

Definition at line 143 of file fx_coordinates_unittest.cpp.

References CFX_FloatRect::CFX_FloatRect(), FX_RECT::bottom, CFX_FloatRect::GetOuterRect(), FX_RECT::left, CFX_FloatRect::operator=(), FX_RECT::operator=(), FX_RECT::right, and FX_RECT::top.

Here is the call graph for this function:

◆ TEST() [5/19]

TEST ( CFX_FloatRect ,
Normalize  )

Definition at line 195 of file fx_coordinates_unittest.cpp.

References CFX_FloatRect::CFX_FloatRect(), CFX_FloatRect::bottom, CFX_FloatRect::left, CFX_FloatRect::Normalize(), CFX_FloatRect::operator=(), CFX_FloatRect::right, CFX_FloatRect::Scale(), and CFX_FloatRect::top.

Here is the call graph for this function:

◆ TEST() [6/19]

TEST ( CFX_FloatRect ,
Print  )

Definition at line 323 of file fx_coordinates_unittest.cpp.

References CFX_FloatRect::CFX_FloatRect(), and CFX_FloatRect::operator=().

Here is the call graph for this function:

◆ TEST() [7/19]

TEST ( CFX_FloatRect ,
Scale  )

Definition at line 217 of file fx_coordinates_unittest.cpp.

References CFX_FloatRect::CFX_FloatRect(), CFX_FloatRect::bottom, CFX_FloatRect::left, CFX_FloatRect::right, CFX_FloatRect::Scale(), and CFX_FloatRect::top.

Here is the call graph for this function:

◆ TEST() [8/19]

TEST ( CFX_FloatRect ,
ScaleEmpty  )

Definition at line 246 of file fx_coordinates_unittest.cpp.

References CFX_FloatRect::bottom, CFX_FloatRect::left, CFX_FloatRect::right, CFX_FloatRect::Scale(), and CFX_FloatRect::top.

Here is the call graph for this function:

◆ TEST() [9/19]

TEST ( CFX_FloatRect ,
ScaleFromCenterPoint  )

Definition at line 270 of file fx_coordinates_unittest.cpp.

References CFX_FloatRect::CFX_FloatRect(), CFX_FloatRect::bottom, CFX_FloatRect::left, CFX_FloatRect::right, CFX_FloatRect::ScaleFromCenterPoint(), and CFX_FloatRect::top.

Here is the call graph for this function:

◆ TEST() [10/19]

TEST ( CFX_FloatRect ,
ScaleFromCenterPointEmpty  )

Definition at line 299 of file fx_coordinates_unittest.cpp.

References CFX_FloatRect::bottom, CFX_FloatRect::left, CFX_FloatRect::right, CFX_FloatRect::ScaleFromCenterPoint(), and CFX_FloatRect::top.

Here is the call graph for this function:

◆ TEST() [11/19]

TEST ( CFX_Matrix ,
ComposeTransformations  )

Definition at line 456 of file fx_coordinates_unittest.cpp.

References CFX_Matrix::CFX_Matrix(), CFX_Matrix::a, CFX_Matrix::b, CFX_Matrix::c, CFX_Matrix::Concat(), CFX_Matrix::d, CFX_Matrix::e, CFX_Matrix::f, CFX_Matrix::operator*(), CFX_Matrix::operator=(), CFX_Matrix::Rotate(), CFX_Matrix::Scale(), CFX_Matrix::Transform(), and CFX_Matrix::Translate().

Here is the call graph for this function:

◆ TEST() [12/19]

TEST ( CFX_Matrix ,
GetInverse  )

Definition at line 396 of file fx_coordinates_unittest.cpp.

References CFX_Matrix::CFX_Matrix(), CFX_Matrix::a, CFX_Matrix::b, CFX_Matrix::c, CFX_Matrix::d, CFX_Matrix::e, CFX_Matrix::f, and CFX_Matrix::GetInverse().

Here is the call graph for this function:

◆ TEST() [13/19]

TEST ( CFX_Matrix ,
GetInverseCR702041  )

Definition at line 414 of file fx_coordinates_unittest.cpp.

References CFX_Matrix::CFX_Matrix(), CFX_Matrix::a, CFX_Matrix::b, CFX_Matrix::c, CFX_Matrix::d, CFX_Matrix::e, CFX_Matrix::f, and CFX_Matrix::GetInverse().

Here is the call graph for this function:

◆ TEST() [14/19]

TEST ( CFX_Matrix ,
GetInverseCR714187  )

Definition at line 434 of file fx_coordinates_unittest.cpp.

References CFX_Matrix::CFX_Matrix(), CFX_Matrix::a, CFX_Matrix::b, CFX_Matrix::c, CFX_Matrix::d, CFX_Matrix::e, CFX_Matrix::f, and CFX_Matrix::GetInverse().

Here is the call graph for this function:

◆ TEST() [15/19]

TEST ( CFX_Matrix ,
ReverseIdentity  )

Definition at line 357 of file fx_coordinates_unittest.cpp.

References CFX_Matrix::CFX_Matrix(), CFX_Matrix::a, CFX_Matrix::b, CFX_Matrix::c, CFX_Matrix::d, CFX_Matrix::e, CFX_Matrix::f, and CFX_Matrix::GetInverse().

Here is the call graph for this function:

◆ TEST() [16/19]

TEST ( CFX_Matrix ,
SetIdentity  )

Definition at line 373 of file fx_coordinates_unittest.cpp.

References CFX_Matrix::CFX_Matrix(), CFX_Matrix::a, CFX_Matrix::b, CFX_Matrix::c, CFX_Matrix::d, CFX_Matrix::e, CFX_Matrix::f, CFX_Matrix::IsIdentity(), and CFX_Matrix::operator=().

Here is the call graph for this function:

◆ TEST() [17/19]

TEST ( CFX_Matrix ,
TransformRectForFloatRect  )

Definition at line 604 of file fx_coordinates_unittest.cpp.

References CFX_FloatRect::CFX_FloatRect(), CFX_FloatRect::Bottom(), CFX_FloatRect::Left(), CFX_FloatRect::operator=(), CFX_FloatRect::Right(), CFX_Matrix::Rotate(), CFX_Matrix::Scale(), CFX_FloatRect::Top(), and CFX_Matrix::TransformRect().

Here is the call graph for this function:

◆ TEST() [18/19]

TEST ( CFX_Matrix ,
TransformRectForRectF  )

Definition at line 583 of file fx_coordinates_unittest.cpp.

References CFX_RectF::CFX_RectF(), CFX_RectF::Height(), CFX_RectF::Left(), CFX_RectF::operator=(), CFX_Matrix::Rotate(), CFX_Matrix::Scale(), CFX_RectF::Top(), CFX_Matrix::TransformRect(), and CFX_RectF::Width().

Here is the call graph for this function:

◆ TEST() [19/19]

TEST ( CFX_RectF ,
Print  )

Definition at line 340 of file fx_coordinates_unittest.cpp.

References CFX_RectF::CFX_RectF(), and CFX_RectF::operator=().

Here is the call graph for this function: