| Index: go/src/infra/libs/git/child_test.go
|
| diff --git a/go/src/infra/libs/git/child_test.go b/go/src/infra/libs/git/child_test.go
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..35520548e9c0ed7acee04415d60ff28d08a67606
|
| --- /dev/null
|
| +++ b/go/src/infra/libs/git/child_test.go
|
| @@ -0,0 +1,24 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +package git
|
| +
|
| +import (
|
| + "fmt"
|
| + "testing"
|
| +
|
| + . "github.com/smartystreets/goconvey/convey"
|
| +)
|
| +
|
| +func TestNewEmptyChild(t *testing.T) {
|
| + t.Parallel()
|
| + Convey("NewEmptyChild", t, func() {
|
| + mode := Mode(040000)
|
| + hexpect := "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef"
|
| + c, err := NewEmptyChild(mode, MakeObjectID(hexpect))
|
| + So(err, ShouldBeNil)
|
| + So(c.Mode, ShouldEqual, mode)
|
| + So(c.String(), ShouldEqual, fmt.Sprintf("Child(EmptyObject(%s, tree), 0%0o)", hexpect, mode))
|
| + })
|
| +}
|
|
|