Closed tobolar closed 1 day ago
BTW: Why is fullPathName
needed at all?
I thought the other commands also handled relative paths as well, and only ModelicaTest.Utilities.Internal
changes directory and it should restore it - if that fails the asserts will trigger before anything is logged to the file.
So, just:
if Modelica.Utilities.Strings.isEmpty(logFile) then
file:="";
else
file:=logFile;
print("... testAllFunctions(..) is logged in " + file);
Modelica.Utilities.Files.removeFile(file);
end if;
or back to:
if logFile<>"" then
print("... testAllFunctions(..) is logged in " + logFile);
Modelica.Utilities.Files.removeFile(logFile);
end if;
and replace file
by logFile
.
@HansOlsson Well, I didn't digger deeply in this function. The PR is only about to handle empty string of file
properly i.e. using given MSL function.
Regarding ok
- if the default value of ok
is false, then there is no need to change it. You are right. I will revert this.
@HansOlsson Well, I didn't digger deeply in this function. The PR is only about to handle empty string of
file
properly i.e. using given MSL function.
But there are some problems:
So the PR isn't that bad in itself - it just made me realize how messy the function really is.
@HansOlsson I fully agree to all your three concerns.
So the PR isn't that bad in itself - it just made me realize how messy the function really is.
So I prefer retrieve this PR. Changing the function as you suggest is all fine but shall be done in a new PR.
Alternatively just don't change 'ok'.