Skip to content

Commit 98d309e

Browse files
author
Your Name
committed
Fix cppcheck warnings
1 parent 3b5658f commit 98d309e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

test/testnonnullptr.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,17 @@ class TestNonNullPtr : public TestFixture {
5252
const NonNullPtr<int> p(x);
5353
int* raw = p;
5454
ASSERT(raw == &x);
55+
*raw = 2;
56+
ASSERT_EQUALS(2, x);
5557
}
5658

5759
void referenceConversion() const {
5860
int x = 1;
5961
const NonNullPtr<int> p(x);
6062
int& ref = p;
6163
ASSERT(&ref == &x);
64+
ref = 2;
65+
ASSERT_EQUALS(2, x);
6266
}
6367

6468
void dereference() const {

0 commit comments

Comments
 (0)