diff --git a/examples/domains/customLayers/domainsCustomLayersSheet.mlx b/examples/domains/customLayers/domainsCustomLayersSheet.mlx index 382cff28f..6e419ed10 100644 Binary files a/examples/domains/customLayers/domainsCustomLayersSheet.mlx and b/examples/domains/customLayers/domainsCustomLayersSheet.mlx differ diff --git a/examples/domains/customXY/domainsCustomXYSheet.mlx b/examples/domains/customXY/domainsCustomXYSheet.mlx index 61a2f1bfb..f8c323499 100644 Binary files a/examples/domains/customXY/domainsCustomXYSheet.mlx and b/examples/domains/customXY/domainsCustomXYSheet.mlx differ diff --git a/examples/domains/standardLayers/domainsStandardLayersSheet.mlx b/examples/domains/standardLayers/domainsStandardLayersSheet.mlx index 7e9b79c56..f50ab6361 100644 Binary files a/examples/domains/standardLayers/domainsStandardLayersSheet.mlx and b/examples/domains/standardLayers/domainsStandardLayersSheet.mlx differ diff --git a/examples/miscellaneous/alternativeLanguages/customModelLanguagesSheet.mlx b/examples/miscellaneous/alternativeLanguages/customModelLanguagesSheet.mlx index 492e32fb7..144b548ee 100644 Binary files a/examples/miscellaneous/alternativeLanguages/customModelLanguagesSheet.mlx and b/examples/miscellaneous/alternativeLanguages/customModelLanguagesSheet.mlx differ diff --git a/examples/miscellaneous/alternativeLanguages/orsoDSPCCustomLayers.m b/examples/miscellaneous/alternativeLanguages/orsoDSPCCustomLayers.m index f16055886..28f9a79d7 100644 --- a/examples/miscellaneous/alternativeLanguages/orsoDSPCCustomLayers.m +++ b/examples/miscellaneous/alternativeLanguages/orsoDSPCCustomLayers.m @@ -59,9 +59,10 @@ % them in the data block.... % Read in the datafiles -D2O_data = dlmread('c_PLP0016596.dat'); -SMW_data = dlmread('c_PLP0016601.dat'); -H2O_data = dlmread('c_PLP0016607.dat'); +root = getappdata(0, 'root'); +D2O_data = dlmread(fullfile(root, '/examples/normalReflectivity/customLayers/c_PLP0016596.dat')); +SMW_data = dlmread(fullfile(root, '/examples/normalReflectivity/customLayers/c_PLP0016601.dat')); +H2O_data = dlmread(fullfile(root, '/examples/normalReflectivity/customLayers/c_PLP0016607.dat')); % Add the data to the project problem.addData('Bilayer / D2O', D2O_data(:,1:3)); @@ -77,7 +78,7 @@ % % Add the custom file to the project.... -problem.addCustomFile('DSPC Model','customBilayer.m','matlab',pwd); +problem.addCustomFile('DSPC Model','customBilayer.m','matlab'); %% % % diff --git a/examples/miscellaneous/convertRascal1Project/convertRascal.mlx b/examples/miscellaneous/convertRascal1Project/convertRascal.mlx index 9ffb258cb..ae43fb5e5 100644 Binary files a/examples/miscellaneous/convertRascal1Project/convertRascal.mlx and b/examples/miscellaneous/convertRascal1Project/convertRascal.mlx differ diff --git a/examples/miscellaneous/roundRobin/roundRobin.mlx b/examples/miscellaneous/roundRobin/roundRobin.mlx index 64de1fd2e..27c116a42 100644 Binary files a/examples/miscellaneous/roundRobin/roundRobin.mlx and b/examples/miscellaneous/roundRobin/roundRobin.mlx differ diff --git a/examples/normalReflectivity/customLayers/customLayersDSPCSheet.mlx b/examples/normalReflectivity/customLayers/customLayersDSPCSheet.mlx index 6f7bccb95..6510bc6a5 100644 Binary files a/examples/normalReflectivity/customLayers/customLayersDSPCSheet.mlx and b/examples/normalReflectivity/customLayers/customLayersDSPCSheet.mlx differ diff --git a/examples/normalReflectivity/customXY/customXYDSPCSheet.mlx b/examples/normalReflectivity/customXY/customXYDSPCSheet.mlx index c8eb0f481..4ba302917 100644 Binary files a/examples/normalReflectivity/customXY/customXYDSPCSheet.mlx and b/examples/normalReflectivity/customXY/customXYDSPCSheet.mlx differ diff --git a/examples/normalReflectivity/standardLayers/standardLayersDSPCSheet.mlx b/examples/normalReflectivity/standardLayers/standardLayersDSPCSheet.mlx index 7bb3f93a9..9c1e8f6bc 100644 Binary files a/examples/normalReflectivity/standardLayers/standardLayersDSPCSheet.mlx and b/examples/normalReflectivity/standardLayers/standardLayersDSPCSheet.mlx differ diff --git a/tests/ORSO/testORSOValidation.m b/tests/ORSO/testORSOValidation.m index d24edabd6..39b4bb3fa 100644 --- a/tests/ORSO/testORSOValidation.m +++ b/tests/ORSO/testORSOValidation.m @@ -24,6 +24,12 @@ function testORSO(testCase, layersFile, dataFile) end + methods (TestClassTeardown) + function clear(~) + close all % Close figure after run + end + end + methods (Static) function out = orsoTest(layersFile, dataFile) diff --git a/tests/testExamples.m b/tests/testExamples.m index 59b9cc336..48aa98b8a 100644 --- a/tests/testExamples.m +++ b/tests/testExamples.m @@ -76,6 +76,17 @@ function testCleanUp(testCase) end end + + methods(Static) + function setupCurrentDir(testCase, scriptFile) + import matlab.unittest.fixtures.CurrentFolderFixture + + [pwdPath, ~, ~] = fileparts(which(scriptFile)); + testCase.applyFixture(CurrentFolderFixture(pwdPath)) + end + end + + methods (Test,ParameterCombination="sequential") % Runs the different examples sequentially function testScriptExamples(testCase, ... @@ -93,11 +104,7 @@ function testScriptExamples(testCase, ... % verifies example exists with .m extension testCase.verifyEqual(exist(exampleScriptFile,'file'), 2); - import matlab.unittest.fixtures.CurrentFolderFixture - - [pwdPath, ~, ~] = fileparts(which(exampleScriptFile)); - testCase.applyFixture(CurrentFolderFixture(pwdPath)) - + testExamples.setupCurrentDir(testCase, exampleScriptFile) % runs the example file evalc(exampleScriptFile); @@ -126,8 +133,9 @@ function testScriptExamples(testCase, ... close all; end - function testLiveScriptExamples(~, exampleLiveScriptFile) + function testLiveScriptExamples(testCase, exampleLiveScriptFile) % runs the example live script file + testExamples.setupCurrentDir(testCase, exampleLiveScriptFile) evalc(exampleLiveScriptFile); close all; end @@ -137,10 +145,7 @@ function testWriteScript(testCase, exampleScriptFile) % to a script that can regenerate the object % verifies example exists with .m extension testCase.verifyEqual(exist(exampleScriptFile,'file'), 2); - import matlab.unittest.fixtures.CurrentFolderFixture - - [pwdPath, ~, ~] = fileparts(which(exampleScriptFile)); - testCase.applyFixture(CurrentFolderFixture(pwdPath)) + testExamples.setupCurrentDir(testCase, exampleScriptFile) % runs the example file evalc(exampleScriptFile);