Add test case order validation (#156)
* Add test case order validation * Update variable names * Change validation error phrasing * Fix misplaced code * Change to ascending order * Apply requested changes
This commit is contained in:
parent
bceef4a577
commit
7f77a774f5
|
@ -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.")
|
||||
|
|
Reference in New Issue