aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Bachmeyer <jcb@gnu.org>2022-11-29 22:25:52 -0600
committerJacob Bachmeyer <jcb@gnu.org>2022-11-29 22:25:52 -0600
commit9e26e771edd7b365b9ffcb64ca6f119cdb0ae414 (patch)
treec531c6289f84db50ddde59fc31b0bf294171ccee
parentb1a37815d0d1a8cbc9f980f20ddafaa29b5e503c (diff)
downloaddejagnu-9e26e771edd7b365b9ffcb64ca6f119cdb0ae414.zip
dejagnu-9e26e771edd7b365b9ffcb64ca6f119cdb0ae414.tar.gz
dejagnu-9e26e771edd7b365b9ffcb64ca6f119cdb0ae414.tar.bz2
Add NOTE function to C++ unit test API
-rw-r--r--ChangeLog3
-rw-r--r--dejagnu.h5
-rw-r--r--doc/dejagnu.texi8
3 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c619837..6299ea7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
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
@@ -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