// newModelFixture is a test utility to build a new test plan for a spec file.
// The returned structure may be then used to add runs and expectations to each run.
newModelFixture is a test utility to build a new test plan for a spec file.
The returned structure may be then used to add runs and expectations to each run.
// newModelFixture is a test utility to build a new test plan for a spec file . // The returned structure may be then used to add runs and expectations to each run .
func newModelFixture(specFile string, description string) *modelFixture {
	for _, fix := range testedModels {
		if fix.SpecFile == specFile {
			return fix
		}
	}
	runs := make([]*modelTestRun, 0, 2)
	fix := &modelFixture{
		SpecFile:    specFile,
		Description: description,
		Runs:        runs,
	}
	testedModels = append(testedModels, fix)
	return fix
}
func newModelFixture ( specFile string , description string ) * modelFixture { for _ , fix := range testedModels { if fix . SpecFile == specFile { return fix } } runs := make ( [ ] * modelTestRun , 0 , 2 ) fix := & modelFixture { SpecFile : specFile , Description : description , Runs : runs , } testedModels = append ( testedModels , fix ) return fix }
newModelFixture is a test utility to build a new test plan for a spec file.
newModelFixture is a test utility to build a new test plan for a spec file .
// lookup if already here