aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--doc/dejagnu.texi10
2 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index a74fce5..c619837 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-11-29 Jacob Bachmeyer <jcb@gnu.org>
+
+ * 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.
+
2022-11-28 Jacob Bachmeyer <jcb@gnu.org>
* dejagnu.h: Remove _DEJAGNU_WAIT_ conditional and revise comment
diff --git a/doc/dejagnu.texi b/doc/dejagnu.texi
index deeb46d..0b6777b 100644
--- a/doc/dejagnu.texi
+++ b/doc/dejagnu.texi
@@ -2656,10 +2656,12 @@ as the message to be displayed. There currently is no support for
formatted output in the C++ API; build the desired string before
passing it to these functions.
-Note that the C API is also available in C++ unit test programs; using
-both will cause confusion because each @code{TestState} object carries
-its own set of summary counters, while the C API has an independent
-global set of summary counters.
+Note that the C API is also available in C++ unit test programs; all
+@code{TestState} objects and the C API share the same global set of
+summary counters. Also note that a single global @code{TestState}
+object should be used, since the constructor clears the summary
+counters and the @code{totals} method is automatically called when a
+@code{TestState} object is destroyed.
The @code{TestState} class supports the following instance methods: