From 68f0cf27dfe18ea91de3e6914947ecee7f9a2e88 Mon Sep 17 00:00:00 2001 From: Martin Carlberg Date: Tue, 21 Sep 2021 10:51:17 +0200 Subject: [PATCH] Fixed: Bundle test cases must run asynchronous as a bundle will also load asynchronous in Node. Also removed some compilation warnings from the test cases. --- Tests/Foundation/CPBundleTest.j | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Tests/Foundation/CPBundleTest.j b/Tests/Foundation/CPBundleTest.j index f301175fc..aa1fba3af 100644 --- a/Tests/Foundation/CPBundleTest.j +++ b/Tests/Foundation/CPBundleTest.j @@ -27,22 +27,22 @@ - (void)testCreationMainBundle { - var bundle = [CPBundle mainBundle]; + [CPBundle mainBundle]; } -- (void)testLoadingBundle +- (async void)testLoadingBundle { var bundle = [CPBundle bundleWithPath:@"Tests/Foundation/BundleTest"]; - [bundle loadWithDelegate:self]; + await [bundle loadWithDelegate:self]; [self assert:[bundle objectForInfoDictionaryKey:"CPBundleDefaultLanguage"] equals:"fr"]; [self assert:[bundle objectForInfoDictionaryKey:"CPBundleLocalizableStrings"] equals:["Localizable.strings"]]; } -- (void)testLocalization +- (async void)testLocalization { var bundle = [CPBundle bundleWithPath:@"Tests/Foundation/BundleTest"]; - [bundle loadWithDelegate:self]; + await [bundle loadWithDelegate:self]; [self assert:[bundle localizedStringForKey:"Label from file" value:"" table:"Localizable"] equals:"Label traduit de fr.lproj du premier context"]; [self assert:[bundle localizedStringForKey:"Wrong key" value:"Default value" table:"Localizable"] equals:"Default value"];