Skip to content

arvind-murty/test-rewriter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

test-rewriter

This tool uses the go/ast package to rewrite the old t.Fatalf and t.Errorf testing formats to the new require and assert packages.

To run it on a particular file file_name.go, do ./fatal_rewriter file_name.go and ./error_rewriter file_name.go

Limitations

I do not think if statements with initialization clauses can be rewritten in this way because of scope issues.

Issues

Comments sometimes get moved inside the new require or assert statements.

TODO

Combine the two commands into one.

Deal with more complicated if statements involving || and &&.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages