int printf(const char * _Format, ...);
@interface Foo
@end
@implementation Foo
- (void)instanceTest1 {
printf("__func__: %s\n", __func__);
printf("__FUNCTION__: %s\n", __FUNCTION__);
printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__);
}
- (void)instanceTest2:(int)i {
printf("__func__: %s\n", __func__);
printf("__FUNCTION__: %s\n", __FUNCTION__);
printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__);
}
- (void)instanceTest3:(int)a withB:(double)b {
printf("__func__: %s\n", __func__);
printf("__FUNCTION__: %s\n", __FUNCTION__);
printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__);
}
- (int)instanceTest4 {
printf("__func__: %s\n", __func__);
printf("__FUNCTION__: %s\n", __FUNCTION__);
printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__);
return 0;
}
+ (void)classTest1 {
printf("__func__: %s\n", __func__);
printf("__FUNCTION__: %s\n", __FUNCTION__);
printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__);
}
+ (void)classTest2:(int)i {
printf("__func__: %s\n", __func__);
printf("__FUNCTION__: %s\n", __FUNCTION__);
printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__);
}
+ (void)classTest3:(int)a withB:(double)b {
printf("__func__: %s\n", __func__);
printf("__FUNCTION__: %s\n", __FUNCTION__);
printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__);
}
+ (int)classTest4 {
printf("__func__: %s\n", __func__);
printf("__FUNCTION__: %s\n", __FUNCTION__);
printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__);
return 0;
}
@end
@interface Foo (Category)
@end
@implementation Foo (Category)
- (void)instanceTestWithCategory {
printf("__func__: %s\n", __func__);
printf("__FUNCTION__: %s\n", __FUNCTION__);
printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__);
}
+ (void)classTestWithCategory {
printf("__func__: %s\n", __func__);
printf("__FUNCTION__: %s\n", __FUNCTION__);
printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__);
}
@end