MCPcopy Create free account
hub / github.com/DoNewsCode/core / TestDag_AddVertex

Function TestDag_AddVertex

dag/dag_test.go:16–22  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

14)
15
16func TestDag_AddVertex(t *testing.T) {
17 dag := New()
18 dag.AddVertex(func(ctx context.Context) error { return nil }, WithName("foo"))
19 assert.Equal(t, dag.order(), 1)
20 dag.AddVertex(func(ctx context.Context) error { return nil })
21 assert.Equal(t, dag.order(), 2)
22}
23
24func TestDag_addEdge(t *testing.T) {
25 t.Run("normal addEdge", func(t *testing.T) {

Callers

nothing calls this directly

Calls 4

AddVertexMethod · 0.80
NewFunction · 0.70
WithNameFunction · 0.70
orderMethod · 0.65

Tested by

no test coverage detected