当前位置: 首页>>代码示例>>Golang>>正文


Golang Step.Value方法代码示例

本文整理汇总了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)
	}
}
开发者ID:mattdotmatt,项目名称:gauge,代码行数:7,代码来源:conceptExtractor.go

示例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])
}
开发者ID:mattdotmatt,项目名称:gauge,代码行数:12,代码来源:conceptExtractor.go

示例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)
}
开发者ID:0-T-0,项目名称:gauge,代码行数:7,代码来源:specparser.go


注:本文中的github.com/getgauge/gauge/gauge.Step.Value方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。