Remove DeprecationWarning filtering from testserver.py
[chromium-blink-merge.git] / cc / layer_quad_unittest.cc
blob137d1793f7d2568cb9a409f7530049e8473e07dd
1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "config.h"
7 #include "cc/layer_quad.h"
9 #include "testing/gtest/include/gtest/gtest.h"
11 using namespace cc;
13 namespace {
15 TEST(LayerQuadTest, FloatQuadConversion)
17 FloatPoint p1(-0.5, -0.5);
18 FloatPoint p2( 0.5, -0.5);
19 FloatPoint p3( 0.5, 0.5);
20 FloatPoint p4(-0.5, 0.5);
22 FloatQuad quadCW(p1, p2, p3, p4);
23 LayerQuad layerQuadCW(quadCW);
24 EXPECT_TRUE(layerQuadCW.floatQuad() == quadCW);
26 FloatQuad quadCCW(p1, p4, p3, p2);
27 LayerQuad layerQuadCCW(quadCCW);
28 EXPECT_TRUE(layerQuadCCW.floatQuad() == quadCCW);
31 TEST(LayerQuadTest, Inflate)
33 FloatPoint p1(-0.5, -0.5);
34 FloatPoint p2( 0.5, -0.5);
35 FloatPoint p3( 0.5, 0.5);
36 FloatPoint p4(-0.5, 0.5);
38 FloatQuad quad(p1, p2, p3, p4);
39 LayerQuad layerQuad(quad);
40 quad.scale(2, 2);
41 layerQuad.inflate(0.5);
42 EXPECT_TRUE(layerQuad.floatQuad() == quad);
45 } // namespace