tests: add test for fix #cf7b45b
							parent
							
								
									da1c361cfe
								
							
						
					
					
						commit
						b578e60dd5
					
				|  | @ -0,0 +1,15 @@ | |||
| module main | ||||
| 
 | ||||
| import shapes { Point, Line } | ||||
| 
 | ||||
| // test that Point & Line work correctly
 | ||||
| // with struct init & array's
 | ||||
| fn test_imported_symbols() { | ||||
|     p0 := Point  {x: 10 y: 10} | ||||
|     p1 := Point  {x: 50 y: 10} | ||||
| 
 | ||||
|     _ := Line { | ||||
|         ps: [p0, p1] | ||||
|     } | ||||
| 
 | ||||
| } | ||||
|  | @ -0,0 +1,12 @@ | |||
| module shapes | ||||
| 
 | ||||
| pub struct Point { | ||||
| pub mut: | ||||
|     x   int | ||||
|     y   int | ||||
| } | ||||
| 
 | ||||
| pub struct Line { | ||||
| pub mut: | ||||
|     ps  []Point | ||||
| } | ||||
		Loading…
	
		Reference in New Issue