pub fn compile_test_prepared_db(
    db: &RootDatabase,
    starknet: bool,
    main_crate_ids: Vec<CrateId>,
    test_crate_ids: Vec<CrateId>
) -> Result<TestCompilation>
Expand description

Runs Cairo compiler.

§Arguments

  • db - Preloaded compilation database.
  • starknet - Add the starknet contracts to the compiled tests.
  • main_crate_ids - CrateIds to compile. Use CrateLongId::Real(name).intern(db) in order to obtain CrateId from its name.
  • test_crate_ids - CrateIds to find tests cases in. Must be a subset of main_crate_ids.

§Returns

  • Ok(TestCompilation) - The compiled test cases with metadata.
  • Err(anyhow::Error) - Compilation failed.