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{`([^\s]+)`})
	s.AddParameterTypes(`{text}`, []string{`"([^"\\]*(?:\\.[^"\\]*)*)"`, `'([^'\\]*(?:\\.[^'\\]*)*)'`})

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.