Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Yang committed Sep 23, 2023
1 parent 4cea08d commit 62cad07
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ - (void)testFLTAssetPathReturnsTheCorrectValue {
}
}

- (void)testLookUpForAssets{
- (void)testLookUpForAssets {
{
id mockBundle = OCMPartialMock([NSBundle mainBundle]);
// Found assets path in info.plist
Expand Down Expand Up @@ -182,7 +182,8 @@ - (void)testLookUpForAssetsFromPackage {
OCMStub([mockBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]).andReturn(nil);
NSString* assetsPath = [FlutterDartProject lookupKeyForAsset:@"bar" fromPackage:@"bar_package"];
// This is testing public API, changing this assert is likely to break plugins.
XCTAssertEqualObjects(assetsPath, @"Frameworks/App.framework/flutter_assets/packages/bar_package/bar");
XCTAssertEqualObjects(assetsPath,
@"Frameworks/App.framework/flutter_assets/packages/bar_package/bar");
[mockBundle stopMocking];
}
}
Expand All @@ -192,17 +193,22 @@ - (void)testLookUpForAssetsFromPackageFromBundle {
id mockBundle = OCMClassMock([NSBundle class]);
// Found assets path in info.plist
OCMStub([mockBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]).andReturn(@"foo/assets");
NSString* assetsPath = [FlutterDartProject lookupKeyForAsset:@"bar" fromPackage:@"bar_package" fromBundle:mockBundle];
NSString* assetsPath = [FlutterDartProject lookupKeyForAsset:@"bar"
fromPackage:@"bar_package"
fromBundle:mockBundle];
// This is testing public API, changing this assert is likely to break plugins.
XCTAssertEqualObjects(assetsPath, @"foo/assets/packages/bar_package/bar");
}
{
id mockBundle = OCMClassMock([NSBundle class]);
id mockBundle = OCMClassMock([NSBundle class]);
// No assets path in info.plist, use default value
OCMStub([mockBundle objectForInfoDictionaryKey:@"FLTAssetsPath"]).andReturn(nil);
NSString* assetsPath = [FlutterDartProject lookupKeyForAsset:@"bar" fromPackage:@"bar_package" fromBundle:mockBundle];
NSString* assetsPath = [FlutterDartProject lookupKeyForAsset:@"bar"
fromPackage:@"bar_package"
fromBundle:mockBundle];
// This is testing public API, changing this assert is likely to break plugins.
XCTAssertEqualObjects(assetsPath, @"Frameworks/App.framework/flutter_assets/packages/bar_package/bar");
XCTAssertEqualObjects(assetsPath,
@"Frameworks/App.framework/flutter_assets/packages/bar_package/bar");
}
}

Expand Down

0 comments on commit 62cad07

Please sign in to comment.