From 28b94883fd84933af16d44b6e911a7c6280f6d6b Mon Sep 17 00:00:00 2001 From: faumaray Date: Fri, 12 Jun 2026 18:50:02 +0300 Subject: [PATCH] Restructure into umbrella modules (~55 -> 16 targets) Headers move, CMake targets merge, C++ namespaces stay unchanged: - Core: Scope, Lazy, Counted, Flags, Hash, Bits, Uuid, TypeList, TypeMap, Variant - Functional: Pipeline, Either, Result, Retry - Containers: Ring, Pool, PriorityQueue, LRU, Trie, Graph, DisjointSet, Bitset, Interval - Math: +Matrix, Numeric, Random, Histogram - Text: Str, Format, Tokenizer, Diff, Encoding, Semver - Data: Json, Csv, Ini - Async: Coro, Concurrency, EventBus, Observable - Time: +Bench - Log: Log facade + Logging framework (facade now header-only, breaking the Stacktrace<->Log link cycle the merge would have created) - System: FileSystem + Process - Configuration: +Argparse - Unchanged: Stacktrace, Plugin, StateMachine, Testing, TestingMock, Detail Module system fixes: - OPTIONAL_DEPS resolution deferred to void_finalize_modules() so it no longer depends on the alphabetical discovery order of src/ subdirs (Testing -> Text would have been silently dropped). - Every header-only module now has a tracked module.cmake; previously the empty src/ marker dirs were untracked, so a fresh clone would have silently skipped those modules. - VOID_HAS_LOGGING/CONCURRENCY/STR consumers renamed to LOG/ASYNC/TEXT. Tests move to tests/standalone//.cpp (Result suite files prefixed: ResultBasic etc.). Test count verified identical (831) before and after. README/CLAUDE.md module tables updated. Co-Authored-By: Claude Fable 5 --- CLAUDE.md | 51 +++++++++++++------ CMakeLists.txt | 1 + README.md | 36 ++++++++----- cmake/Module.cmake | 39 +++++++++++--- cmake/module.cmake.template | 2 +- .../Void/{Concurrency => Async}/Channel.hpp | 0 include/Void/{EventBus => Async}/EventBus.hpp | 0 include/Void/{Coro => Async}/Generator.hpp | 0 .../Void/{Observable => Async}/Observable.hpp | 0 .../{Concurrency => Async}/ParallelFor.hpp | 2 +- include/Void/{Coro => Async}/Task.hpp | 0 .../{Concurrency => Async}/ThreadPool.hpp | 0 .../{Argparse => Configuration}/Argparse.hpp | 0 include/Void/Configuration/Config.hpp | 6 +-- include/Void/Configuration/Env.hpp | 4 +- .../Void/{Bitset => Containers}/Bitset.hpp | 0 .../DisjointSet.hpp | 0 include/Void/{Graph => Containers}/Graph.hpp | 0 .../{Interval => Containers}/Interval.hpp | 0 include/Void/{LRU => Containers}/LRU.hpp | 0 include/Void/{Pool => Containers}/Pool.hpp | 0 .../PriorityQueue.hpp | 0 include/Void/{Ring => Containers}/Ring.hpp | 0 include/Void/{Trie => Containers}/Trie.hpp | 0 include/Void/{Bits => Core}/Bits.hpp | 0 include/Void/{Counted => Core}/Counted.hpp | 0 include/Void/{Flags => Core}/Flags.hpp | 0 include/Void/{Hash => Core}/Hash.hpp | 0 include/Void/{Lazy => Core}/Lazy.hpp | 0 include/Void/{Scope => Core}/Scope.hpp | 0 include/Void/{TypeList => Core}/TypeList.hpp | 0 include/Void/{TypeMap => Core}/TypeMap.hpp | 0 include/Void/{Uuid => Core}/Uuid.hpp | 4 +- include/Void/{Variant => Core}/Variant.hpp | 0 include/Void/{Csv => Data}/Csv.hpp | 0 include/Void/{Ini => Data}/Ini.hpp | 0 include/Void/{Json => Data}/Json.hpp | 0 .../Void/{Pipeline => Functional}/Curry.hpp | 0 .../{Result => Functional}/Detail/Repr.hpp | 0 .../Void/{Either => Functional}/Either.hpp | 0 include/Void/{Result => Functional}/Error.hpp | 0 .../Void/{Pipeline => Functional}/Memo.hpp | 0 include/Void/{Either => Functional}/Opt.hpp | 2 +- .../{Pipeline => Functional}/Pipeline.hpp | 0 .../Void/{Result => Functional}/Result.hpp | 2 +- include/Void/{Retry => Functional}/Retry.hpp | 0 .../Void/{Logging => Log}/ConsoleLogger.hpp | 2 +- include/Void/{Logging => Log}/Entry.hpp | 2 +- include/Void/{Logging => Log}/FileLogger.hpp | 6 +-- include/Void/{Logging => Log}/Level.hpp | 0 include/Void/Log/Log.hpp | 34 ++++++++++++- include/Void/{Logging => Log}/Logger.hpp | 4 +- include/Void/Log/LoggingAdapter.hpp | 4 +- .../Void/{Histogram => Math}/Histogram.hpp | 0 include/Void/{Matrix => Math}/Matrix.hpp | 0 include/Void/{Numeric => Math}/Numeric.hpp | 0 include/Void/{Random => Math}/Random.hpp | 0 include/Void/Stacktrace/Stacktrace.hpp | 4 +- include/Void/{FileSystem => System}/Path.hpp | 4 +- include/Void/{Process => System}/Process.hpp | 4 +- include/Void/{FileSystem => System}/Query.hpp | 4 +- .../Void/{FileSystem => System}/TempDir.hpp | 2 +- include/Void/Testing/Assert.hpp | 2 +- include/Void/{Encoding => Text}/Base64.hpp | 0 include/Void/{Diff => Text}/Diff.hpp | 0 include/Void/{Format => Text}/Format.hpp | 0 include/Void/{Encoding => Text}/Hex.hpp | 0 include/Void/{Semver => Text}/Semver.hpp | 0 include/Void/{Str => Text}/Str.hpp | 0 .../Void/{Tokenizer => Text}/Tokenizer.hpp | 0 include/Void/{Bench => Time}/Bench.hpp | 0 src/Async/module.cmake | 1 + src/Concurrency/module.cmake | 3 -- src/{Argparse => Configuration}/Argparse.cpp | 2 +- src/Configuration/module.cmake | 2 +- src/Containers/module.cmake | 1 + src/Core/module.cmake | 1 + src/Data/module.cmake | 1 + src/FileSystem/module.cmake | 3 -- src/Functional/module.cmake | 1 + src/{Logging => Log}/ConsoleLogger.cpp | 2 +- src/{Logging => Log}/Entry.cpp | 0 src/{Logging => Log}/FileLogger.cpp | 2 +- src/{Logging => Log}/Level.cpp | 2 +- src/Log/Log.cpp | 28 ---------- src/{Logging => Log}/Logger.cpp | 2 +- src/Log/module.cmake | 5 +- src/Logging/module.cmake | 4 -- src/Math/module.cmake | 1 + src/Process/module.cmake | 3 -- src/Result/module.cmake | 1 - src/Stacktrace/module.cmake | 2 +- src/StateMachine/module.cmake | 1 + src/{Process => System}/Process.cpp | 2 +- src/System/module.cmake | 3 ++ src/Testing/Runner.cpp | 46 ++++++++--------- src/Testing/module.cmake | 2 +- src/TestingMock/module.cmake | 2 +- src/Text/module.cmake | 1 + src/Time/module.cmake | 1 + tests/internal/CrossModule.cpp | 14 ++--- .../{Concurrency => Async}/Channel.cpp | 2 +- tests/standalone/{Coro => Async}/Coro.cpp | 4 +- .../{EventBus => Async}/EventBus.cpp | 2 +- .../{Observable => Async}/Observable.cpp | 2 +- .../{Concurrency => Async}/ParallelFor.cpp | 2 +- .../{Concurrency => Async}/ThreadPool.cpp | 2 +- .../{Argparse => Configuration}/Argparse.cpp | 2 +- tests/standalone/Configuration/Config.cpp | 4 +- .../{Bitset => Containers}/Bitset.cpp | 2 +- .../DisjointSet.cpp | 2 +- .../{Graph => Containers}/Graph.cpp | 2 +- .../{Interval => Containers}/Interval.cpp | 2 +- tests/standalone/{LRU => Containers}/LRU.cpp | 2 +- .../standalone/{Pool => Containers}/Pool.cpp | 2 +- .../PriorityQueue.cpp | 2 +- .../standalone/{Ring => Containers}/Ring.cpp | 2 +- .../standalone/{Trie => Containers}/Trie.cpp | 2 +- tests/standalone/{Bits => Core}/Bits.cpp | 2 +- .../standalone/{Counted => Core}/Counted.cpp | 2 +- tests/standalone/{Flags => Core}/Flags.cpp | 2 +- tests/standalone/{Hash => Core}/Hash.cpp | 2 +- tests/standalone/{Lazy => Core}/Lazy.cpp | 2 +- tests/standalone/{Scope => Core}/Scope.cpp | 2 +- .../{TypeList => Core}/TypeList.cpp | 2 +- .../standalone/{TypeMap => Core}/TypeMap.cpp | 2 +- tests/standalone/{Uuid => Core}/Uuid.cpp | 2 +- .../standalone/{Variant => Core}/Variant.cpp | 2 +- tests/standalone/{Csv => Data}/Csv.cpp | 2 +- tests/standalone/{Ini => Data}/Ini.cpp | 2 +- tests/standalone/{Json => Data}/Json.cpp | 2 +- .../{Either => Functional}/Either.cpp | 4 +- .../{Pipeline => Functional}/Memo.cpp | 2 +- .../{Pipeline => Functional}/Pipeline.cpp | 6 +-- .../Basic.cpp => Functional/ResultBasic.cpp} | 4 +- .../ResultContext.cpp} | 4 +- .../ResultMonadic.cpp} | 4 +- .../ResultReflectionFormat.cpp} | 2 +- .../{Retry => Functional}/Retry.cpp | 2 +- .../{Logging => Log}/ConsoleLogger.cpp | 4 +- .../{Logging => Log}/FileLogger.cpp | 4 +- .../{Histogram => Math}/Histogram.cpp | 2 +- tests/standalone/{Matrix => Math}/Matrix.cpp | 2 +- .../standalone/{Numeric => Math}/Numeric.cpp | 2 +- tests/standalone/{Random => Math}/Random.cpp | 2 +- .../{FileSystem => System}/Path.cpp | 4 +- .../{Process => System}/Process.cpp | 2 +- .../{FileSystem => System}/Query.cpp | 6 +-- .../{FileSystem => System}/TempDir.cpp | 2 +- tests/standalone/{Diff => Text}/Diff.cpp | 2 +- .../{Encoding => Text}/Encoding.cpp | 4 +- tests/standalone/{Format => Text}/Format.cpp | 2 +- tests/standalone/{Semver => Text}/Semver.cpp | 2 +- tests/standalone/{Str => Text}/Str.cpp | 2 +- .../{Tokenizer => Text}/Tokenizer.cpp | 2 +- tests/standalone/{Bench => Time}/Bench.cpp | 2 +- 156 files changed, 278 insertions(+), 220 deletions(-) rename include/Void/{Concurrency => Async}/Channel.hpp (100%) rename include/Void/{EventBus => Async}/EventBus.hpp (100%) rename include/Void/{Coro => Async}/Generator.hpp (100%) rename include/Void/{Observable => Async}/Observable.hpp (100%) rename include/Void/{Concurrency => Async}/ParallelFor.hpp (95%) rename include/Void/{Coro => Async}/Task.hpp (100%) rename include/Void/{Concurrency => Async}/ThreadPool.hpp (100%) rename include/Void/{Argparse => Configuration}/Argparse.hpp (100%) rename include/Void/{Bitset => Containers}/Bitset.hpp (100%) rename include/Void/{DisjointSet => Containers}/DisjointSet.hpp (100%) rename include/Void/{Graph => Containers}/Graph.hpp (100%) rename include/Void/{Interval => Containers}/Interval.hpp (100%) rename include/Void/{LRU => Containers}/LRU.hpp (100%) rename include/Void/{Pool => Containers}/Pool.hpp (100%) rename include/Void/{PriorityQueue => Containers}/PriorityQueue.hpp (100%) rename include/Void/{Ring => Containers}/Ring.hpp (100%) rename include/Void/{Trie => Containers}/Trie.hpp (100%) rename include/Void/{Bits => Core}/Bits.hpp (100%) rename include/Void/{Counted => Core}/Counted.hpp (100%) rename include/Void/{Flags => Core}/Flags.hpp (100%) rename include/Void/{Hash => Core}/Hash.hpp (100%) rename include/Void/{Lazy => Core}/Lazy.hpp (100%) rename include/Void/{Scope => Core}/Scope.hpp (100%) rename include/Void/{TypeList => Core}/TypeList.hpp (100%) rename include/Void/{TypeMap => Core}/TypeMap.hpp (100%) rename include/Void/{Uuid => Core}/Uuid.hpp (99%) rename include/Void/{Variant => Core}/Variant.hpp (100%) rename include/Void/{Csv => Data}/Csv.hpp (100%) rename include/Void/{Ini => Data}/Ini.hpp (100%) rename include/Void/{Json => Data}/Json.hpp (100%) rename include/Void/{Pipeline => Functional}/Curry.hpp (100%) rename include/Void/{Result => Functional}/Detail/Repr.hpp (100%) rename include/Void/{Either => Functional}/Either.hpp (100%) rename include/Void/{Result => Functional}/Error.hpp (100%) rename include/Void/{Pipeline => Functional}/Memo.hpp (100%) rename include/Void/{Either => Functional}/Opt.hpp (99%) rename include/Void/{Pipeline => Functional}/Pipeline.hpp (100%) rename include/Void/{Result => Functional}/Result.hpp (98%) rename include/Void/{Retry => Functional}/Retry.hpp (100%) rename include/Void/{Logging => Log}/ConsoleLogger.hpp (97%) rename include/Void/{Logging => Log}/Entry.hpp (98%) rename include/Void/{Logging => Log}/FileLogger.hpp (94%) rename include/Void/{Logging => Log}/Level.hpp (100%) rename include/Void/{Logging => Log}/Logger.hpp (99%) rename include/Void/{Histogram => Math}/Histogram.hpp (100%) rename include/Void/{Matrix => Math}/Matrix.hpp (100%) rename include/Void/{Numeric => Math}/Numeric.hpp (100%) rename include/Void/{Random => Math}/Random.hpp (100%) rename include/Void/{FileSystem => System}/Path.hpp (98%) rename include/Void/{Process => System}/Process.hpp (95%) rename include/Void/{FileSystem => System}/Query.hpp (98%) rename include/Void/{FileSystem => System}/TempDir.hpp (98%) rename include/Void/{Encoding => Text}/Base64.hpp (100%) rename include/Void/{Diff => Text}/Diff.hpp (100%) rename include/Void/{Format => Text}/Format.hpp (100%) rename include/Void/{Encoding => Text}/Hex.hpp (100%) rename include/Void/{Semver => Text}/Semver.hpp (100%) rename include/Void/{Str => Text}/Str.hpp (100%) rename include/Void/{Tokenizer => Text}/Tokenizer.hpp (100%) rename include/Void/{Bench => Time}/Bench.hpp (100%) create mode 100644 src/Async/module.cmake delete mode 100644 src/Concurrency/module.cmake rename src/{Argparse => Configuration}/Argparse.cpp (99%) create mode 100644 src/Containers/module.cmake create mode 100644 src/Core/module.cmake create mode 100644 src/Data/module.cmake delete mode 100644 src/FileSystem/module.cmake create mode 100644 src/Functional/module.cmake rename src/{Logging => Log}/ConsoleLogger.cpp (98%) rename src/{Logging => Log}/Entry.cpp (100%) rename src/{Logging => Log}/FileLogger.cpp (97%) rename src/{Logging => Log}/Level.cpp (84%) delete mode 100644 src/Log/Log.cpp rename src/{Logging => Log}/Logger.cpp (99%) delete mode 100644 src/Logging/module.cmake create mode 100644 src/Math/module.cmake delete mode 100644 src/Process/module.cmake delete mode 100644 src/Result/module.cmake create mode 100644 src/StateMachine/module.cmake rename src/{Process => System}/Process.cpp (99%) create mode 100644 src/System/module.cmake create mode 100644 src/Text/module.cmake create mode 100644 src/Time/module.cmake rename tests/standalone/{Concurrency => Async}/Channel.cpp (98%) rename tests/standalone/{Coro => Async}/Coro.cpp (98%) rename tests/standalone/{EventBus => Async}/EventBus.cpp (99%) rename tests/standalone/{Observable => Async}/Observable.cpp (99%) rename tests/standalone/{Concurrency => Async}/ParallelFor.cpp (96%) rename tests/standalone/{Concurrency => Async}/ThreadPool.cpp (97%) rename tests/standalone/{Argparse => Configuration}/Argparse.cpp (99%) rename tests/standalone/{Bitset => Containers}/Bitset.cpp (99%) rename tests/standalone/{DisjointSet => Containers}/DisjointSet.cpp (98%) rename tests/standalone/{Graph => Containers}/Graph.cpp (99%) rename tests/standalone/{Interval => Containers}/Interval.cpp (98%) rename tests/standalone/{LRU => Containers}/LRU.cpp (99%) rename tests/standalone/{Pool => Containers}/Pool.cpp (98%) rename tests/standalone/{PriorityQueue => Containers}/PriorityQueue.cpp (99%) rename tests/standalone/{Ring => Containers}/Ring.cpp (99%) rename tests/standalone/{Trie => Containers}/Trie.cpp (99%) rename tests/standalone/{Bits => Core}/Bits.cpp (99%) rename tests/standalone/{Counted => Core}/Counted.cpp (99%) rename tests/standalone/{Flags => Core}/Flags.cpp (99%) rename tests/standalone/{Hash => Core}/Hash.cpp (99%) rename tests/standalone/{Lazy => Core}/Lazy.cpp (98%) rename tests/standalone/{Scope => Core}/Scope.cpp (99%) rename tests/standalone/{TypeList => Core}/TypeList.cpp (99%) rename tests/standalone/{TypeMap => Core}/TypeMap.cpp (98%) rename tests/standalone/{Uuid => Core}/Uuid.cpp (99%) rename tests/standalone/{Variant => Core}/Variant.cpp (99%) rename tests/standalone/{Csv => Data}/Csv.cpp (99%) rename tests/standalone/{Ini => Data}/Ini.cpp (99%) rename tests/standalone/{Json => Data}/Json.cpp (99%) rename tests/standalone/{Either => Functional}/Either.cpp (98%) rename tests/standalone/{Pipeline => Functional}/Memo.cpp (99%) rename tests/standalone/{Pipeline => Functional}/Pipeline.cpp (98%) rename tests/standalone/{Result/Basic.cpp => Functional/ResultBasic.cpp} (92%) rename tests/standalone/{Result/Context.cpp => Functional/ResultContext.cpp} (95%) rename tests/standalone/{Result/Monadic.cpp => Functional/ResultMonadic.cpp} (94%) rename tests/standalone/{Result/ReflectionFormat.cpp => Functional/ResultReflectionFormat.cpp} (97%) rename tests/standalone/{Retry => Functional}/Retry.cpp (99%) rename tests/standalone/{Logging => Log}/ConsoleLogger.cpp (95%) rename tests/standalone/{Logging => Log}/FileLogger.cpp (97%) rename tests/standalone/{Histogram => Math}/Histogram.cpp (99%) rename tests/standalone/{Matrix => Math}/Matrix.cpp (99%) rename tests/standalone/{Numeric => Math}/Numeric.cpp (99%) rename tests/standalone/{Random => Math}/Random.cpp (99%) rename tests/standalone/{FileSystem => System}/Path.cpp (97%) rename tests/standalone/{Process => System}/Process.cpp (98%) rename tests/standalone/{FileSystem => System}/Query.cpp (97%) rename tests/standalone/{FileSystem => System}/TempDir.cpp (98%) rename tests/standalone/{Diff => Text}/Diff.cpp (99%) rename tests/standalone/{Encoding => Text}/Encoding.cpp (98%) rename tests/standalone/{Format => Text}/Format.cpp (99%) rename tests/standalone/{Semver => Text}/Semver.cpp (99%) rename tests/standalone/{Str => Text}/Str.cpp (99%) rename tests/standalone/{Tokenizer => Text}/Tokenizer.cpp (99%) rename tests/standalone/{Bench => Time}/Bench.cpp (99%) diff --git a/CLAUDE.md b/CLAUDE.md index d885721..3a1ac34 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -19,8 +19,8 @@ cmake --build build # Run all tests ctest --test-dir build -# Run a single standalone test binary directly -./build/tests/test_standalone_Logging_FileLogger +# Or run the single test binary directly (supports --filter, --parallel, ...) +./build/tests/VoidTests --filter "Json*" ``` Format code with: @@ -30,35 +30,54 @@ clang-format -i ## Architecture -VoidLibrary is a C++23 modular shared library. Each module is an independently installable CMake target under the `Void::` namespace. +VoidLibrary is a C++26 modular shared library organized as **umbrella modules** — one CMake target each, grouping related functionality. The C++ namespaces of absorbed components are unchanged (e.g. `Void::Ring` lives in `include/Void/Containers/Ring.hpp`, linked via `Void::Containers`). + +| Module | Type | Contents | +|---|---|---| +| `Core` | INTERFACE | Scope, Lazy, Counted, Flags, Hash, Bits, Uuid, TypeList, TypeMap, Variant | +| `Functional` | INTERFACE | Pipeline (+Curry, +Memo), Either (+Opt), Result, Retry | +| `Containers` | INTERFACE | Ring, Pool, PriorityQueue, LRU, Trie, Graph, DisjointSet, Bitset, Interval | +| `Math` | INTERFACE | Vec/Mat, Matrix, Numeric, Random, Histogram | +| `Text` | INTERFACE | Str, Format, Tokenizer, Diff, Encoding, Semver | +| `Data` | INTERFACE | Json, Csv, Ini | +| `Async` | INTERFACE | Coro (Task, Generator), Concurrency (ThreadPool, Channel, ParallelFor), EventBus, Observable | +| `Time` | INTERFACE | Stopwatch, Format (durations/ISO-8601), Bench | +| `Log` | SHARED | `Void::Log` header-only facade + `Void::Logging` framework | +| `System` | SHARED | FileSystem (Path, Query, TempDir) + Process | +| `Configuration` | SHARED | Config, Env + Argparse | +| `Stacktrace` | SHARED | Boost.Stacktrace capture, color helpers (kept separate to isolate the Boost dep) | +| `Plugin` | SHARED | dlopen loader, C ABI, hot reload | +| `StateMachine` | INTERFACE | compile-time variant-based FSM | +| `Testing` / `TestingMock` | STATIC / INTERFACE | test + mock frameworks | + +`include/Void/Detail/` (e.g. `Enum.hpp` — P2996 enum reflection) is not a module; it is header-only and reachable from every module via the shared include root. ### Module system -`cmake/Module.cmake` defines `void_add_module(NAME ...)`. The root `CMakeLists.txt` auto-discovers every subdirectory under `src/` and calls it. A module with only headers becomes an `INTERFACE` library; one with `.cpp` sources becomes `SHARED` — except `Testing`, which is special-cased to `STATIC`. +`cmake/Module.cmake` defines `void_add_module(NAME ...)`. The root `CMakeLists.txt` auto-discovers every subdirectory under `src/` and calls it (or includes the dir's `module.cmake` if present), then calls `void_finalize_modules()`. A module with only headers becomes an `INTERFACE` library; one with `.cpp` sources becomes `SHARED` — except `Testing`, which is special-cased to `STATIC`. Module layout: -- Headers: `include/Void//*.hpp` -- Sources: `src//*.cpp` -- CMake target: `Void_` with alias `Void::` -- Namespace: `Void::` +- Headers: `include/Void//*.hpp` +- Sources: `src//*.cpp` +- CMake target: `Void_` with alias `Void::` -To add a new module, create `src//` and populate it — the build system picks it up automatically. If a module needs special dependency wiring, drop a `module.cmake` file inside the source directory (see `cmake/module.cmake.template` for the pattern). +Every header-only module **must** have at least a one-line `src//module.cmake` (`void_add_module()`) — git does not track empty directories, and discovery iterates `src/*`. `void_add_module` accepts three dependency lists: - `INTERNAL_DEPS` — other `Void::*` modules (linked unconditionally). - `EXTERNAL_DEPS` — third-party targets fetched via `cmake/Dependencies.cmake` (`FetchContent`); add new ones there before referencing. -- `OPTIONAL_DEPS` — `Void::*` modules linked only if they exist; each present dep additionally defines `VOID_HAS_` for conditional code. +- `OPTIONAL_DEPS` — `Void::*` modules linked only if they exist; each present dep additionally defines `VOID_HAS_` for conditional code. Resolution is deferred to `void_finalize_modules()`, so it does not depend on discovery order. ### Tests -`tests/CMakeLists.txt` defines two test categories: +All tests compile into **one binary**, `build/tests/VoidTests` (registered as the single ctest entry): -| Category | Location | Binary | Links | -|---|---|---|---| -| Internal (kitchen-sink) | `tests/internal/*.cpp` | `VoidInternalTests` | all modules + `Void::Testing` | -| Standalone (isolated) | `tests/standalone//.cpp` | `test_standalone__` | its module only | +| Category | Location | Suite label | +|---|---|---| +| Standalone | `tests/standalone//.cpp` | `` (file stem) | +| Internal (cross-module) | `tests/internal/*.cpp` | `internal_` | -Standalone tests are preferred for testing a single module in isolation. +**The `tests/standalone/` directory name must exactly match a module name** — the scanner iterates registered modules and silently skips unknown directories. After moving/renaming tests, compare the runner's total test count. #### Writing a test diff --git a/CMakeLists.txt b/CMakeLists.txt index b386633..b4a1f5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,7 @@ foreach(module_path ${children}) endif() endif() endforeach() +void_finalize_modules() if(VOID_ENABLE_TESTING) enable_testing() diff --git a/README.md b/README.md index d476d4d..e3dff61 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,8 @@ cmake --build build # Run all tests ctest --test-dir build -# Run a single standalone test binary directly -./build/tests/test_standalone_Logging_FileLogger +# Or run the test binary directly (per-suite filtering, parallel mode, ...) +./build/tests/VoidTests --filter "Json*" ``` ### Optional build flags @@ -46,16 +46,28 @@ Format code with `clang-format -i `. ## Modules -| Module | Namespace | Description | -|---------------|-----------------------|-----------------------------------------------------------------------------| -| `Logging` | `Void::Logging` | Thread-safe `Logger` ABC with buffering, scopes, presets; ships `FileLogger` and `ConsoleLogger` sinks. | -| `Testing` | `Void::Testing` | Self-registering test framework with fixtures, tags, JUnit/console reporters, signal-handler crash capture. | -| `TestingMock` | `Void::TestingMock` | Header-only mock framework: `MockFunction`, `Mock` CRTP base, matchers (`Eq`/`_`/`Lt`/`Le`/`Gt`/`Ge`/`Range`/`Pred`/`StartsWith`/`Contains`), move-only actions. | -| `Stacktrace` | `Void::Stacktrace` | Stack capture + source-snippet rendering via Boost.Stacktrace; ANSI color helpers. | -| `Result` | `Void::Result` | Header-only `Result = std::expected` plus `Error` with cause-chain context, `with_context()` helper, reflection-based struct `repr` (C++26 ``). | -| `FileSystem` | `Void::FileSystem` | Header-only path utilities returning `Result`: `read_file`, `write_file`, `atomic_write`, `ensure_directory`, `remove_path`, RAII `TempDir`. | -| `Concurrency` | `Void::Concurrency` | Header-only `ThreadPool`, bounded MPMC `Channel`, and `parallel_for` built on the pool. Testing runner uses the pool for `--parallel ` mode. | -| `Log` | `Void::Log` | Thin global log-sink layer used internally by all modules. Install any callable via `set_sink(fn)`; include `LoggingAdapter.hpp` to bridge to `Void::Logging`. | +Functionality is grouped into umbrella modules (one CMake target each). +The C++ namespaces of the absorbed components are unchanged — e.g. +`Void::Ring` lives in `Void::Containers`' headers. + +| Module | Type | Contents (namespaces) | +|-----------------|-----------|-----------------------------------------------------------------------------| +| `Core` | INTERFACE | Scope guards, Lazy, Counted, Flags, Hash, Bits, Uuid, TypeList, TypeMap, Variant helpers. | +| `Functional` | INTERFACE | Pipeline (+Curry, +Memo), Either (+Opt), Result (`std::expected` + Error cause chains, reflection `repr`), Retry. | +| `Containers` | INTERFACE | Ring, Pool, PriorityQueue, LRU, Trie, Graph, DisjointSet, Bitset, Interval. | +| `Math` | INTERFACE | Vec/Mat, Matrix, Numeric, Random, Histogram. | +| `Text` | INTERFACE | Str, Format, Tokenizer, Diff, Encoding (Base64/Hex), Semver. | +| `Data` | INTERFACE | Json, Csv, Ini. | +| `Async` | INTERFACE | Coro (Task, Generator), Concurrency (ThreadPool, MPMC Channel, parallel_for), EventBus, Observable. | +| `Time` | INTERFACE | Stopwatch (+ScopedTimer), duration/ISO-8601 formatting, Bench. | +| `Log` | SHARED | `Void::Log` header-only facade (global sink, used by all modules) + `Void::Logging` framework (`Logger` ABC, ConsoleLogger, FileLogger). | +| `System` | SHARED | FileSystem path utilities (`Result`-based, RAII TempDir) + Process. | +| `Configuration` | SHARED | Layered key-value Config, Env + Argparse. | +| `Stacktrace` | SHARED | Stack capture + source snippets via Boost.Stacktrace; ANSI color helpers. | +| `Plugin` | SHARED | dlopen-based plugin loader with C ABI, hot reload, state transfer. | +| `StateMachine` | INTERFACE | Compile-time variant-based FSM. | +| `Testing` | STATIC | Self-registering test framework with fixtures, tags, JUnit/console reporters, crash capture. | +| `TestingMock` | INTERFACE | Mock framework: `MockFunction`, `Mock`, matchers, move-only actions. | ## Adding a module diff --git a/cmake/Module.cmake b/cmake/Module.cmake index d7e1119..ab1c96e 100644 --- a/cmake/Module.cmake +++ b/cmake/Module.cmake @@ -1,5 +1,6 @@ set_property(GLOBAL PROPERTY VOID_MODULES "") set_property(GLOBAL PROPERTY VOID_EXT_DEPS "") +set_property(GLOBAL PROPERTY VOID_PENDING_OPTIONAL_DEPS "") function(void_add_module MODULE_NAME) cmake_parse_arguments(ARG "" "" @@ -46,14 +47,14 @@ function(void_add_module MODULE_NAME) target_link_libraries(${TGT} ${SCOPE} ${PROJECT_NAME}::${int_dep}) endforeach() - get_property(CURRENT_MODULES GLOBAL PROPERTY VOID_MODULES) - foreach(opt_dep IN LISTS ARG_OPTIONAL_DEPS) - if(${opt_dep} IN_LIST CURRENT_MODULES) - target_link_libraries(${TGT} ${SCOPE} ${PROJECT_NAME}::${opt_dep}) - string(TOUPPER ${opt_dep} UPPER_DEP) - target_compile_definitions(${TGT} ${SCOPE} VOID_HAS_${UPPER_DEP}) - endif() - endforeach() + # Optional deps are resolved in void_finalize_modules() after every + # module has been discovered, so resolution does not depend on the + # alphabetical order in which src/ subdirectories are processed. + if(ARG_OPTIONAL_DEPS) + string(REPLACE ";" "," _opt_list "${ARG_OPTIONAL_DEPS}") + set_property(GLOBAL APPEND PROPERTY VOID_PENDING_OPTIONAL_DEPS + "${TGT}|${SCOPE}|${_opt_list}") + endif() if(ARG_EXTERNAL_DEPS) target_link_libraries(${TGT} ${SCOPE} ${ARG_EXTERNAL_DEPS}) @@ -138,3 +139,25 @@ function(void_add_module MODULE_NAME) ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ) endfunction() + +# Resolve OPTIONAL_DEPS recorded by void_add_module(). Must be called once +# after all modules have been discovered. Each present dep is linked and +# defines VOID_HAS_ on the dependent target. +function(void_finalize_modules) + get_property(_modules GLOBAL PROPERTY VOID_MODULES) + get_property(_pending GLOBAL PROPERTY VOID_PENDING_OPTIONAL_DEPS) + foreach(_entry IN LISTS _pending) + string(REPLACE "|" ";" _parts "${_entry}") + list(GET _parts 0 _tgt) + list(GET _parts 1 _scope) + list(GET _parts 2 _deps_packed) + string(REPLACE "," ";" _deps "${_deps_packed}") + foreach(_dep IN LISTS _deps) + if(_dep IN_LIST _modules) + target_link_libraries(${_tgt} ${_scope} ${PROJECT_NAME}::${_dep}) + string(TOUPPER ${_dep} _upper) + target_compile_definitions(${_tgt} ${_scope} VOID_HAS_${_upper}) + endif() + endforeach() + endforeach() +endfunction() diff --git a/cmake/module.cmake.template b/cmake/module.cmake.template index 00cebe3..9b23089 100644 --- a/cmake/module.cmake.template +++ b/cmake/module.cmake.template @@ -1,5 +1,5 @@ #example how add module -void_add_module(Logging +void_add_module(Log INTERNAL_DEPS Core EXTERNAL_DEPS glaze::glaze ) diff --git a/include/Void/Concurrency/Channel.hpp b/include/Void/Async/Channel.hpp similarity index 100% rename from include/Void/Concurrency/Channel.hpp rename to include/Void/Async/Channel.hpp diff --git a/include/Void/EventBus/EventBus.hpp b/include/Void/Async/EventBus.hpp similarity index 100% rename from include/Void/EventBus/EventBus.hpp rename to include/Void/Async/EventBus.hpp diff --git a/include/Void/Coro/Generator.hpp b/include/Void/Async/Generator.hpp similarity index 100% rename from include/Void/Coro/Generator.hpp rename to include/Void/Async/Generator.hpp diff --git a/include/Void/Observable/Observable.hpp b/include/Void/Async/Observable.hpp similarity index 100% rename from include/Void/Observable/Observable.hpp rename to include/Void/Async/Observable.hpp diff --git a/include/Void/Concurrency/ParallelFor.hpp b/include/Void/Async/ParallelFor.hpp similarity index 95% rename from include/Void/Concurrency/ParallelFor.hpp rename to include/Void/Async/ParallelFor.hpp index 73f7d3e..be96352 100644 --- a/include/Void/Concurrency/ParallelFor.hpp +++ b/include/Void/Async/ParallelFor.hpp @@ -1,5 +1,5 @@ #pragma once -#include +#include #include #include #include diff --git a/include/Void/Coro/Task.hpp b/include/Void/Async/Task.hpp similarity index 100% rename from include/Void/Coro/Task.hpp rename to include/Void/Async/Task.hpp diff --git a/include/Void/Concurrency/ThreadPool.hpp b/include/Void/Async/ThreadPool.hpp similarity index 100% rename from include/Void/Concurrency/ThreadPool.hpp rename to include/Void/Async/ThreadPool.hpp diff --git a/include/Void/Argparse/Argparse.hpp b/include/Void/Configuration/Argparse.hpp similarity index 100% rename from include/Void/Argparse/Argparse.hpp rename to include/Void/Configuration/Argparse.hpp diff --git a/include/Void/Configuration/Config.hpp b/include/Void/Configuration/Config.hpp index fc40a18..724df79 100644 --- a/include/Void/Configuration/Config.hpp +++ b/include/Void/Configuration/Config.hpp @@ -1,10 +1,10 @@ #pragma once #include -#include +#include #include -#include -#include +#include +#include #include #include diff --git a/include/Void/Configuration/Env.hpp b/include/Void/Configuration/Env.hpp index 5554bb6..21517a5 100644 --- a/include/Void/Configuration/Env.hpp +++ b/include/Void/Configuration/Env.hpp @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include #include #include diff --git a/include/Void/Bitset/Bitset.hpp b/include/Void/Containers/Bitset.hpp similarity index 100% rename from include/Void/Bitset/Bitset.hpp rename to include/Void/Containers/Bitset.hpp diff --git a/include/Void/DisjointSet/DisjointSet.hpp b/include/Void/Containers/DisjointSet.hpp similarity index 100% rename from include/Void/DisjointSet/DisjointSet.hpp rename to include/Void/Containers/DisjointSet.hpp diff --git a/include/Void/Graph/Graph.hpp b/include/Void/Containers/Graph.hpp similarity index 100% rename from include/Void/Graph/Graph.hpp rename to include/Void/Containers/Graph.hpp diff --git a/include/Void/Interval/Interval.hpp b/include/Void/Containers/Interval.hpp similarity index 100% rename from include/Void/Interval/Interval.hpp rename to include/Void/Containers/Interval.hpp diff --git a/include/Void/LRU/LRU.hpp b/include/Void/Containers/LRU.hpp similarity index 100% rename from include/Void/LRU/LRU.hpp rename to include/Void/Containers/LRU.hpp diff --git a/include/Void/Pool/Pool.hpp b/include/Void/Containers/Pool.hpp similarity index 100% rename from include/Void/Pool/Pool.hpp rename to include/Void/Containers/Pool.hpp diff --git a/include/Void/PriorityQueue/PriorityQueue.hpp b/include/Void/Containers/PriorityQueue.hpp similarity index 100% rename from include/Void/PriorityQueue/PriorityQueue.hpp rename to include/Void/Containers/PriorityQueue.hpp diff --git a/include/Void/Ring/Ring.hpp b/include/Void/Containers/Ring.hpp similarity index 100% rename from include/Void/Ring/Ring.hpp rename to include/Void/Containers/Ring.hpp diff --git a/include/Void/Trie/Trie.hpp b/include/Void/Containers/Trie.hpp similarity index 100% rename from include/Void/Trie/Trie.hpp rename to include/Void/Containers/Trie.hpp diff --git a/include/Void/Bits/Bits.hpp b/include/Void/Core/Bits.hpp similarity index 100% rename from include/Void/Bits/Bits.hpp rename to include/Void/Core/Bits.hpp diff --git a/include/Void/Counted/Counted.hpp b/include/Void/Core/Counted.hpp similarity index 100% rename from include/Void/Counted/Counted.hpp rename to include/Void/Core/Counted.hpp diff --git a/include/Void/Flags/Flags.hpp b/include/Void/Core/Flags.hpp similarity index 100% rename from include/Void/Flags/Flags.hpp rename to include/Void/Core/Flags.hpp diff --git a/include/Void/Hash/Hash.hpp b/include/Void/Core/Hash.hpp similarity index 100% rename from include/Void/Hash/Hash.hpp rename to include/Void/Core/Hash.hpp diff --git a/include/Void/Lazy/Lazy.hpp b/include/Void/Core/Lazy.hpp similarity index 100% rename from include/Void/Lazy/Lazy.hpp rename to include/Void/Core/Lazy.hpp diff --git a/include/Void/Scope/Scope.hpp b/include/Void/Core/Scope.hpp similarity index 100% rename from include/Void/Scope/Scope.hpp rename to include/Void/Core/Scope.hpp diff --git a/include/Void/TypeList/TypeList.hpp b/include/Void/Core/TypeList.hpp similarity index 100% rename from include/Void/TypeList/TypeList.hpp rename to include/Void/Core/TypeList.hpp diff --git a/include/Void/TypeMap/TypeMap.hpp b/include/Void/Core/TypeMap.hpp similarity index 100% rename from include/Void/TypeMap/TypeMap.hpp rename to include/Void/Core/TypeMap.hpp diff --git a/include/Void/Uuid/Uuid.hpp b/include/Void/Core/Uuid.hpp similarity index 99% rename from include/Void/Uuid/Uuid.hpp rename to include/Void/Core/Uuid.hpp index 16316d6..333ef52 100644 --- a/include/Void/Uuid/Uuid.hpp +++ b/include/Void/Core/Uuid.hpp @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include #include #include diff --git a/include/Void/Variant/Variant.hpp b/include/Void/Core/Variant.hpp similarity index 100% rename from include/Void/Variant/Variant.hpp rename to include/Void/Core/Variant.hpp diff --git a/include/Void/Csv/Csv.hpp b/include/Void/Data/Csv.hpp similarity index 100% rename from include/Void/Csv/Csv.hpp rename to include/Void/Data/Csv.hpp diff --git a/include/Void/Ini/Ini.hpp b/include/Void/Data/Ini.hpp similarity index 100% rename from include/Void/Ini/Ini.hpp rename to include/Void/Data/Ini.hpp diff --git a/include/Void/Json/Json.hpp b/include/Void/Data/Json.hpp similarity index 100% rename from include/Void/Json/Json.hpp rename to include/Void/Data/Json.hpp diff --git a/include/Void/Pipeline/Curry.hpp b/include/Void/Functional/Curry.hpp similarity index 100% rename from include/Void/Pipeline/Curry.hpp rename to include/Void/Functional/Curry.hpp diff --git a/include/Void/Result/Detail/Repr.hpp b/include/Void/Functional/Detail/Repr.hpp similarity index 100% rename from include/Void/Result/Detail/Repr.hpp rename to include/Void/Functional/Detail/Repr.hpp diff --git a/include/Void/Either/Either.hpp b/include/Void/Functional/Either.hpp similarity index 100% rename from include/Void/Either/Either.hpp rename to include/Void/Functional/Either.hpp diff --git a/include/Void/Result/Error.hpp b/include/Void/Functional/Error.hpp similarity index 100% rename from include/Void/Result/Error.hpp rename to include/Void/Functional/Error.hpp diff --git a/include/Void/Pipeline/Memo.hpp b/include/Void/Functional/Memo.hpp similarity index 100% rename from include/Void/Pipeline/Memo.hpp rename to include/Void/Functional/Memo.hpp diff --git a/include/Void/Either/Opt.hpp b/include/Void/Functional/Opt.hpp similarity index 99% rename from include/Void/Either/Opt.hpp rename to include/Void/Functional/Opt.hpp index 010d8f8..01bf2ee 100644 --- a/include/Void/Either/Opt.hpp +++ b/include/Void/Functional/Opt.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include diff --git a/include/Void/Pipeline/Pipeline.hpp b/include/Void/Functional/Pipeline.hpp similarity index 100% rename from include/Void/Pipeline/Pipeline.hpp rename to include/Void/Functional/Pipeline.hpp diff --git a/include/Void/Result/Result.hpp b/include/Void/Functional/Result.hpp similarity index 98% rename from include/Void/Result/Result.hpp rename to include/Void/Functional/Result.hpp index 8f2b80b..a1ab9bf 100644 --- a/include/Void/Result/Result.hpp +++ b/include/Void/Functional/Result.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/include/Void/Retry/Retry.hpp b/include/Void/Functional/Retry.hpp similarity index 100% rename from include/Void/Retry/Retry.hpp rename to include/Void/Functional/Retry.hpp diff --git a/include/Void/Logging/ConsoleLogger.hpp b/include/Void/Log/ConsoleLogger.hpp similarity index 97% rename from include/Void/Logging/ConsoleLogger.hpp rename to include/Void/Log/ConsoleLogger.hpp index 87f4051..58f0d69 100644 --- a/include/Void/Logging/ConsoleLogger.hpp +++ b/include/Void/Log/ConsoleLogger.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include diff --git a/include/Void/Logging/Entry.hpp b/include/Void/Log/Entry.hpp similarity index 98% rename from include/Void/Logging/Entry.hpp rename to include/Void/Log/Entry.hpp index aaca855..e464dad 100644 --- a/include/Void/Logging/Entry.hpp +++ b/include/Void/Log/Entry.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/include/Void/Logging/FileLogger.hpp b/include/Void/Log/FileLogger.hpp similarity index 94% rename from include/Void/Logging/FileLogger.hpp rename to include/Void/Log/FileLogger.hpp index b7378c8..8d5464e 100644 --- a/include/Void/Logging/FileLogger.hpp +++ b/include/Void/Log/FileLogger.hpp @@ -1,8 +1,8 @@ #pragma once -#include -#include -#include +#include +#include +#include #include #include diff --git a/include/Void/Logging/Level.hpp b/include/Void/Log/Level.hpp similarity index 100% rename from include/Void/Logging/Level.hpp rename to include/Void/Log/Level.hpp diff --git a/include/Void/Log/Log.hpp b/include/Void/Log/Log.hpp index 944b1da..ba144c5 100644 --- a/include/Void/Log/Log.hpp +++ b/include/Void/Log/Log.hpp @@ -1,6 +1,9 @@ #pragma once #include +#include +#include #include +#include namespace Void::Log { @@ -21,14 +24,41 @@ namespace Void::Log using Sink = std::function; + namespace Detail + { + struct SinkState { + Sink sink; + std::shared_mutex mutex; + }; + + inline SinkState& sink_state() + { + static SinkState state; + return state; + } + } // namespace Detail + /// Install the global sink. Any previously installed sink is replaced. /// Pass a default-constructed (empty) Sink to silence all output. /// Thread-safe: the new sink is visible to all threads after this returns. - void set_sink(Sink sink); + inline void set_sink(Sink sink) + { + auto& state = Detail::sink_state(); + std::unique_lock lock{state.mutex}; + state.sink = std::move(sink); + } /// Emit one log event through the global sink. /// No-op (zero allocation) if no sink is installed. /// Thread-safe with respect to set_sink() and concurrent log() calls. - void log(Level level, std::string_view module, std::string_view message); + inline void log(Level level, std::string_view module, + std::string_view message) + { + auto& state = Detail::sink_state(); + std::shared_lock lock{state.mutex}; + if (state.sink) { + state.sink(level, module, message); + } + } } // namespace Void::Log diff --git a/include/Void/Logging/Logger.hpp b/include/Void/Log/Logger.hpp similarity index 99% rename from include/Void/Logging/Logger.hpp rename to include/Void/Log/Logger.hpp index e8eff0f..189e6e8 100644 --- a/include/Void/Logging/Logger.hpp +++ b/include/Void/Log/Logger.hpp @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include #include #include diff --git a/include/Void/Log/LoggingAdapter.hpp b/include/Void/Log/LoggingAdapter.hpp index b2c0cbe..9fff183 100644 --- a/include/Void/Log/LoggingAdapter.hpp +++ b/include/Void/Log/LoggingAdapter.hpp @@ -1,7 +1,7 @@ #pragma once #include #include -#include +#include // Bridge between Void::Log (the thin emission layer used by all modules) and // Void::Logging::Logger (the full sink implementation). @@ -11,7 +11,7 @@ // // Example: // #include -// #include +// #include // // Void::Logging::ConsoleLogger logger; // Void::Log::set_sink(Void::Log::make_sink(logger)); diff --git a/include/Void/Histogram/Histogram.hpp b/include/Void/Math/Histogram.hpp similarity index 100% rename from include/Void/Histogram/Histogram.hpp rename to include/Void/Math/Histogram.hpp diff --git a/include/Void/Matrix/Matrix.hpp b/include/Void/Math/Matrix.hpp similarity index 100% rename from include/Void/Matrix/Matrix.hpp rename to include/Void/Math/Matrix.hpp diff --git a/include/Void/Numeric/Numeric.hpp b/include/Void/Math/Numeric.hpp similarity index 100% rename from include/Void/Numeric/Numeric.hpp rename to include/Void/Math/Numeric.hpp diff --git a/include/Void/Random/Random.hpp b/include/Void/Math/Random.hpp similarity index 100% rename from include/Void/Random/Random.hpp rename to include/Void/Math/Random.hpp diff --git a/include/Void/Stacktrace/Stacktrace.hpp b/include/Void/Stacktrace/Stacktrace.hpp index 0e64ac7..cb16d9c 100644 --- a/include/Void/Stacktrace/Stacktrace.hpp +++ b/include/Void/Stacktrace/Stacktrace.hpp @@ -1,6 +1,6 @@ #pragma once -#include -#include +#include +#include #include #include #include diff --git a/include/Void/FileSystem/Path.hpp b/include/Void/System/Path.hpp similarity index 98% rename from include/Void/FileSystem/Path.hpp rename to include/Void/System/Path.hpp index fa09e7b..b3d0d2f 100644 --- a/include/Void/FileSystem/Path.hpp +++ b/include/Void/System/Path.hpp @@ -1,8 +1,8 @@ #pragma once #include -#include -#include +#include +#include #include #include diff --git a/include/Void/Process/Process.hpp b/include/Void/System/Process.hpp similarity index 95% rename from include/Void/Process/Process.hpp rename to include/Void/System/Process.hpp index 6cb1ea7..a7bf5be 100644 --- a/include/Void/Process/Process.hpp +++ b/include/Void/System/Process.hpp @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include #include #include diff --git a/include/Void/FileSystem/Query.hpp b/include/Void/System/Query.hpp similarity index 98% rename from include/Void/FileSystem/Query.hpp rename to include/Void/System/Query.hpp index a13bc1e..b4b7604 100644 --- a/include/Void/FileSystem/Query.hpp +++ b/include/Void/System/Query.hpp @@ -1,8 +1,8 @@ #pragma once #include -#include -#include +#include +#include #include #include diff --git a/include/Void/FileSystem/TempDir.hpp b/include/Void/System/TempDir.hpp similarity index 98% rename from include/Void/FileSystem/TempDir.hpp rename to include/Void/System/TempDir.hpp index 0c9f563..874ab1e 100644 --- a/include/Void/FileSystem/TempDir.hpp +++ b/include/Void/System/TempDir.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/include/Void/Testing/Assert.hpp b/include/Void/Testing/Assert.hpp index 11b6bd2..443366d 100644 --- a/include/Void/Testing/Assert.hpp +++ b/include/Void/Testing/Assert.hpp @@ -1,5 +1,5 @@ #pragma once -#include +#include #include #include #include diff --git a/include/Void/Encoding/Base64.hpp b/include/Void/Text/Base64.hpp similarity index 100% rename from include/Void/Encoding/Base64.hpp rename to include/Void/Text/Base64.hpp diff --git a/include/Void/Diff/Diff.hpp b/include/Void/Text/Diff.hpp similarity index 100% rename from include/Void/Diff/Diff.hpp rename to include/Void/Text/Diff.hpp diff --git a/include/Void/Format/Format.hpp b/include/Void/Text/Format.hpp similarity index 100% rename from include/Void/Format/Format.hpp rename to include/Void/Text/Format.hpp diff --git a/include/Void/Encoding/Hex.hpp b/include/Void/Text/Hex.hpp similarity index 100% rename from include/Void/Encoding/Hex.hpp rename to include/Void/Text/Hex.hpp diff --git a/include/Void/Semver/Semver.hpp b/include/Void/Text/Semver.hpp similarity index 100% rename from include/Void/Semver/Semver.hpp rename to include/Void/Text/Semver.hpp diff --git a/include/Void/Str/Str.hpp b/include/Void/Text/Str.hpp similarity index 100% rename from include/Void/Str/Str.hpp rename to include/Void/Text/Str.hpp diff --git a/include/Void/Tokenizer/Tokenizer.hpp b/include/Void/Text/Tokenizer.hpp similarity index 100% rename from include/Void/Tokenizer/Tokenizer.hpp rename to include/Void/Text/Tokenizer.hpp diff --git a/include/Void/Bench/Bench.hpp b/include/Void/Time/Bench.hpp similarity index 100% rename from include/Void/Bench/Bench.hpp rename to include/Void/Time/Bench.hpp diff --git a/src/Async/module.cmake b/src/Async/module.cmake new file mode 100644 index 0000000..262c4d8 --- /dev/null +++ b/src/Async/module.cmake @@ -0,0 +1 @@ +void_add_module(Async) diff --git a/src/Concurrency/module.cmake b/src/Concurrency/module.cmake deleted file mode 100644 index 5792ffa..0000000 --- a/src/Concurrency/module.cmake +++ /dev/null @@ -1,3 +0,0 @@ -void_add_module(Concurrency - INTERNAL_DEPS Log -) diff --git a/src/Argparse/Argparse.cpp b/src/Configuration/Argparse.cpp similarity index 99% rename from src/Argparse/Argparse.cpp rename to src/Configuration/Argparse.cpp index d88aefe..25eb3e7 100644 --- a/src/Argparse/Argparse.cpp +++ b/src/Configuration/Argparse.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/Configuration/module.cmake b/src/Configuration/module.cmake index 2924c26..ad6fbe3 100644 --- a/src/Configuration/module.cmake +++ b/src/Configuration/module.cmake @@ -1,3 +1,3 @@ void_add_module(Configuration - INTERNAL_DEPS Result FileSystem Log + INTERNAL_DEPS Functional System ) diff --git a/src/Containers/module.cmake b/src/Containers/module.cmake new file mode 100644 index 0000000..e951b82 --- /dev/null +++ b/src/Containers/module.cmake @@ -0,0 +1 @@ +void_add_module(Containers) diff --git a/src/Core/module.cmake b/src/Core/module.cmake new file mode 100644 index 0000000..9a8e7b1 --- /dev/null +++ b/src/Core/module.cmake @@ -0,0 +1 @@ +void_add_module(Core) diff --git a/src/Data/module.cmake b/src/Data/module.cmake new file mode 100644 index 0000000..9cd619b --- /dev/null +++ b/src/Data/module.cmake @@ -0,0 +1 @@ +void_add_module(Data) diff --git a/src/FileSystem/module.cmake b/src/FileSystem/module.cmake deleted file mode 100644 index 87215ac..0000000 --- a/src/FileSystem/module.cmake +++ /dev/null @@ -1,3 +0,0 @@ -void_add_module(FileSystem - INTERNAL_DEPS Result Log -) diff --git a/src/Functional/module.cmake b/src/Functional/module.cmake new file mode 100644 index 0000000..09c92e4 --- /dev/null +++ b/src/Functional/module.cmake @@ -0,0 +1 @@ +void_add_module(Functional) diff --git a/src/Logging/ConsoleLogger.cpp b/src/Log/ConsoleLogger.cpp similarity index 98% rename from src/Logging/ConsoleLogger.cpp rename to src/Log/ConsoleLogger.cpp index d932005..48bfe3d 100644 --- a/src/Logging/ConsoleLogger.cpp +++ b/src/Log/ConsoleLogger.cpp @@ -1,5 +1,5 @@ #include -#include +#include #ifdef VOID_HAS_STACKTRACE #include diff --git a/src/Logging/Entry.cpp b/src/Log/Entry.cpp similarity index 100% rename from src/Logging/Entry.cpp rename to src/Log/Entry.cpp diff --git a/src/Logging/FileLogger.cpp b/src/Log/FileLogger.cpp similarity index 97% rename from src/Logging/FileLogger.cpp rename to src/Log/FileLogger.cpp index 396fb49..fefc425 100644 --- a/src/Logging/FileLogger.cpp +++ b/src/Log/FileLogger.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/Logging/Level.cpp b/src/Log/Level.cpp similarity index 84% rename from src/Logging/Level.cpp rename to src/Log/Level.cpp index 1959b1a..5f72c7d 100644 --- a/src/Logging/Level.cpp +++ b/src/Log/Level.cpp @@ -1,4 +1,4 @@ -#include +#include #include namespace Void::Logging { diff --git a/src/Log/Log.cpp b/src/Log/Log.cpp deleted file mode 100644 index d137402..0000000 --- a/src/Log/Log.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include -#include -#include - -namespace Void::Log -{ - - namespace - { - Sink g_sink; - std::shared_mutex g_mutex; - } // namespace - - void set_sink(Sink sink) - { - std::unique_lock lock{g_mutex}; - g_sink = std::move(sink); - } - - void log(Level level, std::string_view module, std::string_view message) - { - std::shared_lock lock{g_mutex}; - if (g_sink) { - g_sink(level, module, message); - } - } - -} // namespace Void::Log diff --git a/src/Logging/Logger.cpp b/src/Log/Logger.cpp similarity index 99% rename from src/Logging/Logger.cpp rename to src/Log/Logger.cpp index 46e655b..6e1b3c8 100644 --- a/src/Logging/Logger.cpp +++ b/src/Log/Logger.cpp @@ -1,4 +1,4 @@ -#include +#include #include // std::exchange diff --git a/src/Log/module.cmake b/src/Log/module.cmake index 51b5cf1..461252b 100644 --- a/src/Log/module.cmake +++ b/src/Log/module.cmake @@ -1 +1,4 @@ -void_add_module(Log) +void_add_module(Log + INTERNAL_DEPS Functional + OPTIONAL_DEPS Stacktrace +) diff --git a/src/Logging/module.cmake b/src/Logging/module.cmake deleted file mode 100644 index 698066f..0000000 --- a/src/Logging/module.cmake +++ /dev/null @@ -1,4 +0,0 @@ -void_add_module(Logging - INTERNAL_DEPS Result Log - OPTIONAL_DEPS Stacktrace -) diff --git a/src/Math/module.cmake b/src/Math/module.cmake new file mode 100644 index 0000000..2da910f --- /dev/null +++ b/src/Math/module.cmake @@ -0,0 +1 @@ +void_add_module(Math) diff --git a/src/Process/module.cmake b/src/Process/module.cmake deleted file mode 100644 index 3b5c29c..0000000 --- a/src/Process/module.cmake +++ /dev/null @@ -1,3 +0,0 @@ -void_add_module(Process - INTERNAL_DEPS Result Log -) diff --git a/src/Result/module.cmake b/src/Result/module.cmake deleted file mode 100644 index 85ab6d6..0000000 --- a/src/Result/module.cmake +++ /dev/null @@ -1 +0,0 @@ -void_add_module(Result) diff --git a/src/Stacktrace/module.cmake b/src/Stacktrace/module.cmake index b13ca16..cf84d46 100644 --- a/src/Stacktrace/module.cmake +++ b/src/Stacktrace/module.cmake @@ -1,5 +1,5 @@ void_add_module(Stacktrace - INTERNAL_DEPS Result Log + INTERNAL_DEPS Functional EXTERNAL_DEPS Boost::stacktrace_backtrace DEPS_WIN32 dbghelp DEPS_UNIX dl diff --git a/src/StateMachine/module.cmake b/src/StateMachine/module.cmake new file mode 100644 index 0000000..93e38ee --- /dev/null +++ b/src/StateMachine/module.cmake @@ -0,0 +1 @@ +void_add_module(StateMachine) diff --git a/src/Process/Process.cpp b/src/System/Process.cpp similarity index 99% rename from src/Process/Process.cpp rename to src/System/Process.cpp index 9d60094..9636955 100644 --- a/src/Process/Process.cpp +++ b/src/System/Process.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/System/module.cmake b/src/System/module.cmake new file mode 100644 index 0000000..2c60c13 --- /dev/null +++ b/src/System/module.cmake @@ -0,0 +1,3 @@ +void_add_module(System + INTERNAL_DEPS Functional +) diff --git a/src/Testing/Runner.cpp b/src/Testing/Runner.cpp index bed9c83..2714409 100644 --- a/src/Testing/Runner.cpp +++ b/src/Testing/Runner.cpp @@ -14,8 +14,8 @@ #include #include -#ifdef VOID_HAS_CONCURRENCY -#include +#ifdef VOID_HAS_ASYNC +#include #include #endif @@ -25,15 +25,15 @@ #include #endif -#ifdef VOID_HAS_LOGGING +#ifdef VOID_HAS_LOG #include -#include -#include -#include +#include +#include +#include #endif -#ifdef VOID_HAS_STR -#include +#ifdef VOID_HAS_TEXT +#include #endif #include @@ -345,7 +345,7 @@ namespace Void::Testing constexpr std::size_t OPT_WIDTH = 23; auto opt = [&](std::string_view name) { -#ifdef VOID_HAS_STR +#ifdef VOID_HAS_TEXT return apply(green, Void::Str::pad_right(name, OPT_WIDTH)); #else std::string s{name}; @@ -377,13 +377,13 @@ namespace Void::Testing << "\n" << " " << opt("--output ") << apply(dim, "Write reporter output to a file") << "\n" -#ifdef VOID_HAS_LOGGING +#ifdef VOID_HAS_LOG << " " << opt("--log-file ") << apply(dim, "Mirror test events to via Void::Logging") << "\n" #endif -#ifdef VOID_HAS_CONCURRENCY +#ifdef VOID_HAS_ASYNC << " " << opt("--parallel ") << apply(dim, "Run tests across n threads (no crash detection)") @@ -414,7 +414,7 @@ namespace Void::Testing auto reporter = create_reporter(config); // ── Optional: file logger sink (requires Void::Logging) ────────────────── -#ifdef VOID_HAS_LOGGING +#ifdef VOID_HAS_LOG std::unique_ptr log_sink; if (!config.log_file.empty()) { try { @@ -433,7 +433,7 @@ namespace Void::Testing #endif // ── Optional: VOID_LOG_LEVEL auto-sink ─────────────────────────────────── -#ifdef VOID_HAS_LOGGING +#ifdef VOID_HAS_LOG std::unique_ptr env_log; { #ifdef VOID_HAS_CONFIGURATION @@ -463,7 +463,7 @@ namespace Void::Testing Void::Log::set_sink(Void::Log::make_sink(*env_log)); } } -#endif // VOID_HAS_LOGGING +#endif // VOID_HAS_LOG if (config.list_only) { for (const auto& t : tests) { @@ -485,7 +485,7 @@ namespace Void::Testing } auto log_result = [&](const TestResult& r, const std::string& q) { -#ifdef VOID_HAS_LOGGING +#ifdef VOID_HAS_LOG if (!log_sink) { return; } @@ -523,7 +523,7 @@ namespace Void::Testing // ── Optional: parallel execution (requires Void::Concurrency) ──────────── bool run_parallel = config.parallel_threads > 0; -#ifndef VOID_HAS_CONCURRENCY +#ifndef VOID_HAS_ASYNC if (run_parallel) { std::cerr << "warning: --parallel requires Void::Concurrency " "(not linked); running sequentially\n"; @@ -532,9 +532,9 @@ namespace Void::Testing #endif if (run_parallel) { -#ifdef VOID_HAS_CONCURRENCY +#ifdef VOID_HAS_ASYNC reporter->on_run_start(config, static_cast(tests.size())); -#ifdef VOID_HAS_LOGGING +#ifdef VOID_HAS_LOG if (log_sink) { log_sink->info(std::format( "run start (parallel, {} threads): {} test(s)", @@ -575,10 +575,10 @@ namespace Void::Testing suite_results[suite_index[test.suite]].tests.push_back( std::move(result)); } -#endif // VOID_HAS_CONCURRENCY +#endif // VOID_HAS_ASYNC } else { reporter->on_run_start(config, static_cast(tests.size())); -#ifdef VOID_HAS_LOGGING +#ifdef VOID_HAS_LOG if (log_sink) { log_sink->info(std::format("run start: {} test(s) discovered", tests.size())); @@ -587,7 +587,7 @@ namespace Void::Testing if (config.shuffle) { std::shuffle(tests.begin(), tests.end(), std::mt19937{config.random_seed}); -#ifdef VOID_HAS_LOGGING +#ifdef VOID_HAS_LOG if (log_sink) { log_sink->info(std::format("shuffle enabled (seed = {})", config.random_seed)); @@ -609,7 +609,7 @@ namespace Void::Testing [&](const auto& t) { return t.suite == suite.name; })); -#ifdef VOID_HAS_LOGGING +#ifdef VOID_HAS_LOG if (log_sink) { log_sink->info(std::format("suite start: {}", suite.name)); @@ -653,7 +653,7 @@ namespace Void::Testing } run_result.total_duration = end_time - start_time; reporter->on_run_end(run_result); -#ifdef VOID_HAS_LOGGING +#ifdef VOID_HAS_LOG if (log_sink) { log_sink->info( std::format("run end: {} total / {} passed / {} failed / {} " diff --git a/src/Testing/module.cmake b/src/Testing/module.cmake index d960ed2..a2374ef 100644 --- a/src/Testing/module.cmake +++ b/src/Testing/module.cmake @@ -1,3 +1,3 @@ void_add_module(Testing - OPTIONAL_DEPS Stacktrace Logging Concurrency Configuration Str + OPTIONAL_DEPS Stacktrace Log Async Configuration Text ) diff --git a/src/TestingMock/module.cmake b/src/TestingMock/module.cmake index 909b067..e720bb4 100644 --- a/src/TestingMock/module.cmake +++ b/src/TestingMock/module.cmake @@ -1 +1 @@ -void_add_module(TestingMock INTERNAL_DEPS Testing Result) +void_add_module(TestingMock INTERNAL_DEPS Testing Functional) diff --git a/src/Text/module.cmake b/src/Text/module.cmake new file mode 100644 index 0000000..15b7f2e --- /dev/null +++ b/src/Text/module.cmake @@ -0,0 +1 @@ +void_add_module(Text) diff --git a/src/Time/module.cmake b/src/Time/module.cmake new file mode 100644 index 0000000..db1299c --- /dev/null +++ b/src/Time/module.cmake @@ -0,0 +1 @@ +void_add_module(Time) diff --git a/tests/internal/CrossModule.cpp b/tests/internal/CrossModule.cpp index 75a1283..446977a 100644 --- a/tests/internal/CrossModule.cpp +++ b/tests/internal/CrossModule.cpp @@ -3,15 +3,15 @@ // together — the kind of thing the standalone per-module tests can't // reach because they only link one module. -#include -#include +#include +#include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include diff --git a/tests/standalone/Concurrency/Channel.cpp b/tests/standalone/Async/Channel.cpp similarity index 98% rename from tests/standalone/Concurrency/Channel.cpp rename to tests/standalone/Async/Channel.cpp index dd9f7c6..4a61383 100644 --- a/tests/standalone/Concurrency/Channel.cpp +++ b/tests/standalone/Async/Channel.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Coro/Coro.cpp b/tests/standalone/Async/Coro.cpp similarity index 98% rename from tests/standalone/Coro/Coro.cpp rename to tests/standalone/Async/Coro.cpp index 1962e4a..e519fa6 100644 --- a/tests/standalone/Coro/Coro.cpp +++ b/tests/standalone/Async/Coro.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/tests/standalone/EventBus/EventBus.cpp b/tests/standalone/Async/EventBus.cpp similarity index 99% rename from tests/standalone/EventBus/EventBus.cpp rename to tests/standalone/Async/EventBus.cpp index 274612d..88a2ab5 100644 --- a/tests/standalone/EventBus/EventBus.cpp +++ b/tests/standalone/Async/EventBus.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Observable/Observable.cpp b/tests/standalone/Async/Observable.cpp similarity index 99% rename from tests/standalone/Observable/Observable.cpp rename to tests/standalone/Async/Observable.cpp index 91408cc..c498687 100644 --- a/tests/standalone/Observable/Observable.cpp +++ b/tests/standalone/Async/Observable.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Concurrency/ParallelFor.cpp b/tests/standalone/Async/ParallelFor.cpp similarity index 96% rename from tests/standalone/Concurrency/ParallelFor.cpp rename to tests/standalone/Async/ParallelFor.cpp index ac9b48f..099720a 100644 --- a/tests/standalone/Concurrency/ParallelFor.cpp +++ b/tests/standalone/Async/ParallelFor.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Concurrency/ThreadPool.cpp b/tests/standalone/Async/ThreadPool.cpp similarity index 97% rename from tests/standalone/Concurrency/ThreadPool.cpp rename to tests/standalone/Async/ThreadPool.cpp index 91841ac..a4bb941 100644 --- a/tests/standalone/Concurrency/ThreadPool.cpp +++ b/tests/standalone/Async/ThreadPool.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Argparse/Argparse.cpp b/tests/standalone/Configuration/Argparse.cpp similarity index 99% rename from tests/standalone/Argparse/Argparse.cpp rename to tests/standalone/Configuration/Argparse.cpp index 25a745c..980573c 100644 --- a/tests/standalone/Argparse/Argparse.cpp +++ b/tests/standalone/Configuration/Argparse.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Configuration/Config.cpp b/tests/standalone/Configuration/Config.cpp index 7211824..2b315e5 100644 --- a/tests/standalone/Configuration/Config.cpp +++ b/tests/standalone/Configuration/Config.cpp @@ -1,7 +1,7 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/tests/standalone/Bitset/Bitset.cpp b/tests/standalone/Containers/Bitset.cpp similarity index 99% rename from tests/standalone/Bitset/Bitset.cpp rename to tests/standalone/Containers/Bitset.cpp index b5b3448..532dc16 100644 --- a/tests/standalone/Bitset/Bitset.cpp +++ b/tests/standalone/Containers/Bitset.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/DisjointSet/DisjointSet.cpp b/tests/standalone/Containers/DisjointSet.cpp similarity index 98% rename from tests/standalone/DisjointSet/DisjointSet.cpp rename to tests/standalone/Containers/DisjointSet.cpp index 6f0b91d..2c377ef 100644 --- a/tests/standalone/DisjointSet/DisjointSet.cpp +++ b/tests/standalone/Containers/DisjointSet.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Graph/Graph.cpp b/tests/standalone/Containers/Graph.cpp similarity index 99% rename from tests/standalone/Graph/Graph.cpp rename to tests/standalone/Containers/Graph.cpp index 5764140..707cd5e 100644 --- a/tests/standalone/Graph/Graph.cpp +++ b/tests/standalone/Containers/Graph.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Interval/Interval.cpp b/tests/standalone/Containers/Interval.cpp similarity index 98% rename from tests/standalone/Interval/Interval.cpp rename to tests/standalone/Containers/Interval.cpp index 00d68e7..0b45061 100644 --- a/tests/standalone/Interval/Interval.cpp +++ b/tests/standalone/Containers/Interval.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/LRU/LRU.cpp b/tests/standalone/Containers/LRU.cpp similarity index 99% rename from tests/standalone/LRU/LRU.cpp rename to tests/standalone/Containers/LRU.cpp index 53bf71b..4e2ba0f 100644 --- a/tests/standalone/LRU/LRU.cpp +++ b/tests/standalone/Containers/LRU.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Pool/Pool.cpp b/tests/standalone/Containers/Pool.cpp similarity index 98% rename from tests/standalone/Pool/Pool.cpp rename to tests/standalone/Containers/Pool.cpp index ffdbfae..8b6e858 100644 --- a/tests/standalone/Pool/Pool.cpp +++ b/tests/standalone/Containers/Pool.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/PriorityQueue/PriorityQueue.cpp b/tests/standalone/Containers/PriorityQueue.cpp similarity index 99% rename from tests/standalone/PriorityQueue/PriorityQueue.cpp rename to tests/standalone/Containers/PriorityQueue.cpp index 674a276..fb11080 100644 --- a/tests/standalone/PriorityQueue/PriorityQueue.cpp +++ b/tests/standalone/Containers/PriorityQueue.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Ring/Ring.cpp b/tests/standalone/Containers/Ring.cpp similarity index 99% rename from tests/standalone/Ring/Ring.cpp rename to tests/standalone/Containers/Ring.cpp index adc4de4..e6945ae 100644 --- a/tests/standalone/Ring/Ring.cpp +++ b/tests/standalone/Containers/Ring.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Trie/Trie.cpp b/tests/standalone/Containers/Trie.cpp similarity index 99% rename from tests/standalone/Trie/Trie.cpp rename to tests/standalone/Containers/Trie.cpp index 599f3d7..da5f87a 100644 --- a/tests/standalone/Trie/Trie.cpp +++ b/tests/standalone/Containers/Trie.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Bits/Bits.cpp b/tests/standalone/Core/Bits.cpp similarity index 99% rename from tests/standalone/Bits/Bits.cpp rename to tests/standalone/Core/Bits.cpp index ff14e79..2991bb9 100644 --- a/tests/standalone/Bits/Bits.cpp +++ b/tests/standalone/Core/Bits.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Counted/Counted.cpp b/tests/standalone/Core/Counted.cpp similarity index 99% rename from tests/standalone/Counted/Counted.cpp rename to tests/standalone/Core/Counted.cpp index 03e851e..3db49ec 100644 --- a/tests/standalone/Counted/Counted.cpp +++ b/tests/standalone/Core/Counted.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Flags/Flags.cpp b/tests/standalone/Core/Flags.cpp similarity index 99% rename from tests/standalone/Flags/Flags.cpp rename to tests/standalone/Core/Flags.cpp index 8252396..d1bd82d 100644 --- a/tests/standalone/Flags/Flags.cpp +++ b/tests/standalone/Core/Flags.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Hash/Hash.cpp b/tests/standalone/Core/Hash.cpp similarity index 99% rename from tests/standalone/Hash/Hash.cpp rename to tests/standalone/Core/Hash.cpp index 10f2cee..a4a413e 100644 --- a/tests/standalone/Hash/Hash.cpp +++ b/tests/standalone/Core/Hash.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Lazy/Lazy.cpp b/tests/standalone/Core/Lazy.cpp similarity index 98% rename from tests/standalone/Lazy/Lazy.cpp rename to tests/standalone/Core/Lazy.cpp index 5324247..77dcb8f 100644 --- a/tests/standalone/Lazy/Lazy.cpp +++ b/tests/standalone/Core/Lazy.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Scope/Scope.cpp b/tests/standalone/Core/Scope.cpp similarity index 99% rename from tests/standalone/Scope/Scope.cpp rename to tests/standalone/Core/Scope.cpp index f00a10d..67d9cc2 100644 --- a/tests/standalone/Scope/Scope.cpp +++ b/tests/standalone/Core/Scope.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/TypeList/TypeList.cpp b/tests/standalone/Core/TypeList.cpp similarity index 99% rename from tests/standalone/TypeList/TypeList.cpp rename to tests/standalone/Core/TypeList.cpp index 7530f5e..5bf302b 100644 --- a/tests/standalone/TypeList/TypeList.cpp +++ b/tests/standalone/Core/TypeList.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/TypeMap/TypeMap.cpp b/tests/standalone/Core/TypeMap.cpp similarity index 98% rename from tests/standalone/TypeMap/TypeMap.cpp rename to tests/standalone/Core/TypeMap.cpp index 93eda91..08c3e32 100644 --- a/tests/standalone/TypeMap/TypeMap.cpp +++ b/tests/standalone/Core/TypeMap.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Uuid/Uuid.cpp b/tests/standalone/Core/Uuid.cpp similarity index 99% rename from tests/standalone/Uuid/Uuid.cpp rename to tests/standalone/Core/Uuid.cpp index 34327de..def8c6e 100644 --- a/tests/standalone/Uuid/Uuid.cpp +++ b/tests/standalone/Core/Uuid.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Variant/Variant.cpp b/tests/standalone/Core/Variant.cpp similarity index 99% rename from tests/standalone/Variant/Variant.cpp rename to tests/standalone/Core/Variant.cpp index c4e0d9c..e85b930 100644 --- a/tests/standalone/Variant/Variant.cpp +++ b/tests/standalone/Core/Variant.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Csv/Csv.cpp b/tests/standalone/Data/Csv.cpp similarity index 99% rename from tests/standalone/Csv/Csv.cpp rename to tests/standalone/Data/Csv.cpp index c4c3666..186bbeb 100644 --- a/tests/standalone/Csv/Csv.cpp +++ b/tests/standalone/Data/Csv.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Ini/Ini.cpp b/tests/standalone/Data/Ini.cpp similarity index 99% rename from tests/standalone/Ini/Ini.cpp rename to tests/standalone/Data/Ini.cpp index 266efea..71be11a 100644 --- a/tests/standalone/Ini/Ini.cpp +++ b/tests/standalone/Data/Ini.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Json/Json.cpp b/tests/standalone/Data/Json.cpp similarity index 99% rename from tests/standalone/Json/Json.cpp rename to tests/standalone/Data/Json.cpp index 2b45cf1..249d16d 100644 --- a/tests/standalone/Json/Json.cpp +++ b/tests/standalone/Data/Json.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Either/Either.cpp b/tests/standalone/Functional/Either.cpp similarity index 98% rename from tests/standalone/Either/Either.cpp rename to tests/standalone/Functional/Either.cpp index d24391a..5fa23b3 100644 --- a/tests/standalone/Either/Either.cpp +++ b/tests/standalone/Functional/Either.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/tests/standalone/Pipeline/Memo.cpp b/tests/standalone/Functional/Memo.cpp similarity index 99% rename from tests/standalone/Pipeline/Memo.cpp rename to tests/standalone/Functional/Memo.cpp index bf2f538..392e103 100644 --- a/tests/standalone/Pipeline/Memo.cpp +++ b/tests/standalone/Functional/Memo.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Pipeline/Pipeline.cpp b/tests/standalone/Functional/Pipeline.cpp similarity index 98% rename from tests/standalone/Pipeline/Pipeline.cpp rename to tests/standalone/Functional/Pipeline.cpp index f976846..084cd3a 100644 --- a/tests/standalone/Pipeline/Pipeline.cpp +++ b/tests/standalone/Functional/Pipeline.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include #include diff --git a/tests/standalone/Result/Basic.cpp b/tests/standalone/Functional/ResultBasic.cpp similarity index 92% rename from tests/standalone/Result/Basic.cpp rename to tests/standalone/Functional/ResultBasic.cpp index ca61591..93daae5 100644 --- a/tests/standalone/Result/Basic.cpp +++ b/tests/standalone/Functional/ResultBasic.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/tests/standalone/Result/Context.cpp b/tests/standalone/Functional/ResultContext.cpp similarity index 95% rename from tests/standalone/Result/Context.cpp rename to tests/standalone/Functional/ResultContext.cpp index db37c0d..017b5c1 100644 --- a/tests/standalone/Result/Context.cpp +++ b/tests/standalone/Functional/ResultContext.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/tests/standalone/Result/Monadic.cpp b/tests/standalone/Functional/ResultMonadic.cpp similarity index 94% rename from tests/standalone/Result/Monadic.cpp rename to tests/standalone/Functional/ResultMonadic.cpp index 95a9ce5..af9b783 100644 --- a/tests/standalone/Result/Monadic.cpp +++ b/tests/standalone/Functional/ResultMonadic.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/tests/standalone/Result/ReflectionFormat.cpp b/tests/standalone/Functional/ResultReflectionFormat.cpp similarity index 97% rename from tests/standalone/Result/ReflectionFormat.cpp rename to tests/standalone/Functional/ResultReflectionFormat.cpp index a4087da..2ab7c6e 100644 --- a/tests/standalone/Result/ReflectionFormat.cpp +++ b/tests/standalone/Functional/ResultReflectionFormat.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Retry/Retry.cpp b/tests/standalone/Functional/Retry.cpp similarity index 99% rename from tests/standalone/Retry/Retry.cpp rename to tests/standalone/Functional/Retry.cpp index ad7db9e..12fc5b6 100644 --- a/tests/standalone/Retry/Retry.cpp +++ b/tests/standalone/Functional/Retry.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Logging/ConsoleLogger.cpp b/tests/standalone/Log/ConsoleLogger.cpp similarity index 95% rename from tests/standalone/Logging/ConsoleLogger.cpp rename to tests/standalone/Log/ConsoleLogger.cpp index 1d1c020..437f0a6 100644 --- a/tests/standalone/Logging/ConsoleLogger.cpp +++ b/tests/standalone/Log/ConsoleLogger.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include #include diff --git a/tests/standalone/Logging/FileLogger.cpp b/tests/standalone/Log/FileLogger.cpp similarity index 97% rename from tests/standalone/Logging/FileLogger.cpp rename to tests/standalone/Log/FileLogger.cpp index 33724c2..bd3d72c 100644 --- a/tests/standalone/Logging/FileLogger.cpp +++ b/tests/standalone/Log/FileLogger.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include #include diff --git a/tests/standalone/Histogram/Histogram.cpp b/tests/standalone/Math/Histogram.cpp similarity index 99% rename from tests/standalone/Histogram/Histogram.cpp rename to tests/standalone/Math/Histogram.cpp index 4366416..70e5b37 100644 --- a/tests/standalone/Histogram/Histogram.cpp +++ b/tests/standalone/Math/Histogram.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Matrix/Matrix.cpp b/tests/standalone/Math/Matrix.cpp similarity index 99% rename from tests/standalone/Matrix/Matrix.cpp rename to tests/standalone/Math/Matrix.cpp index 829c7d3..f18f3a5 100644 --- a/tests/standalone/Matrix/Matrix.cpp +++ b/tests/standalone/Math/Matrix.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Numeric/Numeric.cpp b/tests/standalone/Math/Numeric.cpp similarity index 99% rename from tests/standalone/Numeric/Numeric.cpp rename to tests/standalone/Math/Numeric.cpp index 64616c0..3f777a8 100644 --- a/tests/standalone/Numeric/Numeric.cpp +++ b/tests/standalone/Math/Numeric.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Random/Random.cpp b/tests/standalone/Math/Random.cpp similarity index 99% rename from tests/standalone/Random/Random.cpp rename to tests/standalone/Math/Random.cpp index 86db1b2..6328719 100644 --- a/tests/standalone/Random/Random.cpp +++ b/tests/standalone/Math/Random.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/FileSystem/Path.cpp b/tests/standalone/System/Path.cpp similarity index 97% rename from tests/standalone/FileSystem/Path.cpp rename to tests/standalone/System/Path.cpp index e06e160..4134bc2 100644 --- a/tests/standalone/FileSystem/Path.cpp +++ b/tests/standalone/System/Path.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/tests/standalone/Process/Process.cpp b/tests/standalone/System/Process.cpp similarity index 98% rename from tests/standalone/Process/Process.cpp rename to tests/standalone/System/Process.cpp index 05ae0de..919f902 100644 --- a/tests/standalone/Process/Process.cpp +++ b/tests/standalone/System/Process.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/FileSystem/Query.cpp b/tests/standalone/System/Query.cpp similarity index 97% rename from tests/standalone/FileSystem/Query.cpp rename to tests/standalone/System/Query.cpp index 2db9dc6..909152c 100644 --- a/tests/standalone/FileSystem/Query.cpp +++ b/tests/standalone/System/Query.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include #include diff --git a/tests/standalone/FileSystem/TempDir.cpp b/tests/standalone/System/TempDir.cpp similarity index 98% rename from tests/standalone/FileSystem/TempDir.cpp rename to tests/standalone/System/TempDir.cpp index ba55b4e..a70d8b9 100644 --- a/tests/standalone/FileSystem/TempDir.cpp +++ b/tests/standalone/System/TempDir.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Diff/Diff.cpp b/tests/standalone/Text/Diff.cpp similarity index 99% rename from tests/standalone/Diff/Diff.cpp rename to tests/standalone/Text/Diff.cpp index 895fdef..022c658 100644 --- a/tests/standalone/Diff/Diff.cpp +++ b/tests/standalone/Text/Diff.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Encoding/Encoding.cpp b/tests/standalone/Text/Encoding.cpp similarity index 98% rename from tests/standalone/Encoding/Encoding.cpp rename to tests/standalone/Text/Encoding.cpp index 5af8b34..3bc6a21 100644 --- a/tests/standalone/Encoding/Encoding.cpp +++ b/tests/standalone/Text/Encoding.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/tests/standalone/Format/Format.cpp b/tests/standalone/Text/Format.cpp similarity index 99% rename from tests/standalone/Format/Format.cpp rename to tests/standalone/Text/Format.cpp index 766f671..b557433 100644 --- a/tests/standalone/Format/Format.cpp +++ b/tests/standalone/Text/Format.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Semver/Semver.cpp b/tests/standalone/Text/Semver.cpp similarity index 99% rename from tests/standalone/Semver/Semver.cpp rename to tests/standalone/Text/Semver.cpp index 0327092..b445d14 100644 --- a/tests/standalone/Semver/Semver.cpp +++ b/tests/standalone/Text/Semver.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Str/Str.cpp b/tests/standalone/Text/Str.cpp similarity index 99% rename from tests/standalone/Str/Str.cpp rename to tests/standalone/Text/Str.cpp index 4311341..bbe75fc 100644 --- a/tests/standalone/Str/Str.cpp +++ b/tests/standalone/Text/Str.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Tokenizer/Tokenizer.cpp b/tests/standalone/Text/Tokenizer.cpp similarity index 99% rename from tests/standalone/Tokenizer/Tokenizer.cpp rename to tests/standalone/Text/Tokenizer.cpp index f49409f..790023e 100644 --- a/tests/standalone/Tokenizer/Tokenizer.cpp +++ b/tests/standalone/Text/Tokenizer.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/standalone/Bench/Bench.cpp b/tests/standalone/Time/Bench.cpp similarity index 99% rename from tests/standalone/Bench/Bench.cpp rename to tests/standalone/Time/Bench.cpp index d602b89..867d771 100644 --- a/tests/standalone/Bench/Bench.cpp +++ b/tests/standalone/Time/Bench.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include