From 6872e81644546a9ccd0e1420c3ef64a26358f78a Mon Sep 17 00:00:00 2001 From: aur-build Date: Mon, 23 Nov 2026 13:56:40 +0000 Subject: tests: the ratchet says what the code says now MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The architecture test's own essays were the largest block of prose left in the tree, and the test-file headers were notes about which tests moved into `src/` — history the file no longer needs. Removing those mentions moved two measured numbers, and the ratchet was right to complain. `db.Writer` now sits in the allowlist with the compiler fact that keeps it `pub` — narrowing it makes every call site say `type db::Writer is private` — and the counts that got smaller are written back at the smaller value, as the ratchet demands. --- tests/versions.rs | 8 -------- 1 file changed, 8 deletions(-) (limited to 'tests/versions.rs') diff --git a/tests/versions.rs b/tests/versions.rs index a7b41f8..b111e61 100644 --- a/tests/versions.rs +++ b/tests/versions.rs @@ -8,12 +8,6 @@ use aur_build::pkgver; use aur_build::review::{candidates, diff}; use common::*; -// What remains here is what a unit test cannot be: both tests build a real -// package, publish it, and then move its upstream, so they need the fixture -// harness and a database. The pure comparison vectors, the chunk rule, the -// epoch rules and the dependency grammar all moved into src/pkgver/mod.rs, -// where they are unit tests of the module rather than consumers of it. - #[test] fn a_downgrade_in_the_aur_is_flagged_not_silently_served() { let (env, fx) = env_with_fixture("plain-make"); @@ -49,8 +43,6 @@ fn an_epoch_bump_is_an_upgrade_even_though_the_version_went_down() { assert!(!version.body.contains("DOWNGRADE"), "an epoch bump must not read as a downgrade: {:?}", version.body); } -// --- helpers ------------------------------------------------------------- - fn publish(env: &Env, name: &str) { let c = detect_raw(env, name); let dd = diff::render_and_store(&env.db, &env.cfg, &c).unwrap(); -- cgit v1.2.3