Lines Matching refs:erase
745 CHECK(j.erase("integer") == 1);
747 CHECK(j.erase("integer") == 0);
750 CHECK(j.erase("unsigned") == 1);
752 CHECK(j.erase("unsigned") == 0);
755 CHECK(j.erase("boolean") == 1);
757 CHECK(j.erase("boolean") == 0);
760 CHECK(j.erase("null") == 1);
762 CHECK(j.erase("null") == 0);
765 CHECK(j.erase("string") == 1);
767 CHECK(j.erase("string") == 0);
770 CHECK(j.erase("floating") == 1);
772 CHECK(j.erase("floating") == 0);
775 CHECK(j.erase("object") == 1);
777 CHECK(j.erase("object") == 0);
780 CHECK(j.erase("array") == 1);
782 CHECK(j.erase("array") == 0);
789 CHECK(j.erase(std::string_view("integer")) == 1);
791 CHECK(j.erase(std::string_view("integer")) == 0);
794 CHECK(j.erase(std::string_view("unsigned")) == 1);
796 CHECK(j.erase(std::string_view("unsigned")) == 0);
799 CHECK(j.erase(std::string_view("boolean")) == 1);
801 CHECK(j.erase(std::string_view("boolean")) == 0);
804 CHECK(j.erase(std::string_view("null")) == 1);
806 CHECK(j.erase(std::string_view("null")) == 0);
809 CHECK(j.erase(std::string_view("string")) == 1);
811 CHECK(j.erase(std::string_view("string")) == 0);
814 CHECK(j.erase(std::string_view("floating")) == 1);
816 CHECK(j.erase(std::string_view("floating")) == 0);
819 CHECK(j.erase(std::string_view("object")) == 1);
821 CHECK(j.erase(std::string_view("object")) == 0);
824 CHECK(j.erase(std::string_view("array")) == 1);
826 CHECK(j.erase(std::string_view("array")) == 0);
832 SECTION("erase(begin())")
836 typename Json::iterator it2 = jobject.erase(jobject.begin());
842 typename Json::const_iterator it2 = jobject.erase(jobject.cbegin());
848 SECTION("erase(begin(), end())")
852 typename Json::iterator it2 = jobject.erase(jobject.begin(), jobject.end());
858 typename Json::const_iterator it2 = jobject.erase(jobject.cbegin(), jobject.cend());
864 SECTION("erase(begin(), begin())")
868 typename Json::iterator it2 = jobject.erase(jobject.begin(), jobject.begin());
874 typename Json::const_iterator it2 = jobject.erase(jobject.cbegin(), jobject.cbegin());
880 SECTION("erase at offset")
885 typename Json::iterator it2 = jobject.erase(it);
892 typename Json::const_iterator it2 = jobject.erase(it);
898 SECTION("erase subrange")
902 typename Json::iterator it2 = jobject.erase(jobject.find("b"), jobject.find("e"));
908 typename Json::const_iterator it2 = jobject.erase(jobject.find("b"), jobject.find("e"));
919 CHECK_THROWS_WITH_AS(jobject.erase(jobject2.begin()),
921 CHECK_THROWS_WITH_AS(jobject.erase(jobject.begin(), jobject2.end()),
923 CHECK_THROWS_WITH_AS(jobject.erase(jobject2.begin(), jobject.end()),
925 CHECK_THROWS_WITH_AS(jobject.erase(jobject2.begin(), jobject2.end()),
931 CHECK_THROWS_WITH_AS(jobject.erase(jobject2.cbegin()),
933 CHECK_THROWS_WITH_AS(jobject.erase(jobject.cbegin(), jobject2.cend()),
935 CHECK_THROWS_WITH_AS(jobject.erase(jobject2.cbegin(), jobject.cend()),
937 CHECK_THROWS_WITH_AS(jobject.erase(jobject2.cbegin(), jobject2.cend()),
948 CHECK_THROWS_WITH_AS(j_nonobject.erase("foo"), "[json.exception.type_error.307] cannot use erase() with null", typename Json::type_error&);
951 CHECK_THROWS_WITH_AS(j_nonobject.erase(std::string_view("foo")), "[json.exception.type_error.307] cannot use erase() with null", typename Json::type_error&);
958 CHECK_THROWS_WITH_AS(j_nonobject.erase("foo"), "[json.exception.type_error.307] cannot use erase() with boolean", typename Json::type_error&);
961 CHECK_THROWS_WITH_AS(j_nonobject.erase(std::string_view("foo")), "[json.exception.type_error.307] cannot use erase() with boolean", typename Json::type_error&);
968 CHECK_THROWS_WITH_AS(j_nonobject.erase("foo"), "[json.exception.type_error.307] cannot use erase() with string", typename Json::type_error&);
971 CHECK_THROWS_WITH_AS(j_nonobject.erase(std::string_view("foo")), "[json.exception.type_error.307] cannot use erase() with string", typename Json::type_error&);
978 CHECK_THROWS_WITH_AS(j_nonobject.erase("foo"), "[json.exception.type_error.307] cannot use erase() with array", typename Json::type_error&);
981 CHECK_THROWS_WITH_AS(j_nonobject.erase(std::string_view("foo")), "[json.exception.type_error.307] cannot use erase() with array", typename Json::type_error&);
988 CHECK_THROWS_WITH_AS(j_nonobject.erase("foo"), "[json.exception.type_error.307] cannot use erase() with number", typename Json::type_error&);
991 CHECK_THROWS_WITH_AS(j_nonobject.erase(std::string_view("foo")), "[json.exception.type_error.307] cannot use erase() with number", typename Json::type_error&);
998 CHECK_THROWS_WITH_AS(j_nonobject.erase("foo"), "[json.exception.type_error.307] cannot use erase() with number", typename Json::type_error&);
1001 CHECK_THROWS_WITH_AS(j_nonobject.erase(std::string_view("foo")), "[json.exception.type_error.307] cannot use erase() with number", typename Json::type_error&);