Skip to content

Commit 4cdb98b

Browse files
committed
Update ExtensionGenerationFixture.m
Improve fixture teardown
1 parent 039cb5a commit 4cdb98b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

+tests/+fixtures/ExtensionGenerationFixture.m

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,13 @@ function clearGenerated(fixture)
4646
namespaceName = extractBefore(namespaceFilename, '.');
4747

4848
generatedTypesDirectory = fullfile(fixture.TypesOutputFolder, "+types", "+"+namespaceName);
49-
rmdir(generatedTypesDirectory, 's');
50-
49+
if isfolder(generatedTypesDirectory)
50+
rmdir(generatedTypesDirectory, 's');
51+
end
5152
cacheFile = fullfile(fixture.TypesOutputFolder, "namespaces", namespaceName+".mat");
52-
delete(cacheFile)
53+
if isfile(cacheFile)
54+
delete(cacheFile)
55+
end
5356
end
5457
end
5558
end

0 commit comments

Comments
 (0)