Skip to content

Commit

Permalink
Okay, feed this to the coverage tool.
Browse files Browse the repository at this point in the history
  • Loading branch information
joka921 committed Mar 20, 2024
1 parent e5f6a57 commit 0e921fd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/parser/TripleComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,8 @@ class TripleComponent {
// If `toValueId` could not convert to `Id`, we have a string, which we
// look up in (and potentially add to) our local vocabulary.
AD_CORRECTNESS_CHECK(isString() || isLiteral() || isIri());
// TODO<joka921> Code duplication + newWord can be moved.
// TODO<joka921> We really have to make the internalRepresentation
// movable.
// TODO<joka921> Make the internal representation of the `Literal` and
// `Iri` class movable.
std::string newWord = [&]() -> std::string {
if (isString()) {
return getString();
Expand Down
2 changes: 1 addition & 1 deletion src/parser/TurtleParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ void TurtleParser<T>::parseIntegerConstant(std::string_view input) {
TurtleParserIntegerOverflowBehavior::AllToDouble) {
return parseDoubleConstant(input);
}
int64_t result{0ll};
int64_t result{0};
// The functions used below cannot deal with leading redundant '+' signs.
if (input.starts_with('+')) {
input.remove_prefix(1);
Expand Down
2 changes: 2 additions & 0 deletions test/TurtleParserTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ TEST(TurtleParserTest, rdfLiteral) {

literals.emplace_back(R"("42.1234"^^)"s + "<" + XSD_DOUBLE_TYPE + ">");
expected.emplace_back(42.1234);
literals.emplace_back(R"("+42.2345"^^)"s + "<" + XSD_DOUBLE_TYPE + ">");
expected.emplace_back(42.2345);
literals.push_back(R"("-142.321"^^)"s + "<" + XSD_DECIMAL_TYPE + ">");
expected.emplace_back(-142.321);
literals.push_back(R"("-142321"^^)"s + "<" + XSD_INT_TYPE + ">");
Expand Down

0 comments on commit 0e921fd

Please sign in to comment.