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

Unified Diff: base/mac/scoped_nsobject_unittest.mm

Issue 1855483004: [iOS/OS X] Allow base::scoped_nsobject<> to be used when ARC is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing copy constructor from scoped_nsobject<subclass> to scoped_nsobject<class> Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/mac/scoped_nsobject.mm ('k') | base/mac/scoped_nsobject_unittest_arc.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mac/scoped_nsobject_unittest.mm
diff --git a/base/mac/scoped_nsobject_unittest.mm b/base/mac/scoped_nsobject_unittest.mm
index 8b0b97df3a72df06e987cd09032bd23cbd2a05f2..cefb5fe19fbb29ac1f0a91667497b13f353a3fe4 100644
--- a/base/mac/scoped_nsobject_unittest.mm
+++ b/base/mac/scoped_nsobject_unittest.mm
@@ -8,8 +8,16 @@
#include "base/mac/scoped_nsobject.h"
#include "testing/gtest/include/gtest/gtest.h"
+// See scoped_nsobject_unittest_arc.mm for why this is necessary. Remove once
+// gyp support is dropped.
+void ScopedNSObjectUnittestArcLinkerWorkaround();
+
namespace {
+TEST(ScopedNSObjectTest, EnableARCTests) {
+ ScopedNSObjectUnittestArcLinkerWorkaround();
+}
+
TEST(ScopedNSObjectTest, ScopedNSObject) {
base::scoped_nsobject<NSObject> p1([[NSObject alloc] init]);
ASSERT_TRUE(p1.get());
« no previous file with comments | « base/mac/scoped_nsobject.mm ('k') | base/mac/scoped_nsobject_unittest_arc.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698