Skip to content

Commit

Permalink
Updated bracket push to match new tests and naming
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasZumsteg committed Jan 21, 2016
1 parent de9bce0 commit 615cd62
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package bracket_push
package brackets

//bracketType sorts characters into either opening, closing, or not a bracket
type bracketType int

//TestVersion is the version of unit tests that this will pass
const TestVersion = 2

const (
openBracket bracketType = iota
closeBracket
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package bracket_push
package brackets

import (
"testing"
)

const testVersion = 2

var testCases = []struct {
input string
expected bool
Expand Down Expand Up @@ -58,6 +60,9 @@ func TestBracket(t *testing.T) {
tt.input, tt.expected, actual)
}
}
if TestVersion != testVersion {
t.Fatalf("Found TestVersion = %v, want %v.", TestVersion, testVersion)
}
}

func BenchmarkBracket(b *testing.B) {
Expand Down

0 comments on commit 615cd62

Please sign in to comment.