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

Side by Side Diff: printing/units_unittest.cc

Issue 6995006: printing: Replace "using namespace printing;" wrapping the tests around "namespace printing { ... }" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unnamed namespace Created 9 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "printing/units.h" 5 #include "printing/units.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 #include "testing/gtest/include/gtest/gtest-spi.h" 7 #include "testing/gtest/include/gtest/gtest-spi.h"
8 8
9 using namespace printing; 9 namespace printing {
10 10
11 TEST(UnitsTest, Convertions) { 11 TEST(UnitsTest, Convertions) {
12 EXPECT_EQ(100, ConvertUnit(100, 100, 100)); 12 EXPECT_EQ(100, ConvertUnit(100, 100, 100));
13 EXPECT_EQ(-100, ConvertUnit(-100, 100, 100)); 13 EXPECT_EQ(-100, ConvertUnit(-100, 100, 100));
14 EXPECT_EQ(0, ConvertUnit(0, 100, 100)); 14 EXPECT_EQ(0, ConvertUnit(0, 100, 100));
15 EXPECT_EQ(99, ConvertUnit(99, 100, 100)); 15 EXPECT_EQ(99, ConvertUnit(99, 100, 100));
16 EXPECT_EQ(101, ConvertUnit(101, 100, 100)); 16 EXPECT_EQ(101, ConvertUnit(101, 100, 100));
17 EXPECT_EQ(99900, ConvertUnit(999, 10, 1000)); 17 EXPECT_EQ(99900, ConvertUnit(999, 10, 1000));
18 EXPECT_EQ(100100, ConvertUnit(1001, 10, 1000)); 18 EXPECT_EQ(100100, ConvertUnit(1001, 10, 1000));
19 19
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 EXPECT_EQ(0, ConvertHundredThousanthMeterToMilliInch(0)); 52 EXPECT_EQ(0, ConvertHundredThousanthMeterToMilliInch(0));
53 53
54 EXPECT_EQ(8.25, ConvertPixelsToPointDouble(11.0)); 54 EXPECT_EQ(8.25, ConvertPixelsToPointDouble(11.0));
55 // Round down. 55 // Round down.
56 EXPECT_EQ(8, ConvertPixelsToPoint(11)); 56 EXPECT_EQ(8, ConvertPixelsToPoint(11));
57 EXPECT_EQ(7.5, ConvertPixelsToPointDouble(10.0)); 57 EXPECT_EQ(7.5, ConvertPixelsToPointDouble(10.0));
58 // Round up. 58 // Round up.
59 EXPECT_EQ(8, ConvertPixelsToPoint(10)); 59 EXPECT_EQ(8, ConvertPixelsToPoint(10));
60 EXPECT_EQ(0, ConvertPixelsToPoint(0)); 60 EXPECT_EQ(0, ConvertPixelsToPoint(0));
61 } 61 }
62
63 } // namespace printing
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698