Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
m-unit-tests
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
m-unit-tests
Commits
3362b3f4
Verified
Commit
3362b3f4
authored
1 year ago
by
Stéphane Adjemian
Browse files
Options
Downloads
Patches
Plain Diff
Remove unnecessary square brackets.
parent
a6b97581
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/build_report_summary.m
+1
-1
1 addition, 1 deletion
src/build_report_summary.m
src/mtest.m
+7
-7
7 additions, 7 deletions
src/mtest.m
with
8 additions
and
8 deletions
src/build_report_summary.m
+
1
−
1
View file @
3362b3f4
...
@@ -93,7 +93,7 @@ if sendmail
...
@@ -93,7 +93,7 @@ if sendmail
fid
=
fopen
(
'~/.matlab-send-mail-info'
,
'r'
);
fid
=
fopen
(
'~/.matlab-send-mail-info'
,
'r'
);
else
else
disp
([
'build_report_summary:: I Cannot send the report to '
mailto
' because the sender and the smtp server are not defined!'
])
disp
([
'build_report_summary:: I Cannot send the report to '
mailto
' because the sender and the smtp server are not defined!'
])
disp
(
[
' You probably need to add a
''
.matlab-send-mail-info
''
in your root directory...'
]
)
disp
(
' You probably need to add a
''
.matlab-send-mail-info
''
in your root directory...'
)
return
return
end
end
setpref
(
'Internet'
,
'SMTP_Server'
,
fgetl
(
fid
));
setpref
(
'Internet'
,
'SMTP_Server'
,
fgetl
(
fid
));
...
...
This diff is collapsed.
Click to expand it.
src/mtest.m
+
7
−
7
View file @
3362b3f4
...
@@ -85,7 +85,7 @@ for i=1:nn
...
@@ -85,7 +85,7 @@ for i=1:nn
% Write the temporary test routine.
% Write the temporary test routine.
tid
=
fopen
([
FNAME
'_test_'
int2str
(
i
)
'.m'
],
'w'
);
tid
=
fopen
([
FNAME
'_test_'
int2str
(
i
)
'.m'
],
'w'
);
fprintf
(
tid
,[
'function [T,t,LOG] = '
FNAME
'_test_'
int2str
(
i
)
'()\n'
]);
fprintf
(
tid
,[
'function [T,t,LOG] = '
FNAME
'_test_'
int2str
(
i
)
'()\n'
]);
fprintf
(
tid
,
[
'try\n'
]
);
fprintf
(
tid
,
'try\n'
);
if
(
length
(
file
{
b1
(
i
)
+
1
})
>
2
&&
isequal
(
file
{
b1
(
i
)
+
1
}(
1
:
3
),
'%$ '
))
||
(
length
(
file
{
b1
(
i
)
+
1
})
>
1
&&
isequal
(
file
{
b1
(
i
)
+
1
}(
1
:
2
),
'%$'
))
if
(
length
(
file
{
b1
(
i
)
+
1
})
>
2
&&
isequal
(
file
{
b1
(
i
)
+
1
}(
1
:
3
),
'%$ '
))
||
(
length
(
file
{
b1
(
i
)
+
1
})
>
1
&&
isequal
(
file
{
b1
(
i
)
+
1
}(
1
:
2
),
'%$'
))
remove_first_columns
=
true
;
remove_first_columns
=
true
;
else
else
...
@@ -100,25 +100,25 @@ for i=1:nn
...
@@ -100,25 +100,25 @@ for i=1:nn
str
=
regexprep
(
str
,
'%'
,
'%%'
);
str
=
regexprep
(
str
,
'%'
,
'%%'
);
fprintf
(
tid
,
str
);
fprintf
(
tid
,
str
);
end
end
fprintf
(
tid
,
[
'LOG = NaN;\n'
]
);
fprintf
(
tid
,
'LOG = NaN;\n'
);
if
isoctave
if
isoctave
fprintf
(
tid
,
'catch\n'
);
fprintf
(
tid
,
'catch\n'
);
fprintf
(
tid
,
'exception = lasterror;\n'
);
fprintf
(
tid
,
'exception = lasterror;\n'
);
fprintf
(
tid
,
'LOG =
''
%s
''
;\n'
,
'The Log output is not available with Octave!'
);
fprintf
(
tid
,
'LOG =
''
%s
''
;\n'
,
'The Log output is not available with Octave!'
);
else
else
fprintf
(
tid
,
'catch exception\n'
);
fprintf
(
tid
,
'catch exception\n'
);
fprintf
(
tid
,
[
'LOG = getReport(exception,
''
extended
''
);\n'
]
);
fprintf
(
tid
,
'LOG = getReport(exception,
''
extended
''
);\n'
);
end
end
fprintf
(
tid
,
[
'T = NaN;\n'
]
);
fprintf
(
tid
,
'T = NaN;\n'
);
fprintf
(
tid
,
[
't = NaN;\n'
]
);
fprintf
(
tid
,
't = NaN;\n'
);
fprintf
(
tid
,
[
'end\n'
]
);
fprintf
(
tid
,
'end\n'
);
fclose
(
tid
);
fclose
(
tid
);
% Call the temporary test routine.
% Call the temporary test routine.
tic
;
tic
;
[
TestFlag
,
TestDetails
,
LOG
]
=
feval
([
FNAME
'_test_'
int2str
(
i
)]);
[
TestFlag
,
TestDetails
,
LOG
]
=
feval
([
FNAME
'_test_'
int2str
(
i
)]);
time
=
toc
;
time
=
toc
;
if
isnan
(
TestFlag
)
if
isnan
(
TestFlag
)
fprintf
(
[
'\n'
]
)
fprintf
(
'\n'
)
fprintf
([
'Call to '
FNAME
' test routine n°'
int2str
(
i
)
' failed ('
datestr
(
now
)
')!\n'
])
fprintf
([
'Call to '
FNAME
' test routine n°'
int2str
(
i
)
' failed ('
datestr
(
now
)
')!\n'
])
fprintf
([
'\n'
])
fprintf
([
'\n'
])
if
~
isoctave
if
~
isoctave
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment