1 // Copyright 2020 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 copyright 6 7 import ( 8 "strings" 9 "testing" 10 ) 11 12 func TestToolsCopyright(t *testing.T) { 13 files, err := checkCopyright("..") 14 if err != nil { 15 t.Fatal(err) 16 } 17 if len(files) > 0 { 18 t.Errorf("The following files are missing copyright notices:\n%s", strings.Join(files, "\n")) 19 } 20 } 21