summaryrefslogtreecommitdiffstats
path: root/tests/architecture-budget.json
diff options
context:
space:
mode:
authoraur-build <aur-build@localhost>2026-11-20 20:14:27 +0000
committeraur-build <aur-build@localhost>2026-11-20 20:14:27 +0000
commit68ec6971b872d8be561e8c2c2748c6c143bfef7d (patch)
tree6d8489dbf6d05106b67770b529dc5eb3e849805e /tests/architecture-budget.json
parente6c3a02229994a9e007d8e6618add778e1ec021c (diff)
downloadaur-build-68ec6971b872d8be561e8c2c2748c6c143bfef7d.tar.gz
aur-build-68ec6971b872d8be561e8c2c2748c6c143bfef7d.zip
pkgver: move the pure version and dependency tests into the module
Ten tests in tests/versions.rs were unit tests of pkgver wearing an integration test's clothing: the comparison vectors, the chunk rule, the epoch rules, the dependency grammar, the constraint checks, the recorded oracle. None of them touched a database or a fixture. They were written against the crate's public API because that was the only way to reach them from outside, and that single fact — that a test had to import a name to exercise it — is what had been keeping five items public: vercmp_string, Dep, DepOp, Dep::satisfied_by, split_full_version All five are private now. `vercmp_string` is called by `vercmp` and by nothing else; `Dep` and `DepOp` are the internals of `dep_names`, which *is* used in production; `satisfied_by` and `Dep::name` are used only by this module's tests, so they are gated rather than merely private, and `cargo check --release` without the test-support feature compiles clean, which is the proof that nothing production needs them was left behind. The oracle test now resolves testcorpus/ through CARGO_MANIFEST_DIR rather than the harness helper, so it no longer depends on the working directory. The live pacman differential came with it and stays gated on AUR_LIVE_VERCMP, recording its absence the same way. What remains in tests/versions.rs is two tests that genuinely need the harness: they build a package, publish it, and move its upstream. pkgver: 14 pub / 5 test-only -> 8 pub / 0 test-only. Suite: 281 passed, 0 failed.
Diffstat (limited to 'tests/architecture-budget.json')
-rw-r--r--tests/architecture-budget.json18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/architecture-budget.json b/tests/architecture-budget.json
index 4df78b1..93578fb 100644
--- a/tests/architecture-budget.json
+++ b/tests/architecture-budget.json
@@ -210,15 +210,15 @@
"test": 0
},
"pkgver": {
- "dead": 5,
+ "dead": 0,
"deadonly": 0,
"glob": 0,
- "largest": 343,
+ "largest": 545,
"largest_file": "src/pkgver/mod.rs",
- "lines": 343,
+ "lines": 545,
"priv": 0,
- "pub": 14,
- "test": 5
+ "pub": 8,
+ "test": 0
},
"recipe": {
"dead": 0,
@@ -310,15 +310,15 @@
}
},
"totals": {
- "dead": 105,
+ "dead": 100,
"deadonly": 33,
"edges": 87,
"glob": 0,
"largest": 603,
"largest_file": "src/shims/mod.rs",
- "lines": 14291,
+ "lines": 14493,
"priv": 109,
- "pub": 505,
- "test": 72
+ "pub": 499,
+ "test": 67
}
}