diff --git a/libnixf/lib/Parse/test/Parser.cpp b/libnixf/lib/Parse/test/Parser.cpp index b35ec062b..88947d381 100644 --- a/libnixf/lib/Parse/test/Parser.cpp +++ b/libnixf/lib/Parse/test/Parser.cpp @@ -80,6 +80,8 @@ TEST(Parser, StringMissingDQuote) { // Check the diagnostic. ASSERT_EQ(Diags.diags().size(), 1); auto &D = Diags.diags()[0]; + ASSERT_EQ(D->range().Begin, Src.begin() + 4); + ASSERT_EQ(D->range().End, Src.begin() + 4); ASSERT_EQ(D->kind(), Diagnostic::DK_Expected); ASSERT_EQ(D->args().size(), 1); ASSERT_EQ(D->args()[0], "\" to close string literal"); @@ -87,6 +89,8 @@ TEST(Parser, StringMissingDQuote) { // Check the note. ASSERT_EQ(D->notes().size(), 1); auto &N = D->notes()[0]; + ASSERT_EQ(N->range().Begin, Src.begin() + 0); + ASSERT_EQ(N->range().End, Src.begin() + 0); ASSERT_EQ(N->kind(), Note::NK_ToMachThis); ASSERT_EQ(N->args().size(), 1); ASSERT_EQ(N->args()[0], "\"");