mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-12 00:58:12 +01:00
Black box: older recordings read as before, single vehicles told apart, each platform end its own tolerance
- A light pattern asked for in a recording made before the lamps were written is checked as the signal it shows, as before. - Whether the couplings were written is told by the format (the movement in the cab samples), not by there being any: a recording where every train is a single vehicle has none, and the user going over to another vehicle left the timetable shown. - The 2 m a train may stand off the platform is at each end, not for both together.
This commit is contained in:
@@ -47,6 +47,15 @@ public class PlatformTests
|
||||
Assert.Equal(1, stop.OffPlatform, 1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Each_end_has_its_own_tolerance()
|
||||
{
|
||||
// the head 1.5 m past the stop point, the tail 1.5 m past the platform's end
|
||||
var stop = Stop(-1.5f, 204f, 201);
|
||||
Assert.True(stop.OnPlatform);
|
||||
Assert.Equal(3, stop.OffPlatform, 1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void A_train_within_the_platform_is_along_it()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user