github.com/cockroachdb/cockroachdb-parser@v0.23.3-0.20240213214944-911057d40c9a/parser_test.go (about) 1 package main 2 3 import ( 4 "testing" 5 6 "github.com/cockroachdb/cockroachdb-parser/pkg/sql/parser" 7 "github.com/cockroachdb/cockroachdb-parser/pkg/sql/sem/tree" 8 "github.com/stretchr/testify/require" 9 ) 10 11 func TestParser(t *testing.T) { 12 p, err := parser.ParseOne("CREATE TABLE t (a TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP)") 13 require.NoError(t, err) 14 f := tree.DefaultPrettyCfg() 15 f.Pretty(p.AST) 16 }