mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 10:00:44 -05:00
Move dag/ to internal/dag/
This is part of a general effort to move all of Terraform's non-library package surface under internal in order to reinforce that these are for internal use within Terraform only. If you were previously importing packages under this prefix into an external codebase, you could pin to an earlier release tag as an interim solution until you've make a plan to achieve the same functionality some other way.
This commit is contained in:
26
internal/dag/edge_test.go
Normal file
26
internal/dag/edge_test.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package dag
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestBasicEdgeHashcode(t *testing.T) {
|
||||
e1 := BasicEdge(1, 2)
|
||||
e2 := BasicEdge(1, 2)
|
||||
if e1.Hashcode() != e2.Hashcode() {
|
||||
t.Fatalf("bad")
|
||||
}
|
||||
}
|
||||
|
||||
func TestBasicEdgeHashcode_pointer(t *testing.T) {
|
||||
type test struct {
|
||||
Value string
|
||||
}
|
||||
|
||||
v1, v2 := &test{"foo"}, &test{"bar"}
|
||||
e1 := BasicEdge(v1, v2)
|
||||
e2 := BasicEdge(v1, v2)
|
||||
if e1.Hashcode() != e2.Hashcode() {
|
||||
t.Fatalf("bad")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user