You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							22 lines
						
					
					
						
							277 B
						
					
					
				
			
		
		
		
			
			
			
		
		
	
	
							22 lines
						
					
					
						
							277 B
						
					
					
				| package util | |
| 
 | |
| import ( | |
| 	"github.com/stretchr/testify/assert" | |
| 	"testing" | |
| ) | |
| 
 | |
| func TestNewQueue(t *testing.T) { | |
| 
 | |
| 	q := NewQueue[int]() | |
| 
 | |
| 	for i := 0; i < 10; i++ { | |
| 		q.Enqueue(i) | |
| 	} | |
| 
 | |
| 	assert.Equal(t, q.Len(), 10) | |
| 
 | |
| 	for i := 0; i < 10; i++ { | |
| 		assert.Equal(t, q.Dequeue(), i) | |
| 	} | |
| 
 | |
| }
 |