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:
@@ -37,11 +37,11 @@ static_assert(bcd_round_trips());
|
||||
static_assert(hours_from_reg(to_bcd(0)) == 0); // 24-hour midnight
|
||||
static_assert(hours_from_reg(to_bcd(13)) == 13); // 24-hour afternoon
|
||||
static_assert(hours_from_reg(to_bcd(23)) == 23);
|
||||
static_assert(hours_from_reg(0x40 | to_bcd(12)) == 0); // 12 AM
|
||||
static_assert(hours_from_reg(0x40 | 0x20 | to_bcd(12)) == 12); // 12 PM
|
||||
static_assert(hours_from_reg(0x40 | to_bcd(1)) == 1); // 1 AM
|
||||
static_assert(hours_from_reg(0x40 | 0x20 | to_bcd(1)) == 13); // 1 PM
|
||||
static_assert(hours_from_reg(0x40 | 0x20 | to_bcd(11)) == 23); // 11 PM
|
||||
static_assert(hours_from_reg(0x40 | to_bcd(12)) == 0); // 12 AM
|
||||
static_assert(hours_from_reg(0x40 | 0x20 | to_bcd(12)) == 12); // 12 PM
|
||||
static_assert(hours_from_reg(0x40 | to_bcd(1)) == 1); // 1 AM
|
||||
static_assert(hours_from_reg(0x40 | 0x20 | to_bcd(1)) == 13); // 1 PM
|
||||
static_assert(hours_from_reg(0x40 | 0x20 | to_bcd(11)) == 23); // 11 PM
|
||||
|
||||
// Sakamoto's method, against dates a calendar can be checked against rather
|
||||
// than against this implementation run twice. Sunday is 1.
|
||||
|
||||
Reference in New Issue
Block a user