-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee07559
commit 701b0ca
Showing
13 changed files
with
261 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
function folderPath = toolboxdir() | ||
% Root folder for the openMINDS_MATLAB toolbox | ||
% | ||
% S = openminds.toolboxdir() returns a character vector that is the absolute | ||
% path to the root of the toolbox folder | ||
|
||
folderPath = fileparts(fileparts(mfilename('fullpath'))); | ||
assert(isfolder(folderPath), 'Toolbox folder does not exist') % Should not happen | ||
end |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,4 +43,3 @@ | |
copyRightLine, ... | ||
separatorLine}, newline); | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
classdef TutorialTest < matlab.unittest.TestCase | ||
% TutorialTest - Unit test for testing the openMINDS tutorials. | ||
|
||
properties | ||
RootDirectory = openminds.internal.rootpath(); | ||
end | ||
|
||
properties (TestParameter) | ||
% TutorialFile - A cell array where each cell is the name of a | ||
% tutorial file. testTutorial will run on each file individually | ||
tutorialFile = listTutorialFiles(); | ||
end | ||
|
||
properties (Constant) | ||
SkippedTutorials = {}; | ||
end | ||
|
||
methods (TestClassSetup) | ||
function setupClass(testCase) %#ok<*MANU> | ||
openminds.startup("latest") | ||
end | ||
end | ||
|
||
methods (TestClassTeardown) | ||
function tearDownClass(testCase) | ||
% Pass. No class teardown routines needed | ||
end | ||
end | ||
|
||
methods (TestMethodSetup) | ||
function setupMethod(testCase) | ||
% Pass. No method setup routines needed | ||
end | ||
end | ||
|
||
methods (Test) | ||
function testTutorial(testCase, tutorialFile) | ||
run(tutorialFile) | ||
end | ||
end | ||
end | ||
|
||
function tutorialFilePaths = listTutorialFiles() | ||
% listTutorialFiles - List names of all tutorial files (exclude skipped files) | ||
rootPath = openminds.internal.rootpath(); | ||
L = dir(fullfile(rootPath, 'livescripts', '*.mlx')); | ||
tutorialNames = setdiff({L.name}, TutorialTest.SkippedTutorials); | ||
|
||
tutorialFilePaths = fullfile(rootPath, 'livescripts', tutorialNames); | ||
tutorialFilePaths{end+1} = fullfile(rootPath, 'gettingStarted.mlx'); | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.