(t *testing.T)
| 259 | } |
| 260 | |
| 261 | func TestSemaphoreAcquireNonBlockingHasNoCapacity(t *testing.T) { |
| 262 | sem := newSemaphore(1, 0) |
| 263 | if sem.tryAcquire() { |
| 264 | t.Error("Should have failed immediately") |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | // Test empty semaphore, add capacity, token can be acquired |
| 269 | func TestSemaphoreAcquireHasCapacity(t *testing.T) { |
nothing calls this directly
no test coverage detected