2025-12-17 23:45:55 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (C) Tristan Franssen, <tristanfranssen@strawhats.nl>.
|
|
|
|
|
*
|
|
|
|
|
* This software is licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
* You may not use this file except in compliance with the License.
|
|
|
|
|
* You may obtain a copy of the License in the file LICENSE or at
|
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
*/
|
2025-12-10 20:39:31 +01:00
|
|
|
#ifndef COSMS_CORE_FILE_TEST
|
|
|
|
|
#define COSMS_CORE_FILE_TEST
|
2025-12-09 22:07:16 +01:00
|
|
|
|
2025-12-14 17:58:09 +01:00
|
|
|
#include "test.h"
|
2025-12-09 22:07:16 +01:00
|
|
|
|
2025-12-18 16:12:23 +01:00
|
|
|
COSMS_CORE_TEST_DEFINE(file_open_small_file_read);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_open_large_file_read);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_open_non_existing_file_read);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_open_small_file_write);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_open_large_file_write);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_open_small_file_append);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_open_large_file_append);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_open_small_file_read_write);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_open_large_file_read_write);
|
|
|
|
|
|
2025-12-17 21:16:00 +01:00
|
|
|
COSMS_CORE_TEST_DEFINE(file_close);
|
2025-12-18 16:12:23 +01:00
|
|
|
COSMS_CORE_TEST_DEFINE(file_close_non_existing_file);
|
|
|
|
|
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_size_small_file);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_size_large);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_size_non_existing_file);
|
|
|
|
|
|
2025-12-18 17:03:38 +01:00
|
|
|
COSMS_CORE_TEST_DEFINE(file_read_small_file);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_read_large_file);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_read_non_existing_file);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_read_full_non_existing_file);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_read_file_using_wrong_mode);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_read_full_file_using_wrong_mode);
|
|
|
|
|
|
2025-12-18 22:36:14 +01:00
|
|
|
COSMS_CORE_TEST_DEFINE(file_write_small_file);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_write_large_file);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_write_append_small_file);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_write_append_large_file);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_write_using_wrong_mode);
|
|
|
|
|
COSMS_CORE_TEST_DEFINE(file_write_full_file_using_wrong_mode);
|
|
|
|
|
|
2025-12-14 17:58:09 +01:00
|
|
|
COSMS_CORE_TEST_DEFINE(file_delete);
|
|
|
|
|
|
|
|
|
|
COSMS_CORE_TEST_EXPORT(file,
|
2025-12-18 16:12:23 +01:00
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_open_small_file_read),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_open_large_file_read),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_open_non_existing_file_read),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_open_small_file_write),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_open_large_file_write),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_open_small_file_append),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_open_large_file_append),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_open_small_file_read_write),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_open_large_file_read_write),
|
|
|
|
|
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_close),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_close_non_existing_file),
|
|
|
|
|
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_size_small_file),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_size_large),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_size_non_existing_file),
|
|
|
|
|
|
2025-12-18 17:03:38 +01:00
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_read_small_file),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_read_large_file),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_read_non_existing_file),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_read_full_non_existing_file),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_read_file_using_wrong_mode),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_read_full_file_using_wrong_mode),
|
|
|
|
|
|
2025-12-18 22:36:14 +01:00
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_write_small_file),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_write_large_file),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_write_append_small_file),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_write_append_large_file),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_write_using_wrong_mode),
|
|
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_write_full_file_using_wrong_mode),
|
|
|
|
|
|
2025-12-18 16:12:23 +01:00
|
|
|
COSMS_CORE_TEST_EXPORT_TEST(file_delete)
|
2025-12-14 17:58:09 +01:00
|
|
|
);
|
2025-12-09 22:07:16 +01:00
|
|
|
|
|
|
|
|
#endif
|