18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-02 06:12:41 +01:00

test(editor): a mistyped track fails the self-test, indented comments are skipped, case 7b checks the switch got bent

- A blank line or an indented `#` comment in a script is no longer a command no group takes.
- `trackcant`, `routegauge` and `tracksetdelete` with a track that isn't there count as a failed expectation.
- `expect shaped <switch> <yes|no>`: 7b checks that the gizmo drag bent the switch out of its record before deleting it.
- The ramp-length loop of test_alignment counts in an integer (Sonar S2193).
This commit is contained in:
maj00r
2026-11-24 18:34:25 +01:00
parent fd5bdd7ce4
commit 65e4870318
7 changed files with 59 additions and 6 deletions
+2 -1
View File
@@ -1180,7 +1180,8 @@ TEST_CASE("alignment: the cant ramp the norms ask for, which a track laid on fro
CHECK(alignment::cant_ramp_length(100.0, 120.0, gentle) == doctest::Approx(100.0));
// the ramp is never shorter at a higher speed
double previous{0.0};
for (double speed = 20.0; speed <= 200.0; speed += 10.0) {
for (int step{0}; step <= 18; ++step) {
auto const speed{20.0 + 10.0 * step};
auto const length{alignment::cant_ramp_length(speed, 80.0, norms)};
CHECK(length >= previous);
previous = length;