| 
									
										
										
										
											2008-05-30 19:16:51 -04:00
										 |  |  | IN: logging.tests | 
					
						
							| 
									
										
										
										
											2014-03-12 15:41:57 -04:00
										 |  |  | USING: tools.test logging logging.analysis logging.server io | 
					
						
							|  |  |  | io.files.temp math ;
 | 
					
						
							| 
									
										
										
										
											2008-05-30 19:16:51 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | : input-logging-test ( a b -- c ) + ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | \ input-logging-test NOTICE add-input-logging | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | : output-logging-test ( a b -- c ) + ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | \ output-logging-test DEBUG add-output-logging | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | : error-logging-test ( a b -- c ) / ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | \ error-logging-test ERROR add-error-logging | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-03-12 15:41:57 -04:00
										 |  |  | temp-directory [ | 
					
						
							|  |  |  |     "logging-test" [ | 
					
						
							|  |  |  |         [ 4 ] [ 1 3 input-logging-test ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         [ 4 ] [ 1 3 output-logging-test ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         [ 4/3 ] [ 4 3 error-logging-test ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         [ f ] [ 1 0 error-logging-test ] unit-test | 
					
						
							|  |  |  |     ] with-logging | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     [ ] [ "logging-test" { "input-logging-test" } analyze-log-file ] unit-test | 
					
						
							|  |  |  | ] with-log-root |