mirror of
				https://github.com/coredns/coredns.git
				synced 2025-11-03 10:43:20 -05:00 
			
		
		
		
	
		
			
	
	
		
			12 lines
		
	
	
		
			178 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			12 lines
		
	
	
		
			178 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								package loop
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import "testing"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func TestLoop(t *testing.T) {
							 | 
						||
| 
								 | 
							
									l := New(".")
							 | 
						||
| 
								 | 
							
									l.inc()
							 | 
						||
| 
								 | 
							
									if l.seen() != 1 {
							 | 
						||
| 
								 | 
							
										t.Errorf("Failed to inc loop, expected %d, got %d", 1, l.seen())
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
								}
							 |