github.com/jingcheng-WU/gonum@v0.9.1-0.20210323123734-f1a2a11a8f7b/graph/path/internal/testgraphs/shortest_test.go (about)

     1  // Copyright ©2020 The Gonum Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package testgraphs
     6  
     7  import "testing"
     8  
     9  func TestVerifyShortestPathTests(t *testing.T) {
    10  	t.Parallel()
    11  	for _, test := range ShortestPathTests {
    12  		if len(test.WantPaths) != 1 && test.HasUniquePath {
    13  			t.Fatalf("%q: bad shortest path test: non-unique paths marked unique", test.Name)
    14  		}
    15  	}
    16  }