-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Labels
testingEither unit testing or full pipeline testing for bugsEither unit testing or full pipeline testing for bugs
Milestone
Description
Description
In xASL_test_FullPipelineTest we check that when the dataset_description.json and other JSON files are compared with their reference, the GeneratedBy version information is being ignored. Right now we just check if all other fields exist. If other fields exist but are different, we would ignore this right now (we only check isempty(missingFields)). The function should compare the remaining struct fields based on the JSON files correctly.
if xASL_exist(pathA,'file') && xASL_exist(pathB,'file')
% Actual comparison
jsonA = spm_jsonread(pathA);
jsonB = spm_jsonread(pathB);
% Get fieldnames
fieldNamesA = fieldnames(jsonA);
fieldNamesB = fieldnames(jsonB);
% Check which fields are shared and which different
sharedFieldsAB = intersect(fieldNamesB,fieldNamesA);
% Fields that are in B, but missing in A
missingFields = setdiff(fieldNamesB,fieldNamesA);
% Check that there are no fields missing and the only difference is the version
if isempty(missingFields)
if ~strcmp(jsonA.GeneratedBy.Version,jsonB.GeneratedBy.Version)
ignoreRows = [ignoreRows iElement];
end
end
endRelease notes
Nothing to report, issue solved before
Metadata
Metadata
Assignees
Labels
testingEither unit testing or full pipeline testing for bugsEither unit testing or full pipeline testing for bugs