MCPcopy Create free account
hub / github.com/beeker1121/goque / TestStackIncompatibleType

Function TestStackIncompatibleType

stack_test.go:55–67  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

53}
54
55func TestStackIncompatibleType(t *testing.T) {
56 file := fmt.Sprintf("test_db_%d", time.Now().UnixNano())
57 pq, err := OpenPriorityQueue(file, ASC)
58 if err != nil {
59 t.Error(err)
60 }
61 defer pq.Drop()
62 pq.Close()
63
64 if _, err = OpenStack(file); err != ErrIncompatibleType {
65 t.Error("Expected stack to return ErrIncompatibleTypes when opening goquePriorityQueue")
66 }
67}
68
69func TestStackPush(t *testing.T) {
70 file := fmt.Sprintf("test_db_%d", time.Now().UnixNano())

Callers

nothing calls this directly

Calls 4

OpenPriorityQueueFunction · 0.85
OpenStackFunction · 0.85
DropMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected