mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
feat: Move ID tests into their own crate with a CLI (#177)
* fix: ID tests not in correct directory * refactor: Move game-id test logic into its own crate * id-tests: Add CLI that reads JSON input * id-tests: Update crate docs * Remove node ID test * id-tests: Don't try to parse unneeded info * id-tests: Enable cli feature by default
This commit is contained in:
parent
88bf996a5e
commit
b248a7661e
7 changed files with 144 additions and 113 deletions
|
|
@ -38,8 +38,7 @@ phf = { version = "0.11", optional = true, features = ["macros"] }
|
|||
clap = { version = "4.1.11", optional = true, features = ["derive"] }
|
||||
|
||||
[dev-dependencies]
|
||||
number_to_words = "0.1"
|
||||
roman_numeral = "0.1"
|
||||
gamedig-id-tests = { path = "../id-tests", no-default-features = true }
|
||||
|
||||
# Examples
|
||||
[[example]]
|
||||
|
|
|
|||
11
crates/lib/tests/game_ids.rs
Normal file
11
crates/lib/tests/game_ids.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#![cfg(all(test, feature = "game_defs"))]
|
||||
|
||||
use gamedig::GAMES;
|
||||
|
||||
use gamedig_id_tests::test_game_name_rules;
|
||||
|
||||
#[test]
|
||||
fn check_definitions_match_name_rules() {
|
||||
let wrong = test_game_name_rules(GAMES.entries().map(|(id, game)| (id.to_owned(), game.name)));
|
||||
assert!(wrong.is_empty());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue