コード例 #1
0
ファイル: buildsettings.go プロジェクト: boldfield/goxc
func (this BuildSettings) Equals(that BuildSettings) bool {
	return this.Processors == that.Processors &&
		this.Race == that.Race &&
		this.Verbose == that.Verbose &&
		this.PrintCommands == that.PrintCommands &&
		this.CcFlags == that.CcFlags &&
		this.Compiler == that.Compiler &&
		this.GccGoFlags == that.GccGoFlags &&
		this.GcFlags == that.GcFlags &&
		this.InstallSuffix == that.InstallSuffix &&
		this.LdFlags == that.LdFlags &&
		this.Tags == that.Tags &&
		typeutils.StringSliceEquals(this.ExtraArgs, that.ExtraArgs) &&
		((this.LdFlagsXVars == nil && that.LdFlagsXVars == nil) ||
			(this.LdFlagsXVars != nil && that.LdFlagsXVars != nil && typeutils.AreMapsEqual(*this.LdFlagsXVars, *that.LdFlagsXVars)))
}
コード例 #2
0
ファイル: cli_test.go プロジェクト: boldfield/goxc
func TestParseCliTasksAndSettings(t *testing.T) {
	for _, fixture := range fixtures {
		t.Logf("Fixture: %+v", fixture.Args)
		tasks, taskSettings, err := ParseCliTasksAndTaskSettings(fixture.Args)
		if err != fixture.ParseError {
			t.Errorf("Error: '%v' differs from expected: %v", err, fixture.ParseError)
		}
		t.Logf("Tasks: %v", tasks)
		if !typeutils.StringSliceEquals(tasks, fixture.Tasks) {
			t.Errorf("Tasks %v not equal to expected %v", tasks, fixture.Tasks)
		}
		t.Logf("TaskSettings: %v", taskSettings)

		if !typeutils.AreMapStringMapStringInterfacesEqual(taskSettings, fixture.TaskSettings) {
			t.Errorf("TaskSettings %v not equal to expected %v", taskSettings, fixture.TaskSettings)
		}
	}
}