diff options
| author | Carlos Martín Nieto <[email protected]> | 2014-03-19 03:51:59 +0100 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2014-03-19 03:58:02 +0100 |
| commit | b82a72a9ce4701a4560288c4ebf1511ffb415b80 (patch) | |
| tree | 1b9f3b6649170bbd4c4b6f74c55587f505f498b9 /git_test.go | |
| parent | 0bb73e43a8f26be8608cdd304d73cacb05753417 (diff) | |
Oid: fix IsZero()
We need to compare against the number zero, not its ASCII value.
Diffstat (limited to 'git_test.go')
| -rw-r--r-- | git_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/git_test.go b/git_test.go index fff3c6c..6542ca0 100644 --- a/git_test.go +++ b/git_test.go @@ -54,3 +54,11 @@ func seedTestRepo(t *testing.T, repo *Repository) (*Oid, *Oid) { return commitId, treeId } + +func TestOidZero(t *testing.T) { + var zeroId Oid + + if !zeroId.IsZero() { + t.Error("Zero Oid is not zero") + } +} |
