update gen.go add some test