19 class DENORMTest :
public testing::Test {
22 std::locale::global(std::locale(
""));
28 void ExpectCorrectTransform(
const DENORM& denorm,
const TPOINT& src,
29 const TPOINT& result,
bool local) {
35 EXPECT_EQ(result.
x, normed.
x);
36 EXPECT_EQ(result.
y, normed.
y);
43 EXPECT_EQ(src.
x, denormed.
x);
44 EXPECT_EQ(src.
y, denormed.
y);
49 TEST_F(DENORMTest, NoRotations) {
55 ExpectCorrectTransform(denorm, pt1, result1,
true);
56 ExpectCorrectTransform(denorm, pt1, result1,
false);
59 ExpectCorrectTransform(denorm, pt2, result2,
true);
60 ExpectCorrectTransform(denorm, pt2, result2,
false);
64 TEST_F(DENORMTest, WithRotations) {
66 FCOORD rotation90(0.0f, 1.0f);
72 ExpectCorrectTransform(denorm, pt1, result1,
true);
73 ExpectCorrectTransform(denorm, pt1, result1,
false);
76 ExpectCorrectTransform(denorm, pt2, result2,
true);
77 ExpectCorrectTransform(denorm, pt2, result2,
false);
81 TEST_F(DENORMTest, Multiple) {
87 FCOORD rotation90(0.0f, 1.0f);
92 ExpectCorrectTransform(denorm, pt1, result1,
true);
93 ExpectCorrectTransform(denorm, pt1, result1,
false);
95 ExpectCorrectTransform(denorm2, result1, result2,
true);
96 ExpectCorrectTransform(denorm2, pt1, result2,
false);