| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 package git |
| 6 |
| 7 import ( |
| 8 "testing" |
| 9 |
| 10 . "github.com/smartystreets/goconvey/convey" |
| 11 ) |
| 12 |
| 13 func TestEmptyObject(t *testing.T) { |
| 14 t.Parallel() |
| 15 |
| 16 db := MakeObjectID("deadbeefdeadbeefdeadbeefdeadbeefdeadbeef") |
| 17 |
| 18 Convey("EmptyObject", t, func() { |
| 19 for _, typ := range []string{"blob", "commit", "tree"} { |
| 20 typ := MakeObjectType(typ) |
| 21 Convey("NewEmptyObject("+typ.String()+")", func() { |
| 22 e := NewEmptyObject(typ, db) |
| 23 So(e, ShouldNotBeNil) |
| 24 So(e.Complete(), ShouldBeFalse) |
| 25 So(e.ID(), ShouldEqual, db) |
| 26 }) |
| 27 } |
| 28 }) |
| 29 |
| 30 } |
| OLD | NEW |