mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-01 21:21:10 +00:00
Split cache between Python and Erg modules
This commit is contained in:
parent
5916096cc4
commit
5aae4a69a5
22 changed files with 521 additions and 258 deletions
|
@ -3,14 +3,22 @@ use erg_compiler::mod_cache::SharedModuleCache;
|
|||
|
||||
#[test]
|
||||
fn test_subtyping() -> Result<(), ()> {
|
||||
let context = Context::new_module("<module>", SharedModuleCache::new());
|
||||
let context = Context::new_module(
|
||||
"<module>",
|
||||
SharedModuleCache::new(),
|
||||
SharedModuleCache::new(),
|
||||
);
|
||||
context.test_refinement_subtyping()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_instantiation_and_generalization() -> Result<(), ()> {
|
||||
let context = Context::new_module("<module>", SharedModuleCache::new());
|
||||
let context = Context::new_module(
|
||||
"<module>",
|
||||
SharedModuleCache::new(),
|
||||
SharedModuleCache::new(),
|
||||
);
|
||||
context.test_instantiation_and_generalization()?;
|
||||
Ok(())
|
||||
}
|
||||
|
@ -33,7 +41,11 @@ fn test_resolve_trait_inner1() -> Result<(), ()> {
|
|||
|
||||
#[test]
|
||||
fn test_dir() -> Result<(), ()> {
|
||||
let context = Context::new_module("<module>", SharedModuleCache::new());
|
||||
let context = Context::new_module(
|
||||
"<module>",
|
||||
SharedModuleCache::new(),
|
||||
SharedModuleCache::new(),
|
||||
);
|
||||
let vars = context.dir();
|
||||
for (name, vi) in vars.into_iter() {
|
||||
println!("{name}: {vi}");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue