Debian Codegraph @

osfs/mmap_file_assert_other_test.go

raw symbols SCIP
1 //go:build !darwin && !linux && !wasm
2
3 package osfs
4
5 import (
6 "testing"
7
8 "github.com/go-git/go-billy/v6"
9 "github.com/stretchr/testify/require"
10 )
11
12 func assertMmapBackingWhenAvailable(t *testing.T, f billy.File) {
13 t.Helper()
14 // mmap is unavailable on this platform; WithMmap is honoured as
15 // best-effort and falls through to the fd-backed wrapper.
16 _, ok := f.(*file)
17 require.True(t, ok, "platform has no mmap path, expected *file, got %T", f)
18 }