()
| 340 | "expected Halted(42), got {:?}; uart: {}", |
| 341 | run.outcome, |
| 342 | run.uart_output |
| 343 | ); |
| 344 | } |
| 345 | |
| 346 | // An exported generic aggregate and a generic function over it specialize in the |
| 347 | // importer at a type argument the provider never names. |
| 348 | #[test] |
| 349 | fn imported_generic_struct_specializes_in_the_importer() { |
| 350 | let mut pipeline = CompilationPipeline::new(); |
| 351 | pipeline.set_write_artifacts(false); |
| 352 | pipeline.set_module_resolver(Some(Box::new(|name: &str| { |
| 353 | (name == "boxlib").then(|| { |
| 354 | "export struct Box<T> { value: T } |
| 355 | export unwrap: <T>(holder: Box<T>*) -> T { return holder.value } |
| 356 | " |
| 357 | .to_owned() |
| 358 | }) |
| 359 | }))); |
| 360 | |
| 361 | let primary = r#" |
| 362 | boxlib := import("boxlib") |
nothing calls this directly
no test coverage detected