Closed zaikunzhang closed 1 year ago
Whenever you use cd to change the path, you should remember to go back to the original directory before finishing the test.
cd
Mathematically speaking, cd should always be invoked for an even number of times.
See the following for an example.
https://github.com/libprima/prima/blob/main/matlab/tests/profile.m
Similarly, if you change the warning state, you should restore it to the original state when appropriate. If you change the rng, you should restore it to the original state when appropriate. See the following for another example
rng
https://github.com/libprima/prima/blob/main/matlab/tests/private/isequiv.m
Search for "restore" and you will see what I mean.
Discuss with Cunxin @OptHuang if this is not clear to you.
I have implemented the above effect for cd and restore in https://github.com/blockwise-direct-search/bds/blob/main/tests/profile.m
Whenever you use
cd
to change the path, you should remember to go back to the original directory before finishing the test.Mathematically speaking,
cd
should always be invoked for an even number of times.See the following for an example.
https://github.com/libprima/prima/blob/main/matlab/tests/profile.m
Similarly, if you change the warning state, you should restore it to the original state when appropriate. If you change the
rng
, you should restore it to the original state when appropriate. See the following for another examplehttps://github.com/libprima/prima/blob/main/matlab/tests/private/isequiv.m
Search for "restore" and you will see what I mean.
Discuss with Cunxin @OptHuang if this is not clear to you.