Add ini.h, extra win32 functions, clean up formats
This commit is contained in:
parent
e0cae3029d
commit
f066d8bc4e
@ -729,9 +729,13 @@ void dqn_darray_test()
|
|||||||
void dqn_file_test()
|
void dqn_file_test()
|
||||||
{
|
{
|
||||||
// File i/o
|
// File i/o
|
||||||
|
{
|
||||||
{
|
{
|
||||||
DqnFile file = {};
|
DqnFile file = {};
|
||||||
DQN_ASSERT(dqn_file_open(".clang-format", &file));
|
DQN_ASSERT(dqn_file_open(
|
||||||
|
".clang-format", &file,
|
||||||
|
(dqnfilepermissionflag_write | dqnfilepermissionflag_read),
|
||||||
|
dqnfileaction_open_only));
|
||||||
DQN_ASSERT(file.size == 1320);
|
DQN_ASSERT(file.size == 1320);
|
||||||
|
|
||||||
u8 *buffer = (u8 *)calloc(1, (size_t)file.size * sizeof(u8));
|
u8 *buffer = (u8 *)calloc(1, (size_t)file.size * sizeof(u8));
|
||||||
@ -739,10 +743,22 @@ void dqn_file_test()
|
|||||||
free(buffer);
|
free(buffer);
|
||||||
|
|
||||||
dqn_file_close(&file);
|
dqn_file_close(&file);
|
||||||
DQN_ASSERT(!file.handle && file.size == 0);
|
DQN_ASSERT(!file.handle && file.size == 0 &&
|
||||||
|
file.permissionFlags == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
DqnFile file = {};
|
||||||
|
DQN_ASSERT(!dqn_file_open(
|
||||||
|
"asdljasdnel;kajdf", &file,
|
||||||
|
(dqnfilepermissionflag_write | dqnfilepermissionflag_read),
|
||||||
|
dqnfileaction_open_only));
|
||||||
|
DQN_ASSERT(file.size == 0);
|
||||||
|
DQN_ASSERT(file.permissionFlags == 0);
|
||||||
|
DQN_ASSERT(!file.handle);
|
||||||
printf("dqn_file_test(): file_io: Completed successfully\n");
|
printf("dqn_file_test(): file_io: Completed successfully\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
u32 numFiles;
|
u32 numFiles;
|
||||||
|
Loading…
Reference in New Issue
Block a user