From 60762fc531e6fae24fe8b52cf41f4dc6c03cea47 Mon Sep 17 00:00:00 2001 From: Paul Jolly Date: Mon, 8 Jul 2019 16:07:47 +0100 Subject: [PATCH] internal/lsp: fix test failure introduced in CL 185058 Failed to properly check the try-bot result in CL 185058. Hence didn't spot the LSP tests that also verify offset behaviour. This CL fixes those tests to align the LSP tests with the change introduced in CL 185058. Change-Id: Ia81ab6db7a2c3a4729d8ef73205b6071af270b00 Reviewed-on: https://go-review.googlesource.com/c/tools/+/185220 Run-TryBot: Paul Jolly Run-TryBot: Rebecca Stambler Reviewed-by: Rebecca Stambler TryBot-Result: Gobot Gobot --- internal/lsp/lsp_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/lsp/lsp_test.go b/internal/lsp/lsp_test.go index 418e519cb0f..17d845c5f0c 100644 --- a/internal/lsp/lsp_test.go +++ b/internal/lsp/lsp_test.go @@ -807,10 +807,10 @@ func TestBytesOffset(t *testing.T) { {text: `a𐐀b`, pos: protocol.Position{Line: 0, Character: 4}, want: 6}, {text: `a𐐀b`, pos: protocol.Position{Line: 0, Character: 5}, want: -1}, {text: "aaa\nbbb\n", pos: protocol.Position{Line: 0, Character: 3}, want: 3}, - {text: "aaa\nbbb\n", pos: protocol.Position{Line: 0, Character: 4}, want: -1}, + {text: "aaa\nbbb\n", pos: protocol.Position{Line: 0, Character: 4}, want: 3}, {text: "aaa\nbbb\n", pos: protocol.Position{Line: 1, Character: 0}, want: 4}, {text: "aaa\nbbb\n", pos: protocol.Position{Line: 1, Character: 3}, want: 7}, - {text: "aaa\nbbb\n", pos: protocol.Position{Line: 1, Character: 4}, want: -1}, + {text: "aaa\nbbb\n", pos: protocol.Position{Line: 1, Character: 4}, want: 7}, {text: "aaa\nbbb\n", pos: protocol.Position{Line: 2, Character: 0}, want: 8}, {text: "aaa\nbbb\n", pos: protocol.Position{Line: 2, Character: 1}, want: -1}, {text: "aaa\nbbb\n\n", pos: protocol.Position{Line: 2, Character: 0}, want: 8},