mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-02 00:17:02 +00:00
no message
This commit is contained in:
parent
c9618f5009
commit
e4ad18f645
@ -61,7 +61,6 @@
|
||||
D0085B1C1B28285400EAF753 /* STimer.m in Sources */ = {isa = PBXBuildFile; fileRef = D0085AE61B28285400EAF753 /* STimer.m */; };
|
||||
D0085B271B282B9800EAF753 /* SwiftSignalKit.h in Headers */ = {isa = PBXBuildFile; fileRef = D0085B261B282B9800EAF753 /* SwiftSignalKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D0085B2D1B282B9800EAF753 /* SwiftSignalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0085B221B282B9800EAF753 /* SwiftSignalKit.framework */; };
|
||||
D0085B4F1B282BEE00EAF753 /* SwiftSignalKit.h in Headers */ = {isa = PBXBuildFile; fileRef = D0085B3B1B282BEE00EAF753 /* SwiftSignalKit.h */; };
|
||||
D0085B501B282BEE00EAF753 /* Signal_Timing.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0085B3C1B282BEE00EAF753 /* Signal_Timing.swift */; };
|
||||
D0085B511B282BEE00EAF753 /* Signal_SideEffects.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0085B3D1B282BEE00EAF753 /* Signal_SideEffects.swift */; };
|
||||
D0085B521B282BEE00EAF753 /* Signal_Dispatch.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0085B3E1B282BEE00EAF753 /* Signal_Dispatch.swift */; };
|
||||
@ -409,7 +408,6 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D0085B271B282B9800EAF753 /* SwiftSignalKit.h in Headers */,
|
||||
D0085B4F1B282BEE00EAF753 /* SwiftSignalKit.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -529,7 +527,7 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0700;
|
||||
LastUpgradeCheck = 0610;
|
||||
LastUpgradeCheck = 0640;
|
||||
ORGANIZATIONNAME = Telegram;
|
||||
TargetAttributes = {
|
||||
D0085B211B282B9800EAF753 = {
|
||||
|
@ -171,42 +171,6 @@
|
||||
XCTAssertTrue(generated);
|
||||
}
|
||||
|
||||
- (void)testInplaceMap
|
||||
{
|
||||
bool deallocated = false;
|
||||
__block bool disposed = false;
|
||||
__block bool generated = false;
|
||||
|
||||
@autoreleasepool
|
||||
{
|
||||
DeallocatingObject *object = [[DeallocatingObject alloc] initWithDeallocated:&deallocated];
|
||||
SSignal *signal = [[[SSignal alloc] initWithGenerator:^id<SDisposable>(SSubscriber *subscriber)
|
||||
{
|
||||
[subscriber putNext:@1];
|
||||
__unused id a0 = [object description];
|
||||
return [[SBlockDisposable alloc] initWithBlock:^
|
||||
{
|
||||
__unused id a1 = [object description];
|
||||
disposed = true;
|
||||
}];
|
||||
}] _mapInplace:^id(id value)
|
||||
{
|
||||
__unused id a1 = [object description];
|
||||
return @([value intValue] * 2);
|
||||
}];
|
||||
|
||||
id<SDisposable> disposable = [signal startWithNext:^(id value)
|
||||
{
|
||||
generated = [value isEqual:@2];
|
||||
} error:nil completed:nil];
|
||||
[disposable dispose];
|
||||
}
|
||||
|
||||
XCTAssertTrue(deallocated);
|
||||
XCTAssertTrue(disposed);
|
||||
XCTAssertTrue(generated);
|
||||
}
|
||||
|
||||
- (void)testSubscriberDisposal
|
||||
{
|
||||
__block bool disposed = false;
|
||||
|
@ -47,83 +47,4 @@
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)testMapInplace
|
||||
{
|
||||
[self measureBlock:^
|
||||
{
|
||||
SSignal *signal = [[[SSignal alloc] initWithGenerator:^id<SDisposable>(SSubscriber *subscriber)
|
||||
{
|
||||
[subscriber putNext:@1];
|
||||
[subscriber putCompletion];
|
||||
return nil;
|
||||
}] _mapInplace:^id (id value)
|
||||
{
|
||||
return value;
|
||||
}];
|
||||
|
||||
for (int i = 0; i < 100000; i++)
|
||||
{
|
||||
[signal startWithNext:^(__unused id next)
|
||||
{
|
||||
|
||||
}];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)testMapInplaceWithDisposable
|
||||
{
|
||||
[self measureBlock:^
|
||||
{
|
||||
SSignal *signal = [[[SSignal alloc] initWithGenerator:^id<SDisposable>(SSubscriber *subscriber)
|
||||
{
|
||||
[subscriber putNext:@1];
|
||||
return [[SBlockDisposable alloc] initWithBlock:^
|
||||
{
|
||||
}];
|
||||
}] _mapInplace:^id (id value)
|
||||
{
|
||||
return value;
|
||||
}];
|
||||
|
||||
for (int i = 0; i < 100000; i++)
|
||||
{
|
||||
[signal startWithNext:^(__unused id next)
|
||||
{
|
||||
|
||||
}];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)testMapInplace2WithDisposable
|
||||
{
|
||||
[self measureBlock:^
|
||||
{
|
||||
SSignal *signal = [[[[SSignal alloc] initWithGenerator:^id<SDisposable>(SSubscriber *subscriber)
|
||||
{
|
||||
[subscriber putNext:@1];
|
||||
[subscriber putCompletion];
|
||||
|
||||
return [[SBlockDisposable alloc] initWithBlock:^
|
||||
{
|
||||
}];
|
||||
}] _mapInplace:^id (id value)
|
||||
{
|
||||
return value;
|
||||
}] _mapInplace:^id (id value)
|
||||
{
|
||||
return value;
|
||||
}];
|
||||
|
||||
for (int i = 0; i < 100000; i++)
|
||||
{
|
||||
[signal startWithNext:^(__unused id next)
|
||||
{
|
||||
|
||||
}];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
|
Loading…
x
Reference in New Issue
Block a user