Skip to content

Commit

Permalink
base: No need to inherit testing::Test in base64 unittest.
Browse files Browse the repository at this point in the history
TEST=base_unittests
TBR=willchan@chromium.org


Review URL: https://chromiumcodereview.appspot.com/10969059

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158203 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
tfarina@chromium.org committed Sep 23, 2012
1 parent e6b63cd commit 24f111a
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions base/base64_unittest.cc
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Copyright (c) 2012 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.

#include "base/base64.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace {

class Base64Test : public testing::Test {
};
#include "testing/gtest/include/gtest/gtest.h"

} // namespace
namespace base {

TEST(Base64Test, Basic) {
const std::string kText = "hello world";
const std::string kBase64Text = "aGVsbG8gd29ybGQ=";

std::string encoded, decoded;
std::string encoded;
std::string decoded;
bool ok;

ok = base::Base64Encode(kText, &encoded);
ok = Base64Encode(kText, &encoded);
EXPECT_TRUE(ok);
EXPECT_EQ(kBase64Text, encoded);

ok = base::Base64Decode(encoded, &decoded);
ok = Base64Decode(encoded, &decoded);
EXPECT_TRUE(ok);
EXPECT_EQ(kText, decoded);
}

} // namespace base

0 comments on commit 24f111a

Please sign in to comment.