blob: 6aee224d0f356c291fcb6a2942593a569fcd575e [file] [log] [blame]
// Copyright 2018 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TODO(dnfield): This belongs in the engine repo.
#import <Flutter/Flutter.h>
#import <XCTest/XCTest.h>
@interface ViewControllerRelease : XCTestCase
@end
@implementation ViewControllerRelease
- (void)testReleaseFlutterViewController {
__weak FlutterEngine* weakEngine;
@autoreleasepool {
FlutterViewController* viewController = [[FlutterViewController alloc]
init];
weakEngine = viewController.engine;
[viewController viewWillAppear:NO];
[viewController viewDidDisappear:NO];
}
XCTAssertNil(weakEngine);
}
@end