@@ -73,15 +73,52 @@ - (void)testFLTFrameworkBundleInternalWhenBundleIsPresent {
7373 XCTAssertNotNil (found);
7474}
7575
76+ - (void )testDisableImpellerSettingIsCorrectlyParsed {
77+ id mockMainBundle = OCMPartialMock ([NSBundle mainBundle ]);
78+ OCMStub ([mockMainBundle objectForInfoDictionaryKey: @" FLTEnableImpeller" ]).andReturn (@" NO" );
79+
80+ auto settings = FLTDefaultSettingsForBundle ();
81+ // Check settings.enable_impeller value is same as the value defined in Info.plist.
82+ XCTAssertEqual (settings.enable_impeller , NO );
83+ }
84+
7685- (void )testEnableImpellerSettingIsCorrectlyParsed {
77- // The FLTEnableImpeller's value is defined in Info.plist
78- NSBundle * mainBundle = [NSBundle mainBundle ];
79- NSNumber * enableImpeller = [mainBundle objectForInfoDictionaryKey: @" FLTEnableImpeller" ];
80- XCTAssertEqual (enableImpeller.boolValue , NO );
86+ id mockMainBundle = OCMPartialMock ([NSBundle mainBundle ]);
87+ OCMStub ([mockMainBundle objectForInfoDictionaryKey: @" FLTEnableImpeller" ]).andReturn (@" YES" );
88+
89+ auto settings = FLTDefaultSettingsForBundle ();
90+ // Check settings.enable_impeller value is same as the value defined in Info.plist.
91+ XCTAssertEqual (settings.enable_impeller , YES );
92+ }
93+
94+ - (void )testDisableImpellerAppBundleSettingIsCorrectlyParsed {
95+ NSString * bundleId = [FlutterDartProject defaultBundleIdentifier ];
96+ id mockAppBundle = OCMClassMock ([NSBundle class ]);
97+ OCMStub ([mockAppBundle objectForInfoDictionaryKey: @" FLTEnableImpeller" ]).andReturn (@" NO" );
98+
99+ id nsBundleMock = OCMClassMock ([NSBundle class ]);
100+ OCMStub ([nsBundleMock bundleWithIdentifier: bundleId]).andReturn (mockAppBundle);
81101
82102 auto settings = FLTDefaultSettingsForBundle ();
83103 // Check settings.enable_impeller value is same as the value defined in Info.plist.
84104 XCTAssertEqual (settings.enable_impeller , NO );
105+
106+ [nsBundleMock stopMocking ];
107+ }
108+
109+ - (void )testEnableImpellerAppBundleSettingIsCorrectlyParsed {
110+ NSString * bundleId = [FlutterDartProject defaultBundleIdentifier ];
111+ id mockAppBundle = OCMClassMock ([NSBundle class ]);
112+ OCMStub ([mockAppBundle objectForInfoDictionaryKey: @" FLTEnableImpeller" ]).andReturn (@" YES" );
113+
114+ id nsBundleMock = OCMClassMock ([NSBundle class ]);
115+ OCMStub ([nsBundleMock bundleWithIdentifier: bundleId]).andReturn (mockAppBundle);
116+
117+ auto settings = FLTDefaultSettingsForBundle ();
118+ // Check settings.enable_impeller value is same as the value defined in Info.plist.
119+ XCTAssertEqual (settings.enable_impeller , YES );
120+
121+ [nsBundleMock stopMocking ];
85122}
86123
87124- (void )testEnableTraceSystraceSettingIsCorrectlyParsed {
0 commit comments