GBA-8-19/External/Roxas/RoxasTests/NSStringLocalizationTests.m
2024-06-14 17:15:51 +08:00

43 lines
740 B
Objective-C

//
// NSStringLocalizationTests.m
// Roxas
//
// Created by Hthik on 1/13/17.
// Copyright © 2017 Hthik. All rights reserved.
//
#import "NSString+Localization.h"
#import "RSTSilentAssertionHandler.h"
@import XCTest;
@interface NSStringLocalizationTests : XCTestCase
@end
@implementation NSStringLocalizationTests
- (void)setUp
{
[super setUp];
}
- (void)tearDown
{
[super tearDown];
}
- (void)testSystemLocalization
{
XCTAssertNoThrow(RSTSystemLocalizedString(@"Done"));
XCTAssertThrows(RSTSystemLocalizedString(@" Hthik"));
[RSTSilentAssertionHandler enable];
XCTAssertEqualObjects(@" Hthik", RSTSystemLocalizedString(@" Hthik"));
[RSTSilentAssertionHandler disable];
}
@end