ObjFW  Diff

Differences From Artifact [68c05d528b]:

To Artifact [e8e0a8d94e]:


20
21
22
23
24
25
26






27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#import "OFPlugin.h"
#import "OFString.h"
#import "OFAutoreleasePool.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







>
>
>
>
>
>










|






20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#import "OFPlugin.h"
#import "OFString.h"
#import "OFAutoreleasePool.h"

#import "TestsAppDelegate.h"

#import "plugin/TestPlugin.h"

#ifndef OF_IOS
# define PLUGIN_PATH @"plugin/TestPlugin"
#else
# define PLUGIN_PATH @"PlugIns/TestPlugin"
#endif

static OFString *module = @"OFPlugin";

@implementation TestsAppDelegate (OFPluginTests)
- (void)pluginTests
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	TestPlugin *plugin;

	TEST(@"+[pluginFromFile:]",
	    (plugin = [OFPlugin pluginFromFile: PLUGIN_PATH]))

	TEST(@"TestPlugin's -[test:]", [plugin test: 1234] == 2468)

	[pool drain];
}
@end