Skip to content

Commit b47314e

Browse files
committed
test improvements: rewrite edit() and open() usage with testing mocks
1 parent af5e229 commit b47314e

11 files changed

Lines changed: 36 additions & 0 deletions
-2.28 KB
Binary file not shown.
-13 Bytes
Binary file not shown.
-1.3 KB
Binary file not shown.

Scripts/FiniteDifference.mlx

1 Byte
Binary file not shown.
-14 Bytes
Binary file not shown.

SoftwareTests/PreFiles/PreFiniteDifference.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@
33
KnownIssuesID = "";
44
% ---- Pre-run commands -----
55

6+
edit = @(str)MyEdit(str);
7+
8+
function MyEdit(str)
9+
assert(exist(str,"file"))
10+
disp("Edit the file " + str)
11+
end

SoftwareTests/PreFiles/PreFiniteDifferenceSoln.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@
33
KnownIssuesID = "";
44
% ---- Pre-run commands -----
55

6+
edit = @(str)MyEdit(str);
7+
8+
function MyEdit(str)
9+
assert(exist(str,"file"))
10+
disp("Edit the file " + str)
11+
end

SoftwareTests/PreFiles/PreImplementExplicitSolver.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@
33
KnownIssuesID = "";
44
% ---- Pre-run commands -----
55

6+
open = @(str)MyEdit(str);
7+
8+
function MyEdit(str)
9+
assert(exist(str,"file"))
10+
disp("Edit the file " + str)
11+
end

SoftwareTests/PreFiles/PreImplementExplicitSolverSoln.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@
33
KnownIssuesID = "";
44
% ---- Pre-run commands -----
55

6+
open = @(str)MyEdit(str);
7+
8+
function MyEdit(str)
9+
assert(exist(str,"file"))
10+
disp("Edit the file " + str)
11+
end

SoftwareTests/PreFiles/PreMethodOfCharacteristics.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@
33
KnownIssuesID = "";
44
% ---- Pre-run commands -----
55

6+
edit = @(str)MyEdit(str);
7+
8+
function MyEdit(str)
9+
assert(exist(str,"file"))
10+
disp("Edit the file " + str)
11+
end

0 commit comments

Comments
 (0)