github.com/leeprovoost/terraform@v0.6.10-0.20160119085442-96f3f76118e7/config/lang/ast/literal_test.go (about) 1 package ast 2 3 import ( 4 "testing" 5 ) 6 7 func TestLiteralNodeType(t *testing.T) { 8 c := &LiteralNode{Typex: TypeString} 9 actual, err := c.Type(nil) 10 if err != nil { 11 t.Fatalf("err: %s", err) 12 } 13 if actual != TypeString { 14 t.Fatalf("bad: %s", actual) 15 } 16 }