Path to a golden file.
(prefix: &str, name: &str, ext: &str)
| 9 | |
| 10 | /// Path to a golden file. |
| 11 | fn path(prefix: &str, name: &str, ext: &str) -> String { |
| 12 | // All files will have the same name but different extension. |
| 13 | // They should be under `fendermint/vm/message/golden`. |
| 14 | let path = Path::new("golden").join(prefix).join(name); |
| 15 | format!("{}.{}", path.display(), ext) |
| 16 | } |
| 17 | |
| 18 | /// Read the contents of an existing golden file, or create it by turning `fallback` into string first. |
| 19 | fn read_or_create<T>( |