Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
28
iphone/Maps/Tests/Core/TextToSpeech/MWMTextToSpeechTests.mm
Normal file
28
iphone/Maps/Tests/Core/TextToSpeech/MWMTextToSpeechTests.mm
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#import <XCTest/XCTest.h>
|
||||
#import "MWMTextToSpeech+CPP.h"
|
||||
|
||||
@interface MWMTextToSpeechTest : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWMTextToSpeechTest
|
||||
|
||||
- (void)testAvailableLanguages {
|
||||
MWMTextToSpeech * tts = [MWMTextToSpeech tts];
|
||||
std::vector<std::pair<std::string, std::string>> langs = tts.availableLanguages;
|
||||
decltype(langs)::value_type const defaultLang = std::make_pair("en-US", "English (United States)");
|
||||
XCTAssertTrue(std::find(langs.begin(), langs.end(), defaultLang) != langs.end());
|
||||
}
|
||||
- (void)testTranslateLocaleWithTwineString {
|
||||
XCTAssertEqual(tts::translateLocale("en"), "English");
|
||||
}
|
||||
|
||||
- (void)testTranslateLocaleWithBcp47String {
|
||||
XCTAssertEqual(tts::translateLocale("en-US"), "English (United States)");
|
||||
}
|
||||
|
||||
- (void)testTranslateLocaleWithUnknownString {
|
||||
XCTAssertEqual(tts::translateLocale("unknown"), "");
|
||||
}
|
||||
|
||||
@end
|
||||
Loading…
Add table
Add a link
Reference in a new issue