Cleanup: Made a macro to assert ARC is enabled. (flutter/engine#12701)
Cleanup: Made a macro to assert ARC is enabled (and its inverse).
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user