go-hep.org/x/hep@v0.38.1/xrootd/xrdio/xrdio_test.go (about)

     1  // Copyright ©2020 The go-hep 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 xrdio_test
     6  
     7  import (
     8  	"errors"
     9  	"os"
    10  	"testing"
    11  
    12  	"go-hep.org/x/hep/xrootd/xrdio"
    13  )
    14  
    15  func TestFileCloseNil(t *testing.T) {
    16  	var f *xrdio.File
    17  	err := f.Close()
    18  	if !errors.Is(err, os.ErrInvalid) {
    19  		t.Fatalf("invalid error: got=%v, want=%v", err, os.ErrInvalid)
    20  	}
    21  }