diff --git a/validation/app.js b/validation/app.js index b9ae9a5..a4cf8a8 100644 --- a/validation/app.js +++ b/validation/app.js @@ -252,6 +252,14 @@ function validateTOML(path) { validateNotEmpty(testcase, "gpu"); validateNotEmpty(testcase, "os"); }); + + // Validate dates are properly ordered + section.reduce(function(previousValue, currentValue) { + if (typeof previousValue === "undefined" || previousValue.date <= currentValue.date) { + return currentValue; + } + validationError("Test case dates are not properly sorted in ascending order."); + }); } /* else { validationError("No testcases.")