-
Notifications
You must be signed in to change notification settings - Fork 2
/
name_test.go
54 lines (47 loc) · 917 Bytes
/
name_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package schemax
import (
"fmt"
"testing"
)
func ExampleNewName() {
n := NewName()
n.Push(`thisIsAName`)
fmt.Println(n)
// Output: 'thisIsAName'
}
func ExampleQuotedDescriptorList_Len() {
n := NewName()
n.Push(`thisIsAName`)
fmt.Println(n.Len())
// Output: 1
}
func ExampleQuotedDescriptorList_Contains() {
n := NewName()
n.Push(`thisIsAName`)
fmt.Println(n.Contains(`otherName`))
// Output: false
}
func ExampleQuotedDescriptorList_IsZero() {
var n QuotedDescriptorList
fmt.Println(n.IsZero())
// Output: true
}
func ExampleQuotedDescriptorList_Index() {
var n QuotedDescriptorList
fmt.Println(n.Index(0))
// Output:
}
func TestName_codecov(t *testing.T) {
var n QuotedDescriptorList
n.Push(``)
n.Push(`^^^`)
n.Push(`test`)
n.Push(`test2`)
n.Push(`test5`)
n.Push(`test8`)
n.Contains(`test7`)
n.Contains(`test8`)
n.cast().Push(`test3`)
n.cast().NoPadding(true)
n.smvStringer()
}