mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 07:02:39 +00:00
Migrated project to XCTest
This commit is contained in:
@@ -6,10 +6,15 @@
|
||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "KPKHashedDataTest.h"
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#import "NSData+HashedData.h"
|
||||
#import "NSData+Random.h"
|
||||
|
||||
@interface KPKHashedDataTest : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation KPKHashedDataTest
|
||||
|
||||
- (void)testHashedData {
|
||||
@@ -17,7 +22,7 @@
|
||||
NSData *data = [NSData dataWithRandomBytes:10000];
|
||||
NSData *hashedData = [data hashedDataWithBlockSize:512];
|
||||
NSData *unhashedData = [hashedData unhashedData];
|
||||
STAssertTrue([unhashedData isEqualToData:data], @"Data needs to be the same after hashing and unhashing");
|
||||
XCTAssertTrue([unhashedData isEqualToData:data], @"Data needs to be the same after hashing and unhashing");
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user