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

35 lines
899 B
Objective-C

//
// RSTSilentAssertionHandler.m
// Roxas
//
// Created by Hthik on 1/13/17.
// Copyright © 2017 Hthik. All rights reserved.
//
#import "RSTSilentAssertionHandler.h"
@implementation RSTSilentAssertionHandler
+ (void)enable
{
RSTSilentAssertionHandler *assertionHandler = [[RSTSilentAssertionHandler alloc] init];
[[[NSThread currentThread] threadDictionary] setValue:assertionHandler forKey:NSAssertionHandlerKey];
}
+ (void)disable
{
[[[NSThread currentThread] threadDictionary] setValue:nil forKey:NSAssertionHandlerKey];
}
- (void)handleFailureInMethod:(SEL)selector object:(id)object file:(NSString *)fileName lineNumber:(NSInteger)line description:(NSString *)format, ...
{
// Do nothing
}
- (void)handleFailureInFunction:(NSString *)functionName file:(NSString *)fileName lineNumber:(NSInteger)line description:(NSString *)format, ...
{
// Do nothing
}
@end