Mercurial > octave
changeset 33201:0f9fe0289e9b stable
doc: Add note about modification of shared variables in BISTs (bug #65296)
* testfun.txi: add note about modification of shared variables.
author | Fernando Alvarruiz <feralber@upvnet.upv.es> |
---|---|
date | Sat, 09 Mar 2024 11:05:41 +0100 |
parents | 773c6bd19630 |
children | cab636a9c37b d8fbfa44b064 |
files | doc/interpreter/testfun.txi |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/testfun.txi Tue Mar 12 14:59:09 2024 -0400 +++ b/doc/interpreter/testfun.txi Sat Mar 09 11:05:41 2024 +0100 @@ -186,6 +186,12 @@ %!shared @var{a}, @var{b} @end example +Modifications to shared variables persist from one test to the next +@strong{only} if the test succeeds. Thus, if one test modifies a shared +variable, later tests cannot know which value of the shared variable to expect +because the pass/fail status of earlier tests is unknown. For this reason, it +is not recommended to modify shared variables in tests. + You can also share test functions: @example