本文整理汇总了Golang中github.com/getgauge/gauge/gauge.Step.Value方法的典型用法代码示例。如果您正苦于以下问题:Golang Step.Value方法的具体用法?Golang Step.Value怎么用?Golang Step.Value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/getgauge/gauge/gauge.Step
的用法示例。
在下文中一共展示了Step.Value方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: addArgsFromTable
func addArgsFromTable(concept *gauge.Step, conceptName *string, args []string) {
for _, arg := range args {
concept.Value += " {}"
concept.Args = append(concept.Args, &gauge.StepArg{Value: arg, ArgType: gauge.Dynamic, Name: arg})
*conceptName += fmt.Sprintf(" <%s>", arg)
}
}
示例2: handleTable
func (self *extractor) handleTable(stepInConcept *gauge.Step, step *gauge_messages.Step) {
stepInConcept.Value += " {}"
specText := self.fileContent + step.GetTable()
spec, result := new(parser.SpecParser).Parse(specText, &gauge.ConceptDictionary{})
if !result.Ok {
self.errors = append(self.errors, result.ParseError)
return
}
stepArgs := []*gauge.StepArg{spec.Scenarios[0].Steps[0].Args[0]}
self.addTableAsParam(step, stepArgs)
stepInConcept.Args = append(stepInConcept.Args, stepArgs[0])
}
示例3: addInlineTableHeader
//Step value is modified when inline table is found to account for the new parameter by appending {}
//todo validate headers for dynamic
func addInlineTableHeader(step *gauge.Step, token *Token) {
step.Value = fmt.Sprintf("%s %s", step.Value, gauge.ParameterPlaceholder)
step.HasInlineTable = true
step.AddInlineTableHeaders(token.Args)
}