From 0ced78bfa87aefdf3f0f1f8c5221f8d0aced3c18 Mon Sep 17 00:00:00 2001 From: Niels Date: Sun, 28 Dec 2014 22:51:27 +0100 Subject: [PATCH] + test --- src/JSON.cc | 1 + test/JSON_unit.cc | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/JSON.cc b/src/JSON.cc index 44bc1c1f..07bb729d 100644 --- a/src/JSON.cc +++ b/src/JSON.cc @@ -1429,6 +1429,7 @@ bool JSON::iterator::operator==(const JSON::iterator& o) const } default: { + // not sure if used break; } } diff --git a/test/JSON_unit.cc b/test/JSON_unit.cc index ebabd115..6513d6bd 100644 --- a/test/JSON_unit.cc +++ b/test/JSON_unit.cc @@ -1412,10 +1412,12 @@ TEST_CASE("Iterators") CHECK(i4 == i4); } { - JSON j_object = {{"1", 1}, {"2", 2}}; + JSON j_object = {{"1", 1}, {"2", 2}, {"3", 3}}; JSON::iterator i1 = j_object.begin(); ++i1; + JSON::iterator i11 = j_object.begin(); + CHECK((i1 == i11) == false); JSON::iterator i2(i1); JSON::iterator i3; i3 = i2;