diff options
author | Jacob Bachmeyer <jcb@gnu.org> | 2022-11-29 22:25:52 -0600 |
---|---|---|
committer | Jacob Bachmeyer <jcb@gnu.org> | 2022-11-29 22:25:52 -0600 |
commit | 9e26e771edd7b365b9ffcb64ca6f119cdb0ae414 (patch) | |
tree | c531c6289f84db50ddde59fc31b0bf294171ccee | |
parent | b1a37815d0d1a8cbc9f980f20ddafaa29b5e503c (diff) | |
download | dejagnu-9e26e771edd7b365b9ffcb64ca6f119cdb0ae414.zip dejagnu-9e26e771edd7b365b9ffcb64ca6f119cdb0ae414.tar.gz dejagnu-9e26e771edd7b365b9ffcb64ca6f119cdb0ae414.tar.bz2 |
Add NOTE function to C++ unit test API
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | dejagnu.h | 5 | ||||
-rw-r--r-- | doc/dejagnu.texi | 8 |
3 files changed, 16 insertions, 0 deletions
@@ -1,5 +1,8 @@ 2022-11-29 Jacob Bachmeyer <jcb@gnu.org> + * dejagnu.h (TestState::note): New method, like C note(). + * doc/dejagnu.texi (C++ unit testing API): Add note() method. + * doc/dejagnu.texi (C++ unit testing API): Fix incorrect documentation. The C and C++ interfaces share the same global counters, as do all C++ TestState objects. @@ -255,6 +255,11 @@ class TestState { std::cout << "\t" << outstate[UNSUPPORTED] << s << std::endl; } + void note (std::string s) + { + std::cout << "\t" << "NOTE: " << s << std::endl; + } + void totals (void) { std::cout << "\t#passed:\t\t" << passed << std::endl; diff --git a/doc/dejagnu.texi b/doc/dejagnu.texi index 0b6777b..03f7aa9 100644 --- a/doc/dejagnu.texi +++ b/doc/dejagnu.texi @@ -2667,6 +2667,14 @@ The @code{TestState} class supports the following instance methods: @itemize @item +@code{note} emits a note that will be displayed at verbose level 2 or +higher. + +@quotation +@t{@b{TestState::note}(@i{msg});} +@end quotation + +@item @code{pass} prints a message for a successful test completion. @quotation |