Sha256: 69a93d8704a25c62f587915a8c0dbbe32d2cdc086b08dff24e8de52f323efb7d

Contents?: true

Size: 882 Bytes

Versions: 177

Compression:

Stored size: 882 Bytes

Contents

package meetup

import "testing"

/* API
package meetup
type Weekschedule
WeekSchedule First
WeekSchedule Second
WeekSchedule Third
WeekSchedule Fourth
WeekSchedule Last
WeekSchedule Teenth
func Day(WeekSchedule, time.Weekday, time.Month, int) int
*/

const targetTestVersion = 3

var weekName = map[WeekSchedule]string{
	First:  "first",
	Second: "second",
	Third:  "third",
	Fourth: "fourth",
	Teenth: "teenth",
	Last:   "last",
}

func TestTestVersion(t *testing.T) {
	if testVersion != targetTestVersion {
		t.Fatalf("Found testVersion = %v, want %v", testVersion, targetTestVersion)
	}
}

func TestDay(t *testing.T) {
	for _, test := range testCases {
		res := Day(test.week, test.weekday, test.month, test.year)
		if res != test.expDay {
			t.Fatalf("For %s %s of %s 2013 got date of %d, want %d",
				weekName[test.week], test.weekday, test.month, res, test.expDay)
		}
	}
}

Version data entries

177 entries across 177 versions & 1 rubygems

Version Path
trackler-2.2.1.56 tracks/go/exercises/meetup/meetup_test.go
trackler-2.2.1.55 tracks/go/exercises/meetup/meetup_test.go
trackler-2.2.1.54 tracks/go/exercises/meetup/meetup_test.go
trackler-2.2.1.53 tracks/go/exercises/meetup/meetup_test.go
trackler-2.2.1.52 tracks/go/exercises/meetup/meetup_test.go
trackler-2.2.1.51 tracks/go/exercises/meetup/meetup_test.go
trackler-2.2.1.50 tracks/go/exercises/meetup/meetup_test.go
trackler-2.2.1.49 tracks/go/exercises/meetup/meetup_test.go
trackler-2.2.1.48 tracks/go/exercises/meetup/meetup_test.go
trackler-2.2.1.47 tracks/go/exercises/meetup/meetup_test.go
trackler-2.2.1.46 tracks/go/exercises/meetup/meetup_test.go
trackler-2.2.1.45 tracks/go/exercises/meetup/meetup_test.go
trackler-2.2.1.44 tracks/go/exercises/meetup/meetup_test.go
trackler-2.2.1.43 tracks/go/exercises/meetup/meetup_test.go
trackler-2.2.1.42 tracks/go/exercises/meetup/meetup_test.go
trackler-2.2.1.41 tracks/go/exercises/meetup/meetup_test.go
trackler-2.2.1.40 tracks/go/exercises/meetup/meetup_test.go
trackler-2.2.1.39 tracks/go/exercises/meetup/meetup_test.go
trackler-2.2.1.38 tracks/go/exercises/meetup/meetup_test.go
trackler-2.2.1.37 tracks/go/exercises/meetup/meetup_test.go