github.com/johnnyeven/libtools@v0.0.0-20191126065708-61829c1adf46/codegen/gen_test.go (about)

     1  package codegen
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  type GenDemo struct {
     8  }
     9  
    10  func (demo *GenDemo) Load(cwd string) {
    11  }
    12  
    13  func (demo *GenDemo) Pick() {
    14  }
    15  
    16  func (demo *GenDemo) Output(cwd string) Outputs {
    17  	return Outputs{
    18  		"./doc_test.go": `
    19  		package codegen
    20  
    21  		func Test(t *testing.T) {
    22  		}
    23  		`,
    24  	}
    25  }
    26  
    27  func TestGenerate(t *testing.T) {
    28  	genDemo := GenDemo{}
    29  	Generate(&genDemo)
    30  }