MCPcopy Create free account
hub / github.com/NVIDIA/nvcf / writeTestFile

Function writeTestFile

tools/collect-dependencies/main_test.go:248–256  ·  view source on GitHub ↗
(t *testing.T, path, content string)

Source from the content-addressed store, hash-verified

246
247 got := parseCargoTOML(filepath.Join(tmp, "crates", "app", "Cargo.toml"))
248 for _, want := range []string{"anyhow =1.0.102", "serde 1.0", "internal", "local-only"} {
249 if _, ok := got[want]; !ok {
250 t.Fatalf("parseCargoTOML missing %q from %#v", want, got)
251 }
252 }
253}
254
255func TestParseCargoTOMLStopsAtPathOnlyWorkspaceRoot(t *testing.T) {
256 tmp := t.TempDir()
257 writeTestFile(t, filepath.Join(tmp, "Cargo.toml"), `[workspace]
258members = ["repo"]
259

Calls 2

HelperMethod · 0.80
FatalfMethod · 0.45

Tested by

no test coverage detected