Added an assertion to test if get_fileitem_from_path returns the same pointers for the same path.

This commit is contained in:
David Capello 2008-02-18 23:30:32 +00:00
parent bd851fdeca
commit 1ab947b4f1

View File

@ -66,13 +66,17 @@ int main(int argc, char *argv[])
#ifdef ALLEGRO_WINDOWS
trace("*** Testing specific directories retrieval...\n");
{
FileItem *c_drive;
FileItem *c_drive, *c_drive2;
FileItem *my_pc;
trace("*** Getting 'C:\\' using 'get_fileitem_from_path'...\n");
c_drive = get_fileitem_from_path("C:\\");
assert(c_drive != NULL);
trace("*** Getting 'C:\\' again\n");
c_drive2 = get_fileitem_from_path("C:\\");
assert(c_drive == c_drive2);
trace("*** Displaying 'C:\\'...\n");
display_fileitem(c_drive, 0, 0);