invalid pos check
This commit is contained in:
parent
e72a16a339
commit
a0705e0dd1
|
@ -289,4 +289,22 @@ namespace nix {
|
||||||
"what about this " ANSI_YELLOW "%3%" ANSI_NORMAL " " ANSI_YELLOW "one" ANSI_NORMAL);
|
"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;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue