test: the format and ASCII rules stop being a habit, and the stated sizes stop drifting
libavr's guidance binds this repo too, and until now nothing here checked it - `ctest` runs `libavr_format_test()` over this tree's own sources now (rules 11 and 33), skipping rather than passing where clang-format is absent. It caught drift on its first run: a file written this week and edited after formatting. Where the README states a measured size, `libavr_size_claim_test()` holds it to the image and holds the image to the prose: advancing the library pin moved three of these across the fleet with nothing saying so, and re-recording one now requires the sentence that quotes it to move too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ if(NOT EXISTS ${LIBAVR_ROOT}/CMakeLists.txt)
|
||||
message(FATAL_ERROR "libavr not found at ${LIBAVR_ROOT} - run: git submodule update --init libavr")
|
||||
endif()
|
||||
add_subdirectory(${LIBAVR_ROOT} libavr-build)
|
||||
include(${LIBAVR_ROOT}/cmake/checks.cmake)
|
||||
|
||||
add_executable(fantemp src/main.cpp)
|
||||
target_link_libraries(fantemp PRIVATE libavr)
|
||||
|
||||
2
libavr
2
libavr
Submodule libavr updated: 99434fb29a...1412b7173b
@@ -1,3 +1,5 @@
|
||||
libavr_format_test()
|
||||
|
||||
# The battery is a compile: a static_assert that fails is the failure. It is a
|
||||
# target rather than only a ctest so a plain build catches a regression too.
|
||||
add_library(consteval_tests OBJECT consteval.cpp)
|
||||
|
||||
@@ -58,9 +58,9 @@ static_assert(curve_rises());
|
||||
// definition puts that count at the nominal temperature.
|
||||
using app::thermistor::detail::quarters_entry;
|
||||
|
||||
inline constexpr std::int32_t nominal_count = static_cast<std::int32_t>(
|
||||
app::thermistor::adc_full_scale * app::thermistor::nominal_resistance /
|
||||
(app::thermistor::series_resistor + app::thermistor::nominal_resistance));
|
||||
inline constexpr std::int32_t nominal_count =
|
||||
static_cast<std::int32_t>(app::thermistor::adc_full_scale * app::thermistor::nominal_resistance /
|
||||
(app::thermistor::series_resistor + app::thermistor::nominal_resistance));
|
||||
static_assert(quarters_entry(nominal_count / 4) >= 100); // 25.00 C, in quarters
|
||||
static_assert(quarters_entry(nominal_count / 4 + 1) < 100); // and the step below it
|
||||
|
||||
|
||||
Reference in New Issue
Block a user