Add failing loop edge case example
This commit is contained in:
		
							parent
							
								
									3ebe16b80b
								
							
						
					
					
						commit
						1a5823c59c
					
				| @ -1,10 +0,0 @@ | ||||
| import a2::Foo; | ||||
| import a2::A; | ||||
| import a2::AResult; | ||||
| 
 | ||||
| fn main() -> i32 { | ||||
|     let foo = Foo {}; | ||||
|     let a = A::new(); | ||||
|     foo.foo(&a.a); | ||||
|     return 0; | ||||
| } | ||||
| @ -1,7 +0,0 @@ | ||||
| fn main() -> i32 { | ||||
|     let a = 4f32; | ||||
|     if (a % 2) == 0 { | ||||
|         return 1; | ||||
|     } | ||||
|     return 0; | ||||
| } | ||||
| @ -32,6 +32,7 @@ fn main() -> u32 { | ||||
|     print(from_str("i32: ") + i32::test(54) as u64); | ||||
|     print(from_str("sizeof i32: ") + i32::sizeof()); | ||||
| 
 | ||||
| 
 | ||||
|     let nullptr = i32::null(); | ||||
|     let mut list = u64::malloc(15); | ||||
|     list[4] = 17; | ||||
|  | ||||
							
								
								
									
										10
									
								
								examples/compilcated_main.reid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								examples/compilcated_main.reid
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | ||||
| import complicated_imported::Foo; | ||||
| import complicated_imported::A; | ||||
| import complicated_imported::AResult; | ||||
| 
 | ||||
| fn main() -> i32 { | ||||
|     let foo = Foo {}; | ||||
|     let a = A::new(); | ||||
|     foo.foo(&a.a); | ||||
|     return 0; | ||||
| } | ||||
							
								
								
									
										9
									
								
								examples/loop_edge_case.reid
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								examples/loop_edge_case.reid
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,9 @@ | ||||
| fn main() -> i32 { | ||||
|     for i in 0..1 { | ||||
|         let j = i; | ||||
|         if i != j { | ||||
|             return 1; | ||||
|         } | ||||
|     } | ||||
|     return 0; | ||||
| } | ||||
| @ -60,7 +60,7 @@ impl LanguageServer for Backend { | ||||
|         let capabilities = ServerCapabilities { | ||||
|             hover_provider: Some(HoverProviderCapability::Simple(true)), | ||||
|             completion_provider: Some(CompletionOptions { | ||||
|                 trigger_characters: Some(vec![".".to_string(), "::".to_string()]), | ||||
|                 trigger_characters: None, | ||||
|                 all_commit_characters: None, | ||||
|                 completion_item: Some(lsp_types::CompletionOptionsCompletionItem { | ||||
|                     label_details_support: Some(true), | ||||
|  | ||||
| @ -169,3 +169,8 @@ fn mutable_inner_functions() { | ||||
| fn cpu_raytracer_compiles() { | ||||
|     test_compile(include_str!("../../examples/cpu_raytracer.reid"), "test"); | ||||
| } | ||||
| 
 | ||||
| #[test] | ||||
| fn loop_edge_case_functions() { | ||||
|     test(include_str!("../../examples/loop_edge_case.reid"), "test", Some(0)); | ||||
| } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user