1
0
Fork 0

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:
BynariStar 2017-11-13 01:19:30 +02:00 committed by Flame Sage
parent bceef4a577
commit 7f77a774f5
1 changed files with 8 additions and 0 deletions

View File

@ -252,6 +252,14 @@ function validateTOML(path) {
validateNotEmpty(testcase, "gpu"); validateNotEmpty(testcase, "gpu");
validateNotEmpty(testcase, "os"); 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 { /* else {
validationError("No testcases.") validationError("No testcases.")