Skip to content

Commit

Permalink
ui: Remove unnecessary typedefs of testing::Test.
Browse files Browse the repository at this point in the history
The TEST() macro is used to define and name a test function, the first argument
is the test case name and thus doesn't need to be a typedef of testing::Test.

BUG=None
TEST=ui_unittests

R=phajdan.jr@chromium.org

Review URL: http://codereview.chromium.org/7262022

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90567 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
tfarina@chromium.org committed Jun 27, 2011
1 parent ddcaa6f commit 2f8fc8d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 20 deletions.
10 changes: 4 additions & 6 deletions ui/base/animation/multi_animation_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

namespace ui {

typedef testing::Test MultiAnimationTest;

TEST_F(MultiAnimationTest, Basic) {
TEST(MultiAnimationTest, Basic) {
// Create a MultiAnimation with two parts.
MultiAnimation::Parts parts;
parts.push_back(MultiAnimation::Part(100, Tween::LINEAR));
Expand Down Expand Up @@ -38,7 +36,7 @@ TEST_F(MultiAnimationTest, Basic) {
animation.GetCurrentValue());
}

TEST_F(MultiAnimationTest, DifferingStartAndEnd) {
TEST(MultiAnimationTest, DifferingStartAndEnd) {
// Create a MultiAnimation with two parts.
MultiAnimation::Parts parts;
parts.push_back(MultiAnimation::Part(200, Tween::LINEAR));
Expand All @@ -61,7 +59,7 @@ TEST_F(MultiAnimationTest, DifferingStartAndEnd) {
}

// Makes sure multi-animation stops if cycles is false.
TEST_F(MultiAnimationTest, DontCycle) {
TEST(MultiAnimationTest, DontCycle) {
MultiAnimation::Parts parts;
parts.push_back(MultiAnimation::Part(200, Tween::LINEAR));
MultiAnimation animation(parts);
Expand All @@ -77,7 +75,7 @@ TEST_F(MultiAnimationTest, DontCycle) {
}

// Makes sure multi-animation cycles correctly.
TEST_F(MultiAnimationTest, Cycle) {
TEST(MultiAnimationTest, Cycle) {
MultiAnimation::Parts parts;
parts.push_back(MultiAnimation::Part(200, Tween::LINEAR));
MultiAnimation animation(parts);
Expand Down
6 changes: 2 additions & 4 deletions ui/base/dragdrop/os_exchange_data_win_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,17 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_handle.h"
#include "base/memory/scoped_ptr.h"
#include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/base/dragdrop/os_exchange_data_provider_win.h"
#include "base/pickle.h"
#include "base/utf_string_conversions.h"
#include "base/win/scoped_hglobal.h"
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/clipboard/clipboard_util_win.h"
#include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/base/dragdrop/os_exchange_data_provider_win.h"

namespace ui {

typedef testing::Test OSExchangeDataTest;

namespace {

OSExchangeData::Provider* CloneProvider(const OSExchangeData& data) {
Expand Down
14 changes: 6 additions & 8 deletions ui/base/view_prop_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,15 @@
#include "base/memory/scoped_ptr.h"
#include "ui/base/view_prop.h"

namespace ui {

typedef testing::Test ViewPropTest;
namespace {
const char kKey1[] = "key_1";
const char kKey2[] = "key_2";
} // namespace

static const char* kKey1 = "key_1";
static const char* kKey2 = "key_2";

using ui::ViewProp;
namespace ui {

// Test a handful of viewprop assertions.
TEST_F(ViewPropTest, Basic) {
TEST(ViewPropTest, Basic) {
gfx::NativeView nv1 = reinterpret_cast<gfx::NativeView>(1);
gfx::NativeView nv2 = reinterpret_cast<gfx::NativeView>(2);

Expand Down
6 changes: 4 additions & 2 deletions ui/gfx/rect_unittest.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

Expand All @@ -7,7 +7,7 @@
#include "ui/gfx/rect.h"
#include "ui/gfx/skia_util.h"

typedef testing::Test RectTest;
namespace ui {

TEST(RectTest, Contains) {
static const struct ContainsCase {
Expand Down Expand Up @@ -328,3 +328,5 @@ TEST(RectTest, ConstructAndAssign) {
gfx::Rect test2(rect_2);
}
#endif

} // namespace ui

0 comments on commit 2f8fc8d

Please sign in to comment.