summaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/text/internal/stringset/set_test.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2018-04-16 05:37:14 -0700
committerJoram Wilander <jwawilander@gmail.com>2018-04-16 08:37:14 -0400
commit6e2cb00008cbf09e556b00f87603797fcaa47e09 (patch)
tree3c0eb55ff4226a3f024aad373140d1fb860a6404 /vendor/golang.org/x/text/internal/stringset/set_test.go
parentbf24f51c4e1cc6286885460672f7f449e8c6f5ef (diff)
downloadchat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.gz
chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.bz2
chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.zip
Depenancy upgrades and movign to dep. (#8630)
Diffstat (limited to 'vendor/golang.org/x/text/internal/stringset/set_test.go')
-rw-r--r--vendor/golang.org/x/text/internal/stringset/set_test.go53
1 files changed, 0 insertions, 53 deletions
diff --git a/vendor/golang.org/x/text/internal/stringset/set_test.go b/vendor/golang.org/x/text/internal/stringset/set_test.go
deleted file mode 100644
index 97b9e58be..000000000
--- a/vendor/golang.org/x/text/internal/stringset/set_test.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package stringset
-
-import "testing"
-
-func TestStringSet(t *testing.T) {
- testCases := [][]string{
- {""},
- {"∫"},
- {"a", "b", "c"},
- {"", "a", "bb", "ccc"},
- {" ", "aaa", "bb", "c"},
- }
- test := func(tc int, b *Builder) {
- set := b.Set()
- if set.Len() != len(testCases[tc]) {
- t.Errorf("%d:Len() = %d; want %d", tc, set.Len(), len(testCases[tc]))
- }
- for i, s := range testCases[tc] {
- if x := b.Index(s); x != i {
- t.Errorf("%d:Index(%q) = %d; want %d", tc, s, x, i)
- }
- if p := Search(&set, s); p != i {
- t.Errorf("%d:Search(%q) = %d; want %d", tc, s, p, i)
- }
- if set.Elem(i) != s {
- t.Errorf("%d:Elem(%d) = %s; want %s", tc, i, set.Elem(i), s)
- }
- }
- if p := Search(&set, "apple"); p != -1 {
- t.Errorf(`%d:Search("apple") = %d; want -1`, tc, p)
- }
- }
- for i, tc := range testCases {
- b := NewBuilder()
- for _, s := range tc {
- b.Add(s)
- }
- b.Add(tc...)
- test(i, b)
- }
- for i, tc := range testCases {
- b := NewBuilder()
- b.Add(tc...)
- for _, s := range tc {
- b.Add(s)
- }
- test(i, b)
- }
-}