diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-07-03 14:11:38 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-07-03 14:11:38 +0000 |
commit | dbffd309fed95d306135617fdc18ce4cf6109025 (patch) | |
tree | 97f8be0fa860f2c725c6ee5555a324f14d9889b0 /src/libutil/tests | |
parent | 1be279af2622b196cc4630c48254adc96071c7e9 (diff) | |
parent | c3c7aedbb5ac869b7c454e90683f77b9c527a75a (diff) |
Merge branch 'master' of github.com:NixOS/nix into hash-always-has-type
Diffstat (limited to 'src/libutil/tests')
-rw-r--r-- | src/libutil/tests/logging.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libutil/tests/logging.cc b/src/libutil/tests/logging.cc index 6a6fb4ac3..6a58b9425 100644 --- a/src/libutil/tests/logging.cc +++ b/src/libutil/tests/logging.cc @@ -289,4 +289,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; + + } + } |