From afb83c0bde51b62574f8f77c678b75fdba1dc736 Mon Sep 17 00:00:00 2001 From: z7zmey Date: Sat, 10 Feb 2018 11:46:18 +0200 Subject: [PATCH] ConstantFetch tests --- node/expr/t_const_fetch_test.go | 75 ++++++++++ php5/php5.go | 244 +++++++++++++++++--------------- php5/php5.y | 30 ++-- 3 files changed, 224 insertions(+), 125 deletions(-) create mode 100644 node/expr/t_const_fetch_test.go diff --git a/node/expr/t_const_fetch_test.go b/node/expr/t_const_fetch_test.go new file mode 100644 index 0000000..df70b62 --- /dev/null +++ b/node/expr/t_const_fetch_test.go @@ -0,0 +1,75 @@ +package expr_test + +import ( + "bytes" + "testing" + + "github.com/z7zmey/php-parser/node/name" + "github.com/z7zmey/php-parser/php5" + + "github.com/z7zmey/php-parser/node/expr" + + "github.com/z7zmey/php-parser/node" + "github.com/z7zmey/php-parser/node/stmt" + "github.com/z7zmey/php-parser/php7" +) + +func TestConstFetch(t *testing.T) { + src := `