// Run the generator twice to ensure that it produces stable output.
Run the generator twice to ensure that it produces stable output.
// Run the generator twice to ensure that it produces stable output .
func TestOutputIsStable(t *testing.T) {
	for name, cfg := range configs {
		t.Run(name, func(t *testing.T) {
			a := assert.New(t)
			outputs1 := make(map[string][]byte)
			g1, err := newGenerationForTesting(cfg, outputs1)
			if !a.NoError(err) {
				return
			}
			a.NoError(g1.Execute())
			a.True(len(outputs1) > 0, "no outputs")
			outputs2 := make(map[string][]byte)
			g2, err := newGenerationForTesting(cfg, outputs2)
			if !a.NoError(err) {
				return
			}
			a.NoError(g2.Execute())
			a.True(len(outputs2) > 0, "no outputs")
			a.Equal(outputs1, outputs2)
		})
	}
}
func TestOutputIsStable ( t * testing . T ) { for name , cfg := range configs { t . Run ( name , func ( t * testing . T ) { a := assert . New ( t ) outputs1 := make ( map [ string ] [ ] byte ) g1 , err := newGenerationForTesting ( cfg , outputs1 ) if ! a . NoError ( err ) { return } a . NoError ( g1 . Execute ( ) ) a . True ( len ( outputs1 ) > 0 , " " ) outputs2 := make ( map [ string ] [ ] byte ) g2 , err := newGenerationForTesting ( cfg , outputs2 ) if ! a . NoError ( err ) { return } a . NoError ( g2 . Execute ( ) ) a . True ( len ( outputs2 ) > 0 , " " ) a . Equal ( outputs1 , outputs2 ) } ) } }
Run the generator twice to ensure that it produces stable output.
Run the generator twice to ensure that it produces stable output .