未验证 提交 669cbba0 编写于 作者: G gaaclarke 提交者: GitHub

Cleanup: Made a macro to assert ARC is enabled. (#12701)

Cleanup: Made a macro to assert ARC is enabled (and its inverse).
上级 c53b0766
......@@ -37,4 +37,12 @@
*/
#define FLUTTER_UNAVAILABLE(msg) __attribute__((__unavailable__(msg)))
#if __has_feature(objc_arc)
#define FLUTTER_ASSERT_ARC
#define FLUTTER_ASSERT_NOT_ARC #error ARC must be disabled!
#else
#define FLUTTER_ASSERT_ARC #error ARC must be enabled!
#define FLUTTER_ASSERT_NOT_ARC
#endif
#endif // FLUTTER_FLUTTERMACROS_H_
......@@ -4,15 +4,10 @@
#import <OCMock/OCMock.h>
#import <XCTest/XCTest.h>
#include "flutter/shell/platform/darwin/common/framework/Headers/FlutterMacros.h"
#import "flutter/shell/platform/darwin/ios/framework/Source/FlutterBinaryMessengerRelay.h"
#ifndef __has_feature
#define __has_feature(x) 0 /* for non-clang compilers */
#endif
#if !__has_feature(objc_arc)
#error ARC must be enabled!
#endif
FLUTTER_ASSERT_ARC
@interface FlutterBinaryMessengerRelayTest : XCTestCase
@end
......
......@@ -4,15 +4,10 @@
#import <OCMock/OCMock.h>
#import <XCTest/XCTest.h>
#include "flutter/shell/platform/darwin/common/framework/Headers/FlutterMacros.h"
#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterEngine.h"
#ifndef __has_feature
#define __has_feature(x) 0 /* for non-clang compilers */
#endif
#if !__has_feature(objc_arc)
#error ARC must be enabled!
#endif
FLUTTER_ASSERT_ARC
@interface FlutteEngineTest : XCTestCase
@end
......
......@@ -4,15 +4,10 @@
#import <OCMock/OCMock.h>
#import <XCTest/XCTest.h>
#include "flutter/shell/platform/darwin/common/framework/Headers/FlutterMacros.h"
#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterPluginAppLifeCycleDelegate.h"
#ifndef __has_feature
#define __has_feature(x) 0 /* for non-clang compilers */
#endif
#if !__has_feature(objc_arc)
#error ARC must be enabled!
#endif
FLUTTER_ASSERT_ARC
@interface FlutterPluginAppLifeCycleDelegateTest : XCTestCase
......
......@@ -4,13 +4,12 @@
#import <OCMock/OCMock.h>
#import <XCTest/XCTest.h>
#include "flutter/shell/platform/darwin/common/framework/Headers/FlutterMacros.h"
#import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h"
#include "FlutterBinaryMessenger.h"
#if !__has_feature(objc_arc)
#error ARC must be enabled!
#endif
FLUTTER_ASSERT_ARC
extern NSNotificationName const FlutterViewControllerWillDealloc;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册