diff --git a/ChangeLog b/ChangeLog index c619837..6299ea7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2022-11-29 Jacob Bachmeyer + * 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. diff --git a/dejagnu.h b/dejagnu.h index ba417a2..49923b2 100644 --- a/dejagnu.h +++ b/dejagnu.h @@ -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 @@ -2666,6 +2666,14 @@ counters and the @code{totals} method is automatically called when a 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.