Fix linker, add e2e tests
This commit is contained in:
		
							parent
							
								
									cbea8660c2
								
							
						
					
					
						commit
						2e829bc8a9
					
				| @ -103,10 +103,10 @@ impl<'map> Pass for LinkerPass<'map> { | ||||
|             modules.insert(module.name.clone(), Rc::new(RefCell::new((module, tokens)))); | ||||
|         } | ||||
| 
 | ||||
|         // modules.insert(
 | ||||
|         //     "std".to_owned(),
 | ||||
|         //     Rc::new(RefCell::new(compile_std(&mut self.module_map)?)),
 | ||||
|         // );
 | ||||
|         modules.insert( | ||||
|             "std".to_owned(), | ||||
|             Rc::new(RefCell::new(compile_std(&mut self.module_map)?)), | ||||
|         ); | ||||
| 
 | ||||
|         let mut modules_to_process: Vec<Rc<RefCell<(Module, Vec<FullToken>)>>> = | ||||
|             modules.values().cloned().collect(); | ||||
|  | ||||
| @ -26,9 +26,10 @@ pub static FIBONACCI: &str = include_str!("../../reid_src/fibonacci.reid"); | ||||
| pub static HELLO_WORLD: &str = include_str!("../../reid_src/hello_world.reid"); | ||||
| pub static MUTABLE: &str = include_str!("../../reid_src/mutable.reid"); | ||||
| pub static STRINGS: &str = include_str!("../../reid_src/strings.reid"); | ||||
| pub static ARRAYS: &str = include_str!("../../reid_src/array.reid"); | ||||
| pub static STRUCTS: &str = include_str!("../../reid_src/struct.reid"); | ||||
| pub static ARRAY_STRUCTS: &str = include_str!("../../reid_src/array_structs.reid"); | ||||
| pub static BORROW: &str = include_str!("../../reid_src/borrow.reid"); | ||||
| pub static ARITHMETIC: &str = include_str!("../../reid_src/arithmetic.reid"); | ||||
| 
 | ||||
| #[test] | ||||
| fn array_compiles_well() { | ||||
| @ -69,3 +70,13 @@ fn struct_compiles_well() { | ||||
| fn array_structs_compiles_well() { | ||||
|     test(ARRAY_STRUCTS, "array_structs"); | ||||
| } | ||||
| 
 | ||||
| #[test] | ||||
| fn borrow_structs_compiles_well() { | ||||
|     test(BORROW, "borrow"); | ||||
| } | ||||
| 
 | ||||
| #[test] | ||||
| fn arithmetic_structs_compiles_well() { | ||||
|     test(ARITHMETIC, "arithmetic"); | ||||
| } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user