Allow testing trivial stacks with no engine events
@@ -1587,6 +1587,7 @@ func (pt *ProgramTester) performExtraRuntimeValidation(
}
defer contract.IgnoreClose(eventsFile)
decoder, events := json.NewDecoder(eventsFile), []apitype.EngineEvent{}
+ if len(events) > 0 {
for {
var event apitype.EngineEvent
if err = decoder.Decode(&event); err != nil {
@@ -1597,6 +1598,7 @@ func (pt *ProgramTester) performExtraRuntimeValidation(
}
events = append(events, event)
}
+ }
// Populate stack info object with all of this data to pass to the validation function
stackInfo := RuntimeValidationStackInfo{
