blob: 724c64f207427860621047a719249bc7259d69e4 [file] [log] [blame]
license.botf003cfe2008-08-24 09:55:55 +09001// Copyright (c) 2006-2008 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.
initial.commit3f4a7322008-07-27 06:49:38 +09004
5#include "testing/gtest/include/gtest/gtest.h"
6#include "base/ref_counted.h"
7
8class SelfAssign : public base::RefCounted<SelfAssign> {
9};
10
11TEST(RefCountedUnitTest, TestSelfAssignment) {
12 SelfAssign* p = new SelfAssign;
13 scoped_refptr<SelfAssign> var = p;
14 var = var;
15 EXPECT_EQ(var.get(), p);
16}
license.botf003cfe2008-08-24 09:55:55 +090017