| 
									
										
										
										
											2009-02-08 23:39:22 -05:00
										 |  |  | ! Copyright (C) 2009 Daniel Ehrenberg. | 
					
						
							|  |  |  | ! See http://factorcode.org/license.txt for BSD license. | 
					
						
							|  |  |  | USING: math tools.test call kernel ;
 | 
					
						
							|  |  |  | IN: call.tests | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ 3 ] [ 1 2 [ + ] call( x y -- z ) ] unit-test | 
					
						
							|  |  |  | [ 1 2 [ + ] call( -- z ) ] must-fail | 
					
						
							|  |  |  | [ 1 2 [ + ] call( x y -- z a ) ] must-fail | 
					
						
							|  |  |  | [ 1 2 3 { 4 } ] [ 1 2 3 4 [ datastack nip ] call( x -- y ) ] unit-test | 
					
						
							|  |  |  | [ [ + ] call( x y -- z ) ] must-infer | 
					
						
							| 
									
										
										
										
											2009-02-09 01:33:30 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | [ 3 ] [ 1 2 \ + execute( x y -- z ) ] unit-test | 
					
						
							|  |  |  | [ 1 2 \ + execute( -- z ) ] must-fail | 
					
						
							|  |  |  | [ 1 2 \ + execute( x y -- z a ) ] must-fail | 
					
						
							|  |  |  | [ \ + execute( x y -- z ) ] must-infer |