validateHostPlan function
Implementation
void validateHostPlan(
EnsembleTestExecutionPlan plan,
ApplicationTestDriver driver,
) {
for (final definition in plan.ordered) {
final test = definition.testCase;
if (test.hasStartScreen && driver is! ScreenLaunchApplicationTestDriver) {
throw EnsembleTestFailure(
'Host test "${test.id}" must not define startScreen; launch state is '
'owned by ApplicationTestDriver.',
);
}
if (test.session != null && driver is! ApplicationCheckpointDriver) {
throw EnsembleTestFailure(
'Host test "${test.id}" uses session but its driver does not implement '
'ApplicationCheckpointDriver.',
);
}
}
}