Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Side by Side Diff: Source/platform/transforms/TransformOperationsTest.cpp

Issue 1184673003: Fix unit test style in Source/platform/, part 2. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 17 matching lines...) Expand all
28 #include "platform/geometry/FloatBox.h" 28 #include "platform/geometry/FloatBox.h"
29 #include "platform/geometry/FloatBoxTestHelpers.h" 29 #include "platform/geometry/FloatBoxTestHelpers.h"
30 #include "platform/transforms/IdentityTransformOperation.h" 30 #include "platform/transforms/IdentityTransformOperation.h"
31 #include "platform/transforms/Matrix3DTransformOperation.h" 31 #include "platform/transforms/Matrix3DTransformOperation.h"
32 #include "platform/transforms/MatrixTransformOperation.h" 32 #include "platform/transforms/MatrixTransformOperation.h"
33 #include "platform/transforms/PerspectiveTransformOperation.h" 33 #include "platform/transforms/PerspectiveTransformOperation.h"
34 #include "platform/transforms/RotateTransformOperation.h" 34 #include "platform/transforms/RotateTransformOperation.h"
35 #include "platform/transforms/ScaleTransformOperation.h" 35 #include "platform/transforms/ScaleTransformOperation.h"
36 #include "platform/transforms/SkewTransformOperation.h" 36 #include "platform/transforms/SkewTransformOperation.h"
37 #include "platform/transforms/TranslateTransformOperation.h" 37 #include "platform/transforms/TranslateTransformOperation.h"
38
39 #include <gtest/gtest.h> 38 #include <gtest/gtest.h>
40 39
41 using namespace blink; 40 namespace blink {
42 namespace {
43 41
44 static const TransformOperations identityOperations; 42 static const TransformOperations identityOperations;
45 43
46 static void EmpiricallyTestBounds(const TransformOperations& from, 44 static void EmpiricallyTestBounds(const TransformOperations& from,
47 const TransformOperations& to, 45 const TransformOperations& to,
48 const double& minProgress, 46 const double& minProgress,
49 const double& maxProgress) 47 const double& maxProgress)
50 { 48 {
51 FloatBox box(200, 500, 100, 100, 300, 200); 49 FloatBox box(200, 500, 100, 100, 300, 200);
52 FloatBox bounds; 50 FloatBox bounds;
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 EXPECT_TRUE(toOps.blendedBoundsForBox(box, fromOps, 0, 1, &bounds)); 481 EXPECT_TRUE(toOps.blendedBoundsForBox(box, fromOps, 0, 1, &bounds));
484 EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, FloatBox(-32, -25, 7, 4 2, 44, 48), bounds); 482 EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, FloatBox(-32, -25, 7, 4 2, 44, 48), bounds);
485 483
486 EXPECT_TRUE(toOps.blendedBoundsForBox(box, identityOperations, 0, 1, &bounds )); 484 EXPECT_TRUE(toOps.blendedBoundsForBox(box, identityOperations, 0, 1, &bounds ));
487 EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, FloatBox(-33, -13, 3, 5 7, 19, 52), bounds); 485 EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, FloatBox(-33, -13, 3, 5 7, 19, 52), bounds);
488 486
489 EXPECT_TRUE(identityOperations.blendedBoundsForBox(box, fromOps, 0, 1, &boun ds)); 487 EXPECT_TRUE(identityOperations.blendedBoundsForBox(box, fromOps, 0, 1, &boun ds));
490 EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, FloatBox(-7, -3, 2, 15, 23, 20), bounds); 488 EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, FloatBox(-7, -3, 2, 15, 23, 20), bounds);
491 } 489 }
492 490
493 } // namespace 491 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698