ebenen_spec: Quelltexte per include_str! statt ueber CARGO_MANIFEST_DIR (Waechter laeuft auch im kopierten Mac-Bauordner)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0a08894258
commit
4638f272e5
@@ -22,9 +22,46 @@ const SICHERUNG: [&str; 3] = ["endstrecke", "allin_probe", "vorflop_jamprobe_poo
|
||||
/// Heutige Vermischungen (Basis-Modul -> Ausbeute-Modul), abzubauen beim Umbau (ENTWURF-basis-ausbeute.md, Schritt 5).
|
||||
const ALTLASTEN: [(&str, &str); 3] = [("nachrechnen", "antwortkurve"), ("nachrechnen", "spieler_linie"), ("nachrechnen", "temperatur_gpu")];
|
||||
|
||||
/// Quelltexte zur Uebersetzungszeit eingebunden (include_str!): der Waechter haengt nicht am Arbeitsbaum und laeuft auch in kopierten
|
||||
/// Bauordnern (Mac-Bau fremd/motor-mac/bauen.sh). Ein Modul, das in eine Liste kommt, muss hier stehen, sonst schlaegt der Test fehl.
|
||||
const QUELLTEXTE: [(&str, &str); 33] = [
|
||||
("ebene_basis", include_str!("ebene_basis.rs")),
|
||||
("nachrechnen", include_str!("nachrechnen.rs")),
|
||||
("flop_exakt", include_str!("flop_exakt.rs")),
|
||||
("flopbib", include_str!("flopbib.rs")),
|
||||
("flopbib_nach", include_str!("flopbib_nach.rs")),
|
||||
("spiel", include_str!("spiel.rs")),
|
||||
("lernen", include_str!("lernen.rs")),
|
||||
("karten", include_str!("karten.rs")),
|
||||
("klassen", include_str!("klassen.rs")),
|
||||
("wert", include_str!("wert.rs")),
|
||||
("rake", include_str!("rake.rs")),
|
||||
("bedarf", include_str!("bedarf.rs")),
|
||||
("vorflop_jamprobe", include_str!("vorflop_jamprobe.rs")),
|
||||
("river_perzentil", include_str!("river_perzentil.rs")),
|
||||
("boden", include_str!("boden.rs")),
|
||||
("ebene_ausbeute", include_str!("ebene_ausbeute.rs")),
|
||||
("temperatur", include_str!("temperatur.rs")),
|
||||
("temperatur_gpu", include_str!("temperatur_gpu.rs")),
|
||||
("einstufig", include_str!("einstufig.rs")),
|
||||
("bayes_river", include_str!("bayes_river.rs")),
|
||||
("antwortkurve", include_str!("antwortkurve.rs")),
|
||||
("antwortkurve_schluessel", include_str!("antwortkurve_schluessel.rs")),
|
||||
("ausbeute_feld", include_str!("ausbeute_feld.rs")),
|
||||
("profil_merkmale", include_str!("profil_merkmale.rs")),
|
||||
("linie_merkmale", include_str!("linie_merkmale.rs")),
|
||||
("speicher", include_str!("speicher.rs")),
|
||||
("s2_anker", include_str!("s2_anker.rs")),
|
||||
("spieler_linie", include_str!("spieler_linie.rs")),
|
||||
("pool_unsere", include_str!("pool_unsere.rs")),
|
||||
("endstrecke", include_str!("endstrecke.rs")),
|
||||
("allin_probe", include_str!("allin_probe.rs")),
|
||||
("vorflop_jamprobe_pool", include_str!("vorflop_jamprobe_pool.rs")),
|
||||
("main", include_str!("main.rs")),
|
||||
];
|
||||
|
||||
fn quelltext(modul: &str) -> String {
|
||||
let pfad = format!("{}/src/{modul}.rs", env!("CARGO_MANIFEST_DIR"));
|
||||
std::fs::read_to_string(&pfad).unwrap_or_else(|e| panic!("{pfad}: {e}"))
|
||||
QUELLTEXTE.iter().find(|(m, _)| *m == modul).map(|(_, q)| q.to_string()).unwrap_or_else(|| panic!("{modul} fehlt in QUELLTEXTE"))
|
||||
}
|
||||
|
||||
fn verletzungen() -> Vec<(&'static str, &'static str)> {
|
||||
|
||||
Reference in New Issue
Block a user