| 
									
										
										
										
											2008-06-11 03:58:38 -04:00
										 |  |  | IN: compiler.tests | 
					
						
							| 
									
										
										
										
											2008-06-30 04:57:00 -04:00
										 |  |  | USING: accessors compiler compiler.units tools.test math parser | 
					
						
							|  |  |  | kernel sequences sequences.private classes.mixin generic | 
					
						
							|  |  |  | definitions arrays words assocs ;
 | 
					
						
							| 
									
										
										
										
											2008-06-11 03:58:38 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | GENERIC: sheeple ( obj -- x )
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: object sheeple drop "sheeple" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | MIXIN: empty-mixin | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: empty-mixin sheeple drop "wake up" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | : sheeple-test ( -- string ) { } sheeple ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ "sheeple" ] [ sheeple-test ] unit-test | 
					
						
							| 
									
										
										
										
											2008-06-28 03:36:20 -04:00
										 |  |  | [ t ] [ \ sheeple-test compiled>> ] unit-test | 
					
						
							| 
									
										
										
										
											2008-06-11 03:58:38 -04:00
										 |  |  | [ t ] [ object \ sheeple method \ sheeple-test "compiled-uses" word-prop key? ] unit-test | 
					
						
							|  |  |  | [ f ] [ empty-mixin \ sheeple method \ sheeple-test "compiled-uses" word-prop key? ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ ] [ "IN: compiler.tests USE: arrays INSTANCE: array empty-mixin" eval ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ "wake up" ] [ sheeple-test ] unit-test | 
					
						
							|  |  |  | [ f ] [ object \ sheeple method \ sheeple-test "compiled-uses" word-prop key? ] unit-test | 
					
						
							|  |  |  | [ t ] [ empty-mixin \ sheeple method \ sheeple-test "compiled-uses" word-prop key? ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ ] [ [ array empty-mixin remove-mixin-instance ] with-compilation-unit ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ "sheeple" ] [ sheeple-test ] unit-test | 
					
						
							| 
									
										
										
										
											2008-06-28 03:36:20 -04:00
										 |  |  | [ t ] [ \ sheeple-test compiled>> ] unit-test | 
					
						
							| 
									
										
										
										
											2008-06-11 03:58:38 -04:00
										 |  |  | [ t ] [ object \ sheeple method \ sheeple-test "compiled-uses" word-prop key? ] unit-test | 
					
						
							|  |  |  | [ f ] [ empty-mixin \ sheeple method \ sheeple-test "compiled-uses" word-prop key? ] unit-test |