Skip to content

Commit 9235123

Browse files
committed
coverage [skip ci]
1 parent 56e8c24 commit 9235123

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

test.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,13 @@ static void characterLiteral()
385385

386386
ASSERT_THROW_EQUALS(simplecpp::characterLiteralToLL("'\\\n"), std::runtime_error, "unexpected end of character literal");
387387

388-
// TODO: throw std::runtime_error("surrogate code points not allowed in universal character names");
388+
ASSERT_THROW_EQUALS(simplecpp::characterLiteralToLL("'"), std::runtime_error, "missing closing quote in character literal");
389+
ASSERT_THROW_EQUALS(simplecpp::characterLiteralToLL("u'"), std::runtime_error, "missing closing quote in character literal");
390+
ASSERT_THROW_EQUALS(simplecpp::characterLiteralToLL("L'"), std::runtime_error, "missing closing quote in character literal");
391+
ASSERT_THROW_EQUALS(simplecpp::characterLiteralToLL("'a"), std::runtime_error, "missing closing quote in character literal");
392+
389393
// TODO: throw std::runtime_error("assumed UTF-8 encoded source, but character literal ends unexpectedly");
390394
// TODO: throw std::runtime_error("numeric escape sequence too large");
391-
// TODO: throw std::runtime_error("missing closing quote in character literal");
392395
// TODO: throw std::runtime_error("empty character literal");
393396
}
394397

0 commit comments

Comments
 (0)