yams/tests/unit/core
Trevon c248863b76
fix(core): correct feature-test detection in cpp23_features.hpp (#278)
- Include <version> before testing __cpp_lib_* macros. Without it every
  library gate read 0 in a file that included this header first (verified
  with Apple Clang 21 and GCC 16 at -std=c++23).
- Detect [[likely]]/[[unlikely]] with __has_cpp_attribute. __cpp_attributes
  is 200809L on every compiler, so YAMS_HAS_LIKELY_UNLIKELY was always 0.
- YAMS_HAS_REFLECTION now requires __cpp_impl_reflection and
  __cpp_lib_reflection >= 202506L (P2996R13). __cpp_reflection is not a
  standard macro.
- Remove YAMS_HAS_PROFILES and YAMS_PROFILE. __cpp_profiles does not
  exist and C++26 did not adopt Profiles; nothing outside the test used it.
- YAMS_CPP_VERSION reads _MSVC_LANG when defined.
- get_feature_summary() reports the language mode instead of tying
  "C++23" to constexpr vector/string, which are C++20 features.
- Correct the per-gate toolchain notes (flat_map: libstdc++ 15 / libc++ 20 /
  MSVC 19.51; move_only_function: not in libc++; expected: Clang 18 with
  libstdc++ reports 0) and drop the std::expected migration guidance:
  Result<T> stays.

Tests: core_cpp23_features checks each gate against the compiler's own
feature-test macros with the header included first. New
core_cpp23_features_fallback forces every gate to 0 so the fallback paths,
including the magic_numbers runtime path, compile in every lane.
YAMS_CONSTEXPR_IF_SUPPORTED's inline fallback was invalid on a lambda; the
tests now use it on a function.

Signed-off-by: trvon <me@trevon.dev>
2026-10-08 14:30:27 -06:00
..
assert_catch2_test.cpp refactor: simplify runtime paths and harden retrieval (#61) 2026-07-31 14:16:45 -04:00
checked_arithmetic_catch2_test.cpp fix(build): restore MSVC and Apple libc++ portability 2026-07-31 16:40:15 -04:00
cpp23_features_fallback_test.cpp fix(core): correct feature-test detection in cpp23_features.hpp (#278) 2026-10-08 14:30:27 -06:00
cpp23_features_test.cpp fix(core): correct feature-test detection in cpp23_features.hpp (#278) 2026-10-08 14:30:27 -06:00
magic_numbers_test.cpp Sync experimental into main: Search retrieval improvements (#60) 2026-07-24 19:00:22 -04:00
uuid_test.cpp test improvements and bug fixes in parser, scaling logic, and mcp tools 2026-02-04 14:42:28 -05:00