12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#include "config.h"
#import "OFPlugin.h"
#import "OFAutoreleasePool.h"
#import "OFString.h"
#import "OFExceptions.h"
#import "main.h"
#import "plugin/TestPlugin.h"
static OFString *module = @"OFPlugin";
void
plugin_tests()
{
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
TestPlugin *plugin;
TEST(@"+[pluginFromFile:]",
(plugin = [OFPlugin pluginFromFile: @"plugin/TestPlugin"]))
TEST(@"TestPlugin's -[test:]", [plugin test: 1234] == 2468)
[pool drain];
}
|
|
|
|
>
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#include "config.h"
#import "OFPlugin.h"
#import "OFAutoreleasePool.h"
#import "OFString.h"
#import "OFExceptions.h"
#import "TestsAppDelegate.h"
#import "plugin/TestPlugin.h"
static OFString *module = @"OFPlugin";
@implementation TestsAppDelegate (OFPluginTests)
- (void)pluginTests
{
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
TestPlugin *plugin;
TEST(@"+[pluginFromFile:]",
(plugin = [OFPlugin pluginFromFile: @"plugin/TestPlugin"]))
TEST(@"TestPlugin's -[test:]", [plugin test: 1234] == 2468)
[pool drain];
}
@end
|