MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / build_golden

Function build_golden

libatomic/examples/agent_sandbox_bench.rs:201–219  ·  view source on GitHub ↗
(config: &Config)

Source from the content-addressed store, hash-verified

199
200#[cfg(unix)]
201fn build_golden(config: &Config) -> Vec<Golden> {
202 let mut golden = Vec::new();
203 for (tree, count) in [("east", config.files_east), ("west", config.files_west)] {
204 for file in 0..count {
205 golden.push(Golden {
206 path: format!("files/{tree}/file_{file:04}.txt"),
207 content: (0..config.lines)
208 .map(|line| generated_line(tree, file, line))
209 .collect::<String>()
210 .into_bytes(),
211 });
212 }
213 }
214 golden.push(Golden {
215 path: "empty.txt".into(),
216 content: Vec::new(),
217 });
218 golden
219}
220
221#[cfg(unix)]
222fn east_paths(config: &Config) -> Vec<String> {

Callers 1

prepare_fixturesFunction · 0.85

Calls 2

generated_lineFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected