| 
									
										
										
										
											2010-05-09 21:36:52 -04:00
										 |  |  | USING: tools.test namespaces assocs alien.syntax kernel | 
					
						
							| 
									
										
										
										
											2010-08-15 16:01:42 -04:00
										 |  |  | compiler.errors accessors alien alien.c-types ;
 | 
					
						
							| 
									
										
										
										
											2010-05-09 21:36:52 -04:00
										 |  |  | FROM: alien.libraries => add-library ;
 | 
					
						
							|  |  |  | IN: compiler.tests.linkage-errors | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ! Regression: calling an undefined function would raise a protection fault | 
					
						
							|  |  |  | FUNCTION: void this_does_not_exist ( ) ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ this_does_not_exist ] [ { "kernel-error" 9 f f } = ] must-fail-with | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ T{ no-such-symbol { name "this_does_not_exist" } } ] | 
					
						
							|  |  |  | [ \ this_does_not_exist linkage-errors get at error>> ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | << "no_such_library" "no_such_library" cdecl add-library >> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | LIBRARY: no_such_library | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | FUNCTION: void no_such_function ( ) ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ T{ no-such-library { name "no_such_library" } } ] | 
					
						
							|  |  |  | [ \ no_such_function linkage-errors get at error>> ] unit-test |