diff --git a/tst/testinstall/syntaxtree.tst b/tst/testinstall/syntaxtree.tst index 2307e39559..9d654ce5cb 100644 --- a/tst/testinstall/syntaxtree.tst +++ b/tst/testinstall/syntaxtree.tst @@ -10,6 +10,13 @@ gap> SyntaxTree(x -> x); gap> SyntaxTree(\+); Error, SYNTAX_TREE: must be a plain GAP function (not a function) +gap> test_tree := function( f ) +> local curr_tree, new_func, new_tree; +> curr_tree := SYNTAX_TREE( f ); +> new_func := SYNTAX_TREE_CODE( curr_tree ); +> new_tree := SYNTAX_TREE( new_func ); +> return new_tree = curr_tree; +> end;; # Just try compiling all functions we can find in the workspace # to see nothing crashes. @@ -37,8 +44,7 @@ gap> testit := function(f) > local tree; > tree := SYNTAX_TREE(f); > Display(tree); -> # TODO: recode the tree, then decode again and compare -> return true; +> return test_tree( f ); > end;; # T_PROCCALL_0ARGS