Files
wizapp-stdlib/tests/wapptest.c
T
abdelrahman a998f6b981
Release / release (push) Successful in 8s
Standardize naming conventions (#12)
## Summary

Standardize naming conventions across the entire wizapp-stdlib codebase by replacing inconsistent prefixes and snake_case with a unified `wp` prefix + CamelCase scheme.

## Changes

### Naming convention applied

| Pattern | Before | After |
|---|---|---|
| Public functions | `wapp_module_function` | `wpModuleFunction` |
| Public types | `GenericXxx`, bare `Xxx` | `WpXxx` |
| Constants / enum values | `WAPP_XXX`, `SHELL_XXX` | `WP_XXX`, `WP_SHELL_XXX` |
| Internal functions | `_module_function` | `_moduleFunction` |
| Storage-class macros | `wapp_extern`, `wapp_intern` | `wp_extern`, `wp_intern` |

### Modules affected

All 20 modules were renamed: `arena`, `array`, `dbl_list`, `queue`, `str8`, `mem_allocator`, `mem_utils`, `mem_os`, `file`, `cpath`, `log`, `shell_commander`, `shell_termcolour`, `shell_utils`, `prng/xorshift`, `uuid`, `tester`, `aliases`, `assert`, `misc_utils`, `platform` — plus their test files.

### Backward compatibility

Added `src/oldnames.h` with `#define OLD_NAME NEW_NAME` for every renamed symbol, organized by module under Constants → Types → Functions sections. Existing code that includes this file will compile without changes.

Reviewed-on: #12
Co-authored-by: Abdelrahman <said.abdelrahman89@gmail.com>
Co-committed-by: Abdelrahman <said.abdelrahman89@gmail.com>
2026-06-26 17:17:27 +00:00

106 lines
2.6 KiB
C

#include "test_str8.h"
#include "test_str8_list.h"
#include "test_allocator.h"
#include "test_arena.h"
#include "test_str8_array.h"
#include "test_i32_array.h"
#include "test_queue.h"
#include "test_cpath.h"
#include "test_file.h"
#include "test_shell_commander.h"
#include "wapp.h"
#include <stdlib.h>
int main(void) {
wpTesterRun(
test_arena_allocator,
test_arena_allocator_with_buffer,
test_arena_allocator_temp_begin,
test_arena_allocator_temp_end,
test_arena_init_buffer,
test_arena_init_allocated,
test_arena_init_succeeds_when_reserving_very_large_size,
test_arena_alloc_with_buffer,
test_arena_alloc_succeeds_when_within_capacity,
test_arena_alloc_fails_when_over_capacity,
test_arena_realloc_bigger_size,
test_arena_realloc_smaller_size,
test_arena_temp_begin,
test_arena_temp_end,
test_arena_clear,
test_arena_destroy_buffer,
test_arena_destroy_allocated,
test_str8_array,
test_i32_array,
test_i32_array_with_capacity,
test_i32_array_get,
test_i32_array_set,
test_i32_array_append_capped,
test_i32_array_extend_capped,
test_i32_array_copy_capped,
test_i32_array_alloc_capacity,
test_i32_array_append_alloc,
test_i32_array_extend_alloc,
test_i32_array_copy_alloc,
test_i32_array_pop,
test_i32_array_clear,
test_queue_push,
test_queue_push_alloc,
test_queue_pop,
test_str8_lit,
test_str8_lit_ro,
test_str8_buf,
test_str8_alloc_buf,
test_str8_alloc_cstr,
test_str8_alloc_str8,
test_str8_alloc_substr,
test_str8_alloc_concat,
test_str8_get_index_within_bounds,
test_str8_get_index_out_of_bounds,
test_str8_set,
test_str8_equal,
test_str8_slice,
test_str8_concat_capped,
test_str8_copy_cstr_capped,
test_str8_copy_str8_capped,
test_str8_format,
test_str8_find,
test_str8_rfind,
test_str8_split,
test_str8_split_with_max,
test_str8_rsplit,
test_str8_rsplit_with_max,
test_str8_join,
test_str8_from_bytes,
test_str8_list_get,
test_str8_list_push_front,
test_str8_list_push_back,
test_str8_list_insert,
test_str8_list_pop_front,
test_str8_list_pop_back,
test_str8_list_remove,
test_str8_list_empty,
test_cpath_join_path,
test_cpath_dirname,
test_cpath_dirup,
test_wapp_file_open,
test_wapp_file_get_current_position,
test_wapp_file_seek,
test_wapp_file_get_length,
test_wapp_file_read,
test_wapp_file_write,
test_wapp_file_read_array,
test_wapp_file_write_array,
test_wapp_file_flush,
test_wapp_file_close,
test_wapp_file_rename,
test_wapp_file_remove,
test_commander_cmd_success,
test_commander_cmd_failure,
test_commander_cmd_out_buf_success,
test_commander_cmd_out_buf_failure
);
return EXIT_SUCCESS;
}