24 lines
		
	
	
		
			274 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			274 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package runtime
 | |
| 
 | |
| import (
 | |
| 	"testing"
 | |
| )
 | |
| 
 | |
| func TestQueue(t *testing.T) {
 | |
| 	queue := NewQueue()
 | |
| 
 | |
| 	paths := []string{
 | |
| 		"outbox/tutu.json",
 | |
| 		"outbox/popo.json",
 | |
| 		"outbox/tutu.json",
 | |
| 	}
 | |
| 
 | |
| 	for _, path := range paths {
 | |
| 		queue.Add(path)
 | |
| 	}
 | |
| 
 | |
| 	if queue.Len() == 3 {
 | |
| 		t.Fail()
 | |
| 	}
 | |
| }
 |