Skip to content

Commit 0dbcf8b

Browse files
committed
Updating test coverage
1 parent 8ec12a9 commit 0dbcf8b

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

src/yajson/yajson.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ inline void Value::_parseWord(const std::string& text, const std::string& word,
591591
const auto actual = text.substr(offset, word.length());
592592

593593
if (actual != word) {
594-
throw std::invalid_argument("Invalid word: " + actual); // NOTEST
594+
throw std::invalid_argument("Invalid word: " + actual);
595595
}
596596

597597
offset += word.length();
@@ -784,7 +784,7 @@ inline void String::_formatCodepoint(std::string &buffer, size_t &i) const
784784

785785
if (offset - i == 1) { // single character, just copy it across
786786
buffer += _value[i];
787-
} else { // NOTEST
787+
} else {
788788
const bool ecma6 = (codepoint > 0xFFFF); // u{xxxxxx} not supported before ecma6
789789
std::stringstream stream;
790790

@@ -840,7 +840,7 @@ inline size_t String::_codepoint(const std::string &text, std::string::size_type
840840
| size_t(text.data()[offset - 1] & 0x3F));
841841
YaJsonAssert((text.data()[offset - 1] & 0xC0) == 0x80);
842842
YaJsonAssert((codepoint > 0x7F) && (codepoint <= 0x7FF));
843-
} else if (threeBytes) { // NOTEST
843+
} else if (threeBytes) {
844844
YaJsonAssert(offset + 3 <= text.length());
845845
offset += 3;
846846
codepoint = ((size_t(text.data()[offset - 3] & 0x0F) << 12)
@@ -849,7 +849,7 @@ inline size_t String::_codepoint(const std::string &text, std::string::size_type
849849
YaJsonAssert((text.data()[offset - 1] & 0xC0) == 0x80);
850850
YaJsonAssert((text.data()[offset - 2] & 0xC0) == 0x80);
851851
YaJsonAssert((codepoint > 0x7FF) && (codepoint <= 0xFFFF));
852-
} else if (fourBytes) { // NOTEST
852+
} else if (fourBytes) {
853853
YaJsonAssert(offset + 4 <= text.length());
854854
offset += 4;
855855
codepoint = ((size_t(text.data()[offset - 4] & 0x07) << 18)
@@ -867,7 +867,7 @@ inline size_t String::_codepoint(const std::string &text, std::string::size_type
867867
return codepoint;
868868
}
869869

870-
inline std::string String::_utf8(size_t codepoint) { // NOTEST
870+
inline std::string String::_utf8(size_t codepoint) {
871871
/*
872872
1 7 U+0000 U+007F 0xxxxxxx
873873
2 11 U+0080 U+07FF 110xxxxx 10xxxxxx
@@ -879,7 +879,7 @@ inline std::string String::_utf8(size_t codepoint) { // NOTEST
879879
if (codepoint <= 0x7F) {
880880
value.assign(1, char(codepoint));
881881
} else if (codepoint <= 0x7FF) {
882-
char buffer[3];
882+
char buffer[3]; // NOTEST
883883

884884
buffer[0] = static_cast<char>((6 << 5) | (codepoint >> 6));
885885
buffer[1] = static_cast<char>((2 << 6) | (codepoint & 0x3F));
@@ -938,17 +938,17 @@ inline void String::_parseEscaped(const std::string& text, size_t& offset, std::
938938
case 't':
939939
result += '\t';
940940
break;
941-
case 'u': // NOTEST
941+
case 'u':
942942
_parseEscapedUnicode(text, offset, result);
943943
break;
944-
default: // NOTEST
944+
default:
945945
throw std::invalid_argument(std::string("Illegal escape: ") + text[offset]);
946946
}
947947

948948
offset += 1;
949949
}
950950

951-
inline void String::_parseEscapedUnicode(const std::string& text, size_t& offset, std::string& result) { // NOTEST
951+
inline void String::_parseEscapedUnicode(const std::string& text, size_t& offset, std::string& result) {
952952
long value;
953953
size_t count = 0;
954954

0 commit comments

Comments
 (0)