OSDN Git Service

new repo
[bytom/vapor.git] / vendor / golang.org / x / text / unicode / cldr / cldr_test.go
1 // Copyright 2014 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 cldr
6
7 import "testing"
8
9 func TestParseDraft(t *testing.T) {
10         tests := []struct {
11                 in    string
12                 draft Draft
13                 err   bool
14         }{
15                 {"unconfirmed", Unconfirmed, false},
16                 {"provisional", Provisional, false},
17                 {"contributed", Contributed, false},
18                 {"approved", Approved, false},
19                 {"", Approved, false},
20                 {"foo", Approved, true},
21         }
22         for _, tt := range tests {
23                 if d, err := ParseDraft(tt.in); d != tt.draft || (err != nil) != tt.err {
24                         t.Errorf("%q: was %v, %v; want %v, %v", tt.in, d, err != nil, tt.draft, tt.err)
25                 }
26         }
27 }