Parameter types

GoBDD has support for parameter types. There are a few predefined parameter types:

You can add your own parameter types using AddParameterTypes() function. Here are a few examples

    s := gobdd.NewSuite(t)
	s.AddParameterTypes(`{int}`, []string{`(\d)`})
	s.AddParameterTypes(`{float}`, []string{`([-+]?\d*\.?\d*)`})
	s.AddParameterTypes(`{word}`, []string{`([\d\w]+)`})
	s.AddParameterTypes(`{text}`, []string{`"([\d\w\-\s]+)"`, `'([\d\w\-\s]+)'`})

The first argument accepts the parameter types. As the second parameter provides list of regular expressions that should replace the parameter.

Parameter types should be added Before adding any step.