Debian Codegraph @

internal/expect/testdata/test.go

raw symbols SCIP
1 // Copyright 2018 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Package fake1 is used to test the expect package.
6 package fake1
7
8 // The greek letters in this file mark points we use for marker tests.
9 // We use unique markers so we can make the tests stable against changes to
10 // this file.
11
12 const (
13 _ int = iota
14 αSimpleMarkerα //@αSimpleMarker
15 offsetββMarker //@mark(OffsetMarker, "β")
16 regexγMaγrker //@mark(RegexMarker, re`\p{Greek}Ma`)
17 εMultipleεζMarkersζ //@εMultiple,ζMarkers
18 ηBlockMarkerη /*@ηBlockMarker*/
19 )
20
21 /*Marker ι inside ι a comment*/ //@mark(Comment,"ι inside ")
22 var x = "hello" //@mark(StringMarker, `"hello"`)
23
24 // someFunc is a function. //@mark(LineComment, "someFunc")
25 func someFunc(a, b int) int {
26 // The line below must be the first occurrence of the plus operator
27 return a + b + 1 //@mark(NonIdentifier, re`\+[^\+]*`)
28 }
29
30 // And some extra checks for interesting action parameters
31 // Also checks for multi-line expectations
32 /*@
33 check(αSimpleMarker)
34 check(StringAndInt,
35 "Number %d",
36 12,
37 )
38
39 check(Bool, true)
40
41 check(NamedArgs, 1, true, a, b=1, c="3", d=true)
42 */