-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
36 lines (26 loc) · 953 Bytes
/
main.c
1
2
3
4
5
6
7
8
9
10
11
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
#include <stdio.h>
#include "ImageManager.h"
#include "DxMock.h"
int main(void)
{
int filehandle;
int result;
if(imageManagerInit()!=0)
{
printf("Error: Can't initializing ResourceList\n");
}
filehandle = imageManagerGetImage("file01.png");
printf("file01.png: filehandle is %d (Called first time)\n",filehandle);
filehandle = imageManagerGetImage("file02.png");
printf("file02.png: filehandle is %d (Called first time)\n",filehandle);
filehandle = imageManagerGetImage("notfound.png");
printf("notfound.png: filehandle is %d (Can't open file)\n",filehandle);
filehandle = imageManagerGetImage("file02.png");
printf("file02.png: filehandle is %d (Called second times)\n",filehandle);
result = imageManagerDeleteImage(filehandle);
printf("file02.png: delete successful %d\n",result);
result = imageManagerDeleteImage(-1);
printf("notfound: delete fail %d\n",result);
imageManagerDestroy();
return 0;
}