Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed test version check error to fatal in acronym, see #470 #478

Merged
merged 2 commits into from
Feb 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion exercises/acronym/acronym_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var stringTestCases = []testCase{

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

Expand Down
16 changes: 8 additions & 8 deletions exercises/all-your-base/all_your_base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package allyourbase

import "testing"

const targetTestVersion = 1

// Note: ConvertToBase should accept leading zeroes in its input,
// but never emit leading zeroes in its output.
// Exception: If the value of the output is zero, represent it with a single zero.
Expand Down Expand Up @@ -154,6 +156,12 @@ func digitsEqual(a, b []uint64) bool {
return true
}

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

func TestConvertToBase(t *testing.T) {
for _, c := range testCases {
output, err := ConvertToBase(c.inputBase, c.inputDigits, c.outputBase)
Expand All @@ -175,11 +183,3 @@ func TestConvertToBase(t *testing.T) {
}
}
}

const targetTestVersion = 1

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