| // Copyright 2017 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. |
| func TestTitleDir(t *testing.T) { |
| {" cmd/compile , cmd/go: do awesome things", []string{"cmd/compile", "cmd/go"}}, |
| {"cmd/compile: cleanup MOVaddr code generation", []string{"cmd/compile"}}, |
| {`cmd/asm, cmd/internal/obj/s390x, math: add "test under mask" instructions`, |
| []string{"cmd/asm", "cmd/internal/obj/s390x", "math"}}, |
| for _, tc := range testcases { |
| if len(r) != len(tc.dirs) { |
| t.Fatalf("titleDirs(%q) = %v (%d); want %d length", tc.title, r, len(r), len(tc.dirs)) |
| t.Errorf("titleDirs[%d](%v) != tc.dirs[%d](%q)", i, r[i], i, tc.dirs[i]) |