version 1.2, 2005/02/04 08:51:51
|
version 1.4, 2005/02/04 09:30:15
|
|
|
FDIDestroy | FDIDestroy |
*/ | */ |
| |
|
/* Currently dummy function pointers */ |
| |
|
FNALLOC(dummy_alloc) { |
|
printf("FNALLOC just called with %d\n",cb); |
|
return 0; |
|
} |
|
|
|
FNFREE(dummy_free) { |
|
printf("FNFREE just called with %d\n",pv); |
|
return; |
|
} |
|
|
|
FNOPEN(dummy_open) { |
|
printf("FNOPEN just called with %d, %d, %d\n",pszFile, oflag, pmode); |
|
return 0; |
|
} |
|
|
|
FNREAD(dummy_read) { |
|
/* printf("FNREAD just called with %d, %d, %d\n",hf, pv, cb); |
|
return void; |
|
*/ return 0; |
|
} |
|
|
|
FNWRITE(dummy_write) { |
|
/* printf("FNWRITE just called with %d, %d, %d\n",hf, pv, cb); |
|
return void; |
|
*/ return 0; |
|
} |
| |
| |
|
FNCLOSE(dummy_close) { |
|
/* printf("FNCLOSE just called with %d\n",hf); |
|
return void; |
|
*/ return 0; |
|
} |
|
|
|
FNSEEK(dummy_seek) { |
|
/* printf("FNSEEK just called with %d, %d, %d\n",hf, dist, seektype); |
|
return void; |
|
*/ return 0; |
|
} |
|
|
|
HFDI my_hfdi; |
|
/* yes its global and ugly */ |
|
|
|
static void TestDestroy(void) { |
|
printf("Starting TestDestroy()\n"); |
|
/* Only two things to check in FDIDestroy |
|
1=> Does it return T if its passed an hfdi |
|
2=> Does it return F if its passed a non hfdi |
|
EDIT : Causes GPL if FDIDestroy is called on an invalid pointer. |
|
ok( 0 == FDIDestroy(0), "Return true incorrectly in TestDestroy()!\n"); |
|
*/ |
|
ok(FDIDestroy(my_hfdi), "Failed on destroying test hfdi!\n"); |
|
|
|
} |
|
|
|
static void TestCreate(void) { |
|
|
|
ERF error_structure; |
|
|
|
printf("Starting TestCreate()\n"); |
|
|
|
my_hfdi = FDICreate( |
|
dummy_alloc, |
|
dummy_free, |
|
dummy_open, |
|
dummy_read, |
|
dummy_write, |
|
dummy_close, |
|
dummy_seek, |
|
cpu80386, |
|
&error_structure |
|
); |
|
|
|
ok(my_hfdi != NULL,"FDICreate failed!\n"); |
|
|
|
printf("Ending TestCreate()\n"); |
|
} |
| |
START_TEST(paths) | START_TEST(paths) |
{ | { |
/* |
|
TestCreate(); | TestCreate(); |
|
/* |
TestInfo(); | TestInfo(); |
TestCopy(); | TestCopy(); |
TestDestroy(); |
|
*/ | */ |
} |
TestDestroy(); |
|
|
|
|
| |
|
} |