Create a test backend with embedded class and function stubs pre-loaded.
()
| 71 | |
| 72 | /// Create a test backend with embedded class and function stubs pre-loaded. |
| 73 | fn create_fixture_backend() -> Backend { |
| 74 | let mut class_stubs: HashMap<&'static str, &'static str> = HashMap::new(); |
| 75 | class_stubs.insert("UnitEnum", UNIT_ENUM_STUB); |
| 76 | class_stubs.insert("BackedEnum", BACKED_ENUM_STUB); |
| 77 | |
| 78 | let mut func_stubs: HashMap<&'static str, &'static str> = HashMap::new(); |
| 79 | func_stubs.insert("array_reduce", ARRAY_FUNC_STUB); |
| 80 | func_stubs.insert("array_sum", ARRAY_FUNC_STUB); |
| 81 | func_stubs.insert("array_product", ARRAY_FUNC_STUB); |
| 82 | |
| 83 | Backend::new_test_with_all_stubs(class_stubs, func_stubs, HashMap::new()) |
| 84 | } |
| 85 | |
| 86 | // ─── Fixture parsing ──────────────────────────────────────────────────────── |
| 87 |
no test coverage detected