gotools/gopls/internal/test/marker/testdata/hover/basiclit.txt

This test checks gopls behavior when hovering over basic literals.

Skipped on ppc64 as there appears to be a bug on aix-ppc64: golang/go#67526.

-- flags --
-skip_goarch=ppc64

-- basiclit.go --
package basiclit

func _() {
	_ = 'a' //@hover("'a'", "'a'", latinA)
	_ = 0x61 //@hover("0x61", "0x61", latinAHex)

	_ = '\u2211' //@hover("'\\u2211'", "'\\u2211'", summation)
	_ = 0x2211 //@hover("0x2211", "0x2211", summationHex)
	_ = "foo \u2211 bar" //@hover("\\u2211", "\\u2211", summation)

	_ = '\a' //@hover("'\\a'", "'\\a'", control)
	_ = "foo \a bar" //@hover("\\a", "\\a", control)

	_ = '\U0001F30A' //@hover("'\\U0001F30A'", "'\\U0001F30A'", waterWave)
	_ = 0x0001F30A //@hover("0x0001F30A", "0x0001F30A", waterWaveHex)
	_ = 0X0001F30A //@hover("0X0001F30A", "0X0001F30A", waterWaveHex)
	_ = "foo \U0001F30A bar" //@hover("\\U0001F30A", "\\U0001F30A", waterWave)

	_ = '\x7E' //@hover("'\\x7E'", "'\\x7E'", tilde)
	_ = "foo \x7E bar" //@hover("\\x7E", "\\x7E", tilde)
	_ = "foo \a bar" //@hover("\\a", "\\a", control)

	_ = '\173' //@hover("'\\173'", "'\\173'", leftCurly)
	_ = "foo \173 bar" //@hover("\\173","\\173", leftCurly)
	_ = "foo \173 bar \u2211 baz" //@hover("\\173","\\173", leftCurly)
	_ = "foo \173 bar \u2211 baz" //@hover("\\u2211","\\u2211", summation)
	_ = "foo\173bar\u2211baz" //@hover("\\173","\\173", leftCurly)
	_ = "foo\173bar\u2211baz" //@hover("\\u2211","\\u2211", summation)

	// search for runes in string only if there is an escaped sequence
	_ = "hello" //@hover(`"hello"`, _, _)

	// incorrect escaped rune sequences
	_ = '\0' //@hover("'\\0'", _, _),diag(re`\\0()'`, re"illegal character")
	_ = '\u22111' //@hover("'\\u22111'", _, _)
	_ = '\U00110000' //@hover("'\\U00110000'", _, _)
	_ = '\u12e45'//@hover("'\\u12e45'", _, _)
	_ = '\xa' //@hover("'\\xa'", _, _)
	_ = 'aa' //@hover("'aa'", _, _)

	// other basic lits
	_ = 1 //@hover("1", _, _)
	_ = 1.2 //@hover("1.2", _, _)
	_ = 1.2i //@hover("1.2i", _, _)
	_ = 0123 //@hover("0123", _, _)
	_ = 0b1001 //@hover("0b", "0b1001", binaryNumber)
	_ = 0B1001 //@hover("0B", "0B1001", binaryNumber)
	_ = 0o77 //@hover("0o", "0o77", octalNumber)
	_ = 0O77 //@hover("0O", "0O77", octalNumber)
	_ = 0x1234567890 //@hover("0x1234567890", "0x1234567890", hexNumber)
	_ = 0X1234567890 //@hover("0X1234567890", "0X1234567890", hexNumber)
	_ = 0x1000000000000000000 //@hover("0x1", "0x1000000000000000000", bigHex)
)
-- @bigHex --
4722366482869645213696
-- @binaryNumber --
9
-- @control --
U+0007, control
-- @hexNumber --
78187493520
-- @latinA --
'a', U+0061, LATIN SMALL LETTER A
-- @latinAHex --
97, 'a', U+0061, LATIN SMALL LETTER A
-- @leftCurly --
'{', U+007B, LEFT CURLY BRACKET
-- @octalNumber --
63
-- @summation --
'∑', U+2211, N-ARY SUMMATION
-- @summationHex --
8721, '∑', U+2211, N-ARY SUMMATION
-- @tilde --
'~', U+007E, TILDE
-- @waterWave --
'🌊', U+1F30A, WATER WAVE
-- @waterWaveHex --
127754, '🌊', U+1F30A, WATER WAVE