fix: correct EM observation UI entry

This commit is contained in:
梁薄云
2026-08-04 17:02:08 +08:00
parent 417f8ca9ea
commit d0e673b573
2 changed files with 18 additions and 1 deletions
@@ -18,6 +18,7 @@ internal static class TrajectoryObservationChecks
{
VerifiesObservationSourceHasNoActuatorCalls();
VerifiesObservationSourceUsesRequiredOperatorText();
VerifiesOperatorDocumentationUsesExactUiEntry();
VerifiesStartGoalBoundsUseOnlyConfiguredPadding();
RejectsObstacleOutsideConfiguredBounds();
VerifiesLsAndStUsePublishedTrajectoryData();
@@ -64,6 +65,22 @@ internal static class TrajectoryObservationChecks
"observation MovementTest uses required gear-switch notice");
}
private static void VerifiesOperatorDocumentationUsesExactUiEntry()
{
string sourceDirectory = Path.Combine(Directory.GetCurrentDirectory(), "ClumsyPilot",
"ParkrobTrajplanner", "tarjplanner_movementtest");
string movementTestSource = Path.Combine(sourceDirectory, "MovementTest.TrajectoryObservationTest.cs");
string readmePath = Path.Combine(sourceDirectory, "README.md");
string movementTestText = new UTF8Encoding(false, true).GetString(File.ReadAllBytes(movementTestSource));
string readmeText = new UTF8Encoding(false, true).GetString(File.ReadAllBytes(readmePath));
const string uiEntry = "EM轨迹规划观察闭环测试";
Verification.True(movementTestText.Contains("[MovementTest(name = \"" + uiEntry + "\")]"),
"observation MovementTest has the exact UI entry");
Verification.True(readmeText.Contains(uiEntry),
"observation README has the exact UI entry");
}
private static void VerifiesStartGoalBoundsUseOnlyConfiguredPadding()
{
var settings = new TrajectoryObservationSettings