feat: Basiswert-Schaetzung im Pruefdialog
- ValidationReport summiert Base Values und zaehlt gewertete sowie nicht gewertete Elemente - Wertungsliste pro Element inkl. nicht gewerteter Freitext-Codes - Dialog zeigt Basiswert, Zaehler, Caveat und Wertungsliste - 63 Validierungs- und 262 Whiteboard-Assertions (930 gesamt) - Doku, Findings und Roadmap aktualisiert
This commit is contained in:
parent
15f7eab9cf
commit
334603c810
9 changed files with 230 additions and 9 deletions
|
|
@ -3,8 +3,8 @@
|
||||||
Stand: 2026-10-31
|
Stand: 2026-10-31
|
||||||
Grundlage: `rinkplanner/rinkplanner_definition_agent_guidelines.md`
|
Grundlage: `rinkplanner/rinkplanner_definition_agent_guidelines.md`
|
||||||
Übergeordnete Reihenfolge: `docs/roadmap.md`
|
Übergeordnete Reihenfolge: `docs/roadmap.md`
|
||||||
Letzte Session: `docs/findings-2026-10-31-level-aus-features.md`
|
Letzte Session: `docs/findings-2026-10-31-basiswert.md`
|
||||||
(Session davor: `docs/findings-2026-10-31-kuerzelauswahl.md`)
|
(Session davor: `docs/findings-2026-10-31-level-aus-features.md`)
|
||||||
|
|
||||||
## 1. Leitentscheidung
|
## 1. Leitentscheidung
|
||||||
|
|
||||||
|
|
@ -66,7 +66,7 @@ Implementiert in `rinkplanner/src/core/rules/`:
|
||||||
| `ElementLevelRules` | saisonale Feature-Sätze, Pflichtfeatures und Level-Berechnung |
|
| `ElementLevelRules` | saisonale Feature-Sätze, Pflichtfeatures und Level-Berechnung |
|
||||||
| `RoutineValidator` | prüft Elementdaten gegen Katalog und Level-Regeln |
|
| `RoutineValidator` | prüft Elementdaten gegen Katalog und Level-Regeln |
|
||||||
| `ValidationIssue` | Befund mit Schweregrad, Meldung und Abschnitts-/Segmentbezug |
|
| `ValidationIssue` | Befund mit Schweregrad, Meldung und Abschnitts-/Segmentbezug |
|
||||||
| `ValidationReport` | Befunde, Element-/Abschnittszahl und Prüfstatistik |
|
| `ValidationReport` | Befunde, Prüfstatistik und Basiswert-Schätzung |
|
||||||
| `ValidationCheck` | eine Prüfkategorie mit geprüft/bestanden/Befunden |
|
| `ValidationCheck` | eine Prüfkategorie mit geprüft/bestanden/Befunden |
|
||||||
|
|
||||||
### Entscheidungen
|
### Entscheidungen
|
||||||
|
|
@ -138,7 +138,10 @@ meldet dort weiterhin Abweichungen.
|
||||||
liefert `ValidationIssue`-Objekte mit Schweregrad (Fehler/Warnung), Meldung
|
liefert `ValidationIssue`-Objekte mit Schweregrad (Fehler/Warnung), Meldung
|
||||||
und Abschnitts-/Segmentbezug. `validate_report()` ergänzt eine Prüfstatistik:
|
und Abschnitts-/Segmentbezug. `validate_report()` ergänzt eine Prüfstatistik:
|
||||||
Element- und Abschnittszahl sowie pro Kategorie, wie viele Fälle geprüft und
|
Element- und Abschnittszahl sowie pro Kategorie, wie viele Fälle geprüft und
|
||||||
bestanden wurden. Die Prüfung ist bewusst getrennt von `Routine.validate()`:
|
bestanden wurden. Zusätzlich summiert der Report die Base Values aller
|
||||||
|
Elemente mit gültigem Katalogwert und führt eine Wertungsliste; das ist eine
|
||||||
|
bewusste Schätzung ohne GOE, 1,1-Faktor, Programmkomponenten und Abzüge.
|
||||||
|
Die Prüfung ist bewusst getrennt von `Routine.validate()`:
|
||||||
Das Modell prüft Struktur und Pfade, der Validator prüft fachliche
|
Das Modell prüft Struktur und Pfade, der Validator prüft fachliche
|
||||||
Elementdaten. Die Oberfläche zeigt die Prüfliste und die Befunde in einem
|
Elementdaten. Die Oberfläche zeigt die Prüfliste und die Befunde in einem
|
||||||
Dialog; sie blockiert Speichern oder Export nicht. Noch nicht abgedeckt sind
|
Dialog; sie blockiert Speichern oder Export nicht. Noch nicht abgedeckt sind
|
||||||
|
|
@ -362,13 +365,13 @@ Aktueller Stand:
|
||||||
schwierige Variationen, Level-4-Voraussetzungen, Pflichtfeatures bei
|
schwierige Variationen, Level-4-Voraussetzungen, Pflichtfeatures bei
|
||||||
Schrittsequenzen, feste Level (`ChSq`), Feature-Validierung und die
|
Schrittsequenzen, feste Level (`ChSq`), Feature-Validierung und die
|
||||||
Speicherung am Segment.
|
Speicherung am Segment.
|
||||||
- **Validierung:** 54 Assertions für unbekannte Kürzel, Typ-Mismatches,
|
- **Validierung:** 63 Assertions für unbekannte Kürzel, Typ-Mismatches,
|
||||||
nicht verfügbare Level, Sprung-/ChSq-Sonderfälle, Feature-Fehler,
|
nicht verfügbare Level, Sprung-/ChSq-Sonderfälle, Feature-Fehler,
|
||||||
Pflichtfeatures, Level-Abweichungen, programmweite Einmal-Features und die
|
Pflichtfeatures, Level-Abweichungen, programmweite Einmal-Features, die
|
||||||
Prüfstatistik je Kategorie.
|
Prüfstatistik je Kategorie und die Basiswert-Summe.
|
||||||
- **Canvas:** 90 Assertions für Meter→Pixel-Mapping, Fit/Zoom/Pan,
|
- **Canvas:** 90 Assertions für Meter→Pixel-Mapping, Fit/Zoom/Pan,
|
||||||
Rink-Kontur und die reine Bogen-Geometrie.
|
Rink-Kontur und die reine Bogen-Geometrie.
|
||||||
- **Whiteboard:** 259 Assertions für Controller-Verdrahtung, Segmenterzeugung,
|
- **Whiteboard:** 262 Assertions für Controller-Verdrahtung, Segmenterzeugung,
|
||||||
Linien-/Bogenpfade, Klemmen an der Bande, Auswahl, Griff- und
|
Linien-/Bogenpfade, Klemmen an der Bande, Auswahl, Griff- und
|
||||||
Richtungs-/Kanten-Bearbeitung, Segmentlöschung, Element-Marker (Setzen,
|
Richtungs-/Kanten-Bearbeitung, Segmentlöschung, Element-Marker (Setzen,
|
||||||
Typwechsel, Inspector inkl. Kürzelauswahl, Standzeit, Base-Value- und
|
Typwechsel, Inspector inkl. Kürzelauswahl, Standzeit, Base-Value- und
|
||||||
|
|
|
||||||
96
docs/findings-2026-10-31-basiswert.md
Normal file
96
docs/findings-2026-10-31-basiswert.md
Normal file
|
|
@ -0,0 +1,96 @@
|
||||||
|
# Findings – Session: Basiswert im Prüfdialog (2026-10-31)
|
||||||
|
|
||||||
|
Ergänzung zu `docs/findings-2026-10-31-level-aus-features.md`.
|
||||||
|
Der Prüfdialog zeigt jetzt eine ungefähre Punktzahl der Kür: die Summe der
|
||||||
|
Base Values aller Elemente mit gültigem Katalogwert.
|
||||||
|
|
||||||
|
## Ergebnis
|
||||||
|
|
||||||
|
| Ziel | Ergebnis |
|
||||||
|
| :--- | :--- |
|
||||||
|
| Basiswert | Summe der Base Values aus Katalog und Level |
|
||||||
|
| Wertungsliste | pro Element `Label — Wert`, nicht gewertete als `—` |
|
||||||
|
| Zähler | gewertete und nicht gewertete Elemente |
|
||||||
|
| Ort | Prüfdialog, oberhalb der Prüfliste |
|
||||||
|
| Tests | 930 Assertions gesamt, `./tools/test.sh` grün |
|
||||||
|
|
||||||
|
## Berechnung
|
||||||
|
|
||||||
|
`RoutineValidator.validate_report()` summiert für jedes Elementsegment:
|
||||||
|
|
||||||
|
```text
|
||||||
|
value = ElementCatalog.get_segment_base_value(segment)
|
||||||
|
value >= 0 → Summe und gewertetes Element
|
||||||
|
value < 0 → nicht gewertetes Element (Freitext, unbekanntes Level, …)
|
||||||
|
```
|
||||||
|
|
||||||
|
Der Report enthält dafür:
|
||||||
|
|
||||||
|
- `base_value_total`
|
||||||
|
- `scored_elements`
|
||||||
|
- `unscored_elements`
|
||||||
|
- `element_values` (Abschnitt, Segment, Label, Wert)
|
||||||
|
|
||||||
|
Beispiele:
|
||||||
|
|
||||||
|
| Element | Wert |
|
||||||
|
| :--- | :--- |
|
||||||
|
| `3Lz` | 5,90 |
|
||||||
|
| `CCoSp L4` | 3,50 |
|
||||||
|
| `StSq L2` | 2,60 |
|
||||||
|
| `ChSq` | 3,00 |
|
||||||
|
| `ChStSq` | — (nicht im Katalog) |
|
||||||
|
|
||||||
|
## Oberfläche
|
||||||
|
|
||||||
|
Der Prüfdialog zeigt nach dem Kopf:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Basiswert: 9,10
|
||||||
|
3 von 4 Elementen gewertet · 1 ohne Base Value
|
||||||
|
Nur Base Values: ohne GOE, 1,1-Faktor, Komponenten und Abzüge.
|
||||||
|
|
||||||
|
Wertung
|
||||||
|
3Lz — 5,90
|
||||||
|
CCoSp — 1,70
|
||||||
|
ChStSq L2 — —
|
||||||
|
StSq — 1,50
|
||||||
|
```
|
||||||
|
|
||||||
|
Danach folgen wie bisher Prüfliste und Befunde. Die Wertungsliste macht die
|
||||||
|
Summe nachvollziehbar; nicht gewertete Elemente bleiben mit `—` sichtbar.
|
||||||
|
|
||||||
|
## Bewusste Grenzen
|
||||||
|
|
||||||
|
1. **Keine GOE:** Es wird nur der Base Value summiert, keine
|
||||||
|
Ausführungsqualität.
|
||||||
|
2. **Kein 1,1-Faktor:** Die zweite Programmhälfte wird nicht besonders
|
||||||
|
gewichtet.
|
||||||
|
3. **Keine Programmkomponenten:** PCS und Faktoren fehlen.
|
||||||
|
4. **Keine Abzüge:** Stürze, Zeitüberschreitungen usw. werden nicht
|
||||||
|
berücksichtigt.
|
||||||
|
5. **Keine Kombinationen:** Freitext- und Kombinationselemente ohne
|
||||||
|
Katalogwert werden nicht gewertet.
|
||||||
|
6. **Kein Programmtyp:** Kurzprogramm/Kür und Adult-Regeln sind nicht
|
||||||
|
modelliert.
|
||||||
|
|
||||||
|
Der Wert ist damit ein **technischer Basiswert**, keine vorhergesagte
|
||||||
|
Gesamtpunktzahl.
|
||||||
|
|
||||||
|
## Tests
|
||||||
|
|
||||||
|
- **Validierung:** 63 Assertions (vorher 54), u. a. Summe 7,40 aus
|
||||||
|
`CCoSp L4` + `StSq L4`, `3Lz` 5,90, `ChSq` 3,00, unbekannter Code ohne Wert.
|
||||||
|
- **Whiteboard:** 262 Assertions (vorher 259), u. a. Anzeige von Basiswert,
|
||||||
|
Zählern und Wertungsliste im Dialog.
|
||||||
|
|
||||||
|
Visuell geprüft über `tests/manual/capture_elements.gd ... validate` bei
|
||||||
|
1400 × 876: `Basiswert: 9,10`, 3 von 4 Elementen gewertet.
|
||||||
|
|
||||||
|
## Nächste mögliche Schritte
|
||||||
|
|
||||||
|
- Optionale GOE-Annahme pro Element (z. B. „+0“ oder ein Regler) für eine
|
||||||
|
grobe TES-Schätzung
|
||||||
|
- 1,1-Faktor für Sprünge in der zweiten Programmhälfte
|
||||||
|
- Programmkomponenten und Adult-Faktoren
|
||||||
|
- Kombinationen als zusammengesetzte Elemente mit eigenem Base Value
|
||||||
|
|
@ -195,7 +195,21 @@ Der Kopf nennt den Umfang (`Geprüft: 4 Elemente in 1 Abschnitt (Saison
|
||||||
|
|
||||||
Nicht anwendbare Kategorien nennen den Grund, z. B. „nicht anwendbar (kein
|
Nicht anwendbare Kategorien nennen den Grund, z. B. „nicht anwendbar (kein
|
||||||
ChSq)“ oder „nicht anwendbar (keine Features gesetzt)“. Erst danach folgen
|
ChSq)“ oder „nicht anwendbar (keine Features gesetzt)“. Erst danach folgen
|
||||||
die konkreten Befunde. Die Prüfung blockiert Speichern und Export nicht. Noch nicht geprüft werden
|
die konkreten Befunde. Die Prüfung blockiert Speichern und Export nicht.
|
||||||
|
|
||||||
|
### Punktwert
|
||||||
|
|
||||||
|
Der Prüfdialog zeigt zusätzlich eine **Basiswert-Schätzung**:
|
||||||
|
|
||||||
|
- Summe der Base Values aller Elemente mit gültigem Katalogwert
|
||||||
|
- Anzahl gewerteter und nicht gewerteter Elemente
|
||||||
|
- Wertungsliste pro Element (`CCoSp L4 — 3,50`, `ChStSq — —`)
|
||||||
|
|
||||||
|
Die Schätzung enthält **keine** GOE, keinen 1,1-Faktor für die zweite
|
||||||
|
Programmhälfte, keine Programmkomponenten und keine Abzüge. Freitext- und
|
||||||
|
Kombinationselemente ohne Katalogwert werden als nicht gewertet markiert.
|
||||||
|
Der angezeigte Wert ist damit ein technischer Basiswert, keine
|
||||||
|
Gesamtpunktzahl. Noch nicht geprüft werden
|
||||||
Programmtyp, erlaubte Elementanzahl, Wiederholungs- und Kombinationsregeln
|
Programmtyp, erlaubte Elementanzahl, Wiederholungs- und Kombinationsregeln
|
||||||
sowie die Begrenzung auf zwei Features pro Fuß.
|
sowie die Begrenzung auf zwei Features pro Fuß.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,8 @@ Voraussetzung für Phase 1.
|
||||||
`ChSq` Level 1; manueller Level nur für Freitext-Codes
|
`ChSq` Level 1; manueller Level nur für Freitext-Codes
|
||||||
- [x] Validierung von Elementen (Katalog, Level, Features, Level-Abgleich)
|
- [x] Validierung von Elementen (Katalog, Level, Features, Level-Abgleich)
|
||||||
mit Prüfdialog in der Statusleiste
|
mit Prüfdialog in der Statusleiste
|
||||||
|
- [x] Basiswert-Schätzung im Prüfdialog (Summe ohne GOE, 1,1-Faktor,
|
||||||
|
Komponenten und Abzüge)
|
||||||
- [x] Programmweite Einmal-Features (`once_per_program`) als Warnung
|
- [x] Programmweite Einmal-Features (`once_per_program`) als Warnung
|
||||||
- [ ] Max. zwei Features pro Fuß und Feature-Positionsregeln
|
- [ ] Max. zwei Features pro Fuß und Feature-Positionsregeln
|
||||||
- [ ] Kombinations-, Wiederholungs- und Programmtyp-Regeln
|
- [ ] Kombinations-, Wiederholungs- und Programmtyp-Regeln
|
||||||
|
|
|
||||||
|
|
@ -50,10 +50,35 @@ func validate_report(routine: Routine) -> ValidationReport:
|
||||||
report.element_count += 1
|
report.element_count += 1
|
||||||
_validate_segment(segment, section.section_id, report)
|
_validate_segment(segment, section.section_id, report)
|
||||||
_collect_program_features(segment, section.section_id, seen_once, report)
|
_collect_program_features(segment, section.section_id, seen_once, report)
|
||||||
|
_collect_base_value(segment, section.section_id, report)
|
||||||
|
|
||||||
return report
|
return report
|
||||||
|
|
||||||
|
|
||||||
|
func _collect_base_value(
|
||||||
|
segment: PathSegment,
|
||||||
|
section_id: String,
|
||||||
|
report: ValidationReport
|
||||||
|
) -> void:
|
||||||
|
var value := _catalog.get_segment_base_value(segment)
|
||||||
|
var label := segment.get_element_caption()
|
||||||
|
if label.is_empty():
|
||||||
|
label = PathSegment.element_type_name(segment.element_type)
|
||||||
|
report.element_values.append(
|
||||||
|
{
|
||||||
|
"section_id": section_id,
|
||||||
|
"segment_id": segment.segment_id,
|
||||||
|
"label": label,
|
||||||
|
"value": value,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if value < 0.0:
|
||||||
|
report.unscored_elements += 1
|
||||||
|
return
|
||||||
|
report.base_value_total += value
|
||||||
|
report.scored_elements += 1
|
||||||
|
|
||||||
|
|
||||||
func _validate_segment(
|
func _validate_segment(
|
||||||
segment: PathSegment,
|
segment: PathSegment,
|
||||||
section_id: String,
|
section_id: String,
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,10 @@ const CHECK_LABELS := {
|
||||||
var issues: Array[ValidationIssue] = []
|
var issues: Array[ValidationIssue] = []
|
||||||
var element_count: int = 0
|
var element_count: int = 0
|
||||||
var section_count: int = 0
|
var section_count: int = 0
|
||||||
|
var base_value_total: float = 0.0
|
||||||
|
var scored_elements: int = 0
|
||||||
|
var unscored_elements: int = 0
|
||||||
|
var element_values: Array[Dictionary] = []
|
||||||
var checks: Array[ValidationCheck] = []
|
var checks: Array[ValidationCheck] = []
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -476,6 +476,32 @@ func open_validation_dialog() -> void:
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
lines.append("")
|
lines.append("")
|
||||||
|
lines.append(
|
||||||
|
"[b]Basiswert: %s[/b]" % _format_base_value(report.base_value_total)
|
||||||
|
)
|
||||||
|
var scored_text := (
|
||||||
|
"%d von %d Elementen gewertet"
|
||||||
|
% [report.scored_elements, report.element_count]
|
||||||
|
)
|
||||||
|
if report.unscored_elements > 0:
|
||||||
|
scored_text += " · %d ohne Base Value" % report.unscored_elements
|
||||||
|
lines.append(scored_text)
|
||||||
|
lines.append(
|
||||||
|
"[color=#94a3b8]Nur Base Values: ohne GOE, 1,1-Faktor, Komponenten und Abzüge.[/color]"
|
||||||
|
)
|
||||||
|
if not report.element_values.is_empty():
|
||||||
|
lines.append("")
|
||||||
|
lines.append("[b]Wertung[/b]")
|
||||||
|
for entry: Dictionary in report.element_values:
|
||||||
|
var value: float = entry["value"]
|
||||||
|
var value_text := (
|
||||||
|
"—" if value < 0.0 else _format_base_value(value)
|
||||||
|
)
|
||||||
|
lines.append(
|
||||||
|
"%s — %s"
|
||||||
|
% [_escape_bbcode(str(entry["label"])), value_text]
|
||||||
|
)
|
||||||
|
lines.append("")
|
||||||
lines.append("[b]Prüfungen[/b]")
|
lines.append("[b]Prüfungen[/b]")
|
||||||
for check: ValidationCheck in report.checks:
|
for check: ValidationCheck in report.checks:
|
||||||
lines.append(_validation_check_line(check))
|
lines.append(_validation_check_line(check))
|
||||||
|
|
@ -611,6 +637,10 @@ static func _escape_bbcode(text: String) -> String:
|
||||||
return text.replace("[", "[lb]")
|
return text.replace("[", "[lb]")
|
||||||
|
|
||||||
|
|
||||||
|
static func _format_base_value(value: float) -> String:
|
||||||
|
return ("%.2f" % value).replace(".", ",")
|
||||||
|
|
||||||
|
|
||||||
func get_selected_element_features() -> PackedStringArray:
|
func get_selected_element_features() -> PackedStringArray:
|
||||||
var segment := get_selected_segment()
|
var segment := get_selected_segment()
|
||||||
if segment == null:
|
if segment == null:
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,17 @@ func _test_clean_routine() -> void:
|
||||||
)
|
)
|
||||||
_check(report.get_check("level_features").passed == 2, "both derived levels match")
|
_check(report.get_check("level_features").passed == 2, "both derived levels match")
|
||||||
_check(report.get_check("once").passed == 6, "once-per-program features were checked")
|
_check(report.get_check("once").passed == 6, "once-per-program features were checked")
|
||||||
|
_check_approx(
|
||||||
|
report.base_value_total,
|
||||||
|
7.40,
|
||||||
|
"the report sums the base values (3.50 + 3.90)"
|
||||||
|
)
|
||||||
|
_check(report.scored_elements == 2, "both elements were scored")
|
||||||
|
_check(report.unscored_elements == 0, "no element is unscored")
|
||||||
|
_check(
|
||||||
|
report.element_values.size() == 2,
|
||||||
|
"the report keeps one value entry per element"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
func _test_unknown_code() -> void:
|
func _test_unknown_code() -> void:
|
||||||
|
|
@ -110,6 +121,13 @@ func _test_unknown_code() -> void:
|
||||||
report.get_check("type").is_skipped(),
|
report.get_check("type").is_skipped(),
|
||||||
"the type check is skipped without a definition"
|
"the type check is skipped without a definition"
|
||||||
)
|
)
|
||||||
|
_check(report.unscored_elements == 1, "an unknown code has no base value")
|
||||||
|
_check(report.base_value_total == 0.0, "an unknown code adds no points")
|
||||||
|
_check(
|
||||||
|
report.element_values.size() == 1
|
||||||
|
and float(report.element_values[0]["value"]) < 0.0,
|
||||||
|
"the score entry marks the unknown code as unscored"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
func _test_type_mismatch() -> void:
|
func _test_type_mismatch() -> void:
|
||||||
|
|
@ -176,6 +194,11 @@ func _test_jump_level_and_features() -> void:
|
||||||
report.get_check("features").warnings == 1,
|
report.get_check("features").warnings == 1,
|
||||||
"the feature check records the jump warning"
|
"the feature check records the jump warning"
|
||||||
)
|
)
|
||||||
|
_check_approx(
|
||||||
|
report.base_value_total,
|
||||||
|
5.90,
|
||||||
|
"the jump contributes its base value despite the level warning"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
func _test_fixed_level() -> void:
|
func _test_fixed_level() -> void:
|
||||||
|
|
@ -205,6 +228,7 @@ func _test_fixed_level() -> void:
|
||||||
)
|
)
|
||||||
_check(valid.issues.is_empty(), "ChSq at Level 1 is valid")
|
_check(valid.issues.is_empty(), "ChSq at Level 1 is valid")
|
||||||
_check(valid.get_check("fixed_level").passed == 1, "the fixed-level check passes")
|
_check(valid.get_check("fixed_level").passed == 1, "the fixed-level check passes")
|
||||||
|
_check_approx(valid.base_value_total, 3.00, "ChSq contributes 3.00")
|
||||||
|
|
||||||
|
|
||||||
func _test_missing_code() -> void:
|
func _test_missing_code() -> void:
|
||||||
|
|
@ -431,6 +455,13 @@ func _check(condition: bool, message: String) -> void:
|
||||||
_failures.append(message)
|
_failures.append(message)
|
||||||
|
|
||||||
|
|
||||||
|
func _check_approx(actual: float, expected: float, message: String) -> void:
|
||||||
|
_check(
|
||||||
|
absf(actual - expected) <= 0.001,
|
||||||
|
"%s (expected %.3f, got %.3f)" % [message, expected, actual]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
func _finish() -> void:
|
func _finish() -> void:
|
||||||
if _failures.is_empty():
|
if _failures.is_empty():
|
||||||
print("PASS: %d assertions" % _assertions)
|
print("PASS: %d assertions" % _assertions)
|
||||||
|
|
|
||||||
|
|
@ -1268,6 +1268,17 @@ func _run() -> void:
|
||||||
),
|
),
|
||||||
"skipped checks explain why they do not apply"
|
"skipped checks explain why they do not apply"
|
||||||
)
|
)
|
||||||
|
_check(
|
||||||
|
controller.validation_text.text.contains("Basiswert")
|
||||||
|
and controller.validation_text.text.contains("0,00")
|
||||||
|
and controller.validation_text.text.contains("1 ohne Base Value"),
|
||||||
|
"validation dialog shows the base-value total and unscored count"
|
||||||
|
)
|
||||||
|
_check(
|
||||||
|
controller.validation_text.text.contains("Wertung")
|
||||||
|
and controller.validation_text.text.contains("3X — —"),
|
||||||
|
"the scoring breakdown marks unknown elements as unscored"
|
||||||
|
)
|
||||||
controller.validation_dialog.hide()
|
controller.validation_dialog.hide()
|
||||||
|
|
||||||
controller.new_routine()
|
controller.new_routine()
|
||||||
|
|
@ -1289,6 +1300,11 @@ func _run() -> void:
|
||||||
and controller.validation_text.text.contains("1/1"),
|
and controller.validation_text.text.contains("1/1"),
|
||||||
"clean validation lists the passed checks"
|
"clean validation lists the passed checks"
|
||||||
)
|
)
|
||||||
|
_check(
|
||||||
|
controller.validation_text.text.contains("Basiswert")
|
||||||
|
and controller.validation_text.text.contains("1,70"),
|
||||||
|
"clean validation shows the base value of a Base spin"
|
||||||
|
)
|
||||||
controller.validation_dialog.hide()
|
controller.validation_dialog.hide()
|
||||||
|
|
||||||
scene.queue_free()
|
scene.queue_free()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue