OLD | NEW |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package ebnf | 5 package ebnf |
6 | 6 |
7 import ( | 7 import ( |
8 » "io"; | 8 » "io/ioutil"; |
9 "strings"; | 9 "strings"; |
10 "testing"; | 10 "testing"; |
11 ) | 11 ) |
12 | 12 |
13 | 13 |
14 var grammars = []string{ | 14 var grammars = []string{ |
15 `Program = . | 15 `Program = . |
16 `, | 16 `, |
17 | 17 |
18 `Program = foo . | 18 `Program = foo . |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 } | 58 } |
59 | 59 |
60 | 60 |
61 var files = []string{ | 61 var files = []string{ |
62 // TODO(gri) add some test files | 62 // TODO(gri) add some test files |
63 } | 63 } |
64 | 64 |
65 | 65 |
66 func TestFiles(t *testing.T) { | 66 func TestFiles(t *testing.T) { |
67 for _, filename := range files { | 67 for _, filename := range files { |
68 » » src, err := io.ReadFile(filename); | 68 » » src, err := ioutil.ReadFile(filename); |
69 if err != nil { | 69 if err != nil { |
70 t.Fatal(err) | 70 t.Fatal(err) |
71 } | 71 } |
72 check(t, filename, src); | 72 check(t, filename, src); |
73 } | 73 } |
74 } | 74 } |
OLD | NEW |