@@ -16,10 +16,11 @@ #include "config.h" #import "OFString.h" #import "OTAssertionFailedException.h" +#import "OTTestSkippedException.h" void OTAssertImpl(id testCase, SEL test, bool condition, OFString *check, OFString *file, size_t line, ...) { @@ -41,5 +42,25 @@ va_end(arguments); @throw [OTAssertionFailedException exceptionWithCondition: check message: message]; } + +void +OTSkipImpl(id testCase, SEL test, OFString *file, size_t line, ...) +{ + va_list arguments; + OFConstantString *format; + OFString *message = nil; + + va_start(arguments, line); + format = va_arg(arguments, OFConstantString *); + + if (format != nil) + message = [[[OFString alloc] + initWithFormat: format + arguments: arguments] autorelease]; + + va_end(arguments); + + @throw [OTTestSkippedException exceptionWithMessage: message]; +}