| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | USING: tuple-arrays sequences tools.test namespaces kernel math ;
 | 
					
						
							| 
									
										
										
										
											2008-03-08 05:27:19 -05:00
										 |  |  | IN: tuple-arrays.tests | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | SYMBOL: mat | 
					
						
							|  |  |  | TUPLE: foo bar ;
 | 
					
						
							|  |  |  | C: <foo> foo | 
					
						
							|  |  |  | [ 2 ] [ 2 T{ foo } <tuple-array> dup mat set length ] unit-test | 
					
						
							|  |  |  | [ T{ foo } ] [ mat get first ] unit-test | 
					
						
							|  |  |  | [ T{ foo f 1 } ] [ T{ foo 2 1 } 0 mat get [ set-nth ] keep first ] unit-test | 
					
						
							|  |  |  | [ t ] [ { T{ foo f 1 } T{ foo f 2 } } >tuple-array dup mat set tuple-array? ] unit-test | 
					
						
							|  |  |  | [ T{ foo f 3 } t ]  | 
					
						
							|  |  |  | [ mat get [ foo-bar 2 + <foo> ] map [ first ] keep tuple-array? ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ 2 ] [ 2 T{ foo t } <tuple-array> dup mat set length ] unit-test | 
					
						
							|  |  |  | [ T{ foo } ] [ mat get first ] unit-test | 
					
						
							|  |  |  | [ T{ foo 2 1 } ] [ T{ foo 2 1 } 0 mat get [ set-nth ] keep first ] unit-test |