cairo_lang_filesystem/test_utils.rs
1use crate::db::init_files_group;
2
3// Test salsa database.
4#[salsa::db]
5#[derive(Clone)]
6pub struct FilesDatabaseForTesting {
7 storage: salsa::Storage<FilesDatabaseForTesting>,
8}
9
10#[salsa::db]
11impl salsa::Database for FilesDatabaseForTesting {}
12
13impl Default for FilesDatabaseForTesting {
14 fn default() -> Self {
15 let mut res = Self { storage: Default::default() };
16 init_files_group(&mut res);
17 res
18 }
19}