From 426c57eed9332433098b88eabc8c1b1437115281 Mon Sep 17 00:00:00 2001 From: Patrick Ellul Date: Mon, 3 Feb 2020 11:15:21 +1100 Subject: [PATCH] test for LastUsedNano panic (to bring coverage back to 100%) --- pool_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pool_test.go b/pool_test.go index 1df1486..1e2fe32 100644 --- a/pool_test.go +++ b/pool_test.go @@ -573,6 +573,7 @@ func TestResourcePanicsOnUsageWhenNotAcquired(t *testing.T) { assert.PanicsWithValue(t, "tried to hijack resource that is not acquired", res.Hijack) assert.PanicsWithValue(t, "tried to access resource that is not acquired or hijacked", func() { res.Value() }) assert.PanicsWithValue(t, "tried to access resource that is not acquired or hijacked", func() { res.CreationTime() }) + assert.PanicsWithValue(t, "tried to access resource that is not acquired or hijacked", func() { res.LastUsedNanotime() }) assert.PanicsWithValue(t, "tried to access resource that is not acquired or hijacked", func() { res.IdleDuration() }) }