summaryrefslogtreecommitdiffstats
path: root/src/libutil/tests/logging.cc
diff options
context:
space:
mode:
authorBen Burdette <bburdette@gmail.com>2020-06-30 12:21:45 -0600
committerBen Burdette <bburdette@gmail.com>2020-06-30 12:21:45 -0600
commitddb81ca126864dbf920472688bcd3a80c7a7e73b (patch)
treed8152008a1741eb4029cfd7f03618ad28eb6df93 /src/libutil/tests/logging.cc
parentc484a67914fe16c4f2f6e7779baf4bdfe6405a22 (diff)
parentee1582494e458bf83535986b2a5bca32687420c5 (diff)
Merge branch 'master' into add-trace
Diffstat (limited to 'src/libutil/tests/logging.cc')
-rw-r--r--src/libutil/tests/logging.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libutil/tests/logging.cc b/src/libutil/tests/logging.cc
index 1bd90f009..221b1be1b 100644
--- a/src/libutil/tests/logging.cc
+++ b/src/libutil/tests/logging.cc
@@ -334,4 +334,22 @@ namespace nix {
"what about this " ANSI_YELLOW "%3%" ANSI_NORMAL " " ANSI_YELLOW "one" ANSI_NORMAL);
}
+
+ /* ----------------------------------------------------------------------------
+ * ErrPos
+ * --------------------------------------------------------------------------*/
+
+ TEST(errpos, invalidPos) {
+
+ // contains an invalid symbol, which we should not dereference!
+ Pos invalid;
+
+ // constructing without access violation.
+ ErrPos ep(invalid);
+
+ // assignment without access violation.
+ ep = invalid;
+
+ }
+
}