Skip to content

Commit df7d54f

Browse files
author
Miguel Molina
authored
Merge pull request #163 from erizocosmico/fix/windows
fix windows tests and behaviour
2 parents 8c64e54 + b771a39 commit df7d54f

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ version: build-{build}.{branch}
22
platform: x64
33

44
clone_folder: c:\gopath\src\gopkg.in\src-d\go-kallax.v1
5+
56
shallow_clone: true
67

78
environment:

generator/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ func castSlice(f *Field) (cast string, ok bool) {
892892

893893
func typeString(ty types.Type, pkg *types.Package) string {
894894
ret := types.TypeString(ty, types.RelativeTo(pkg))
895-
parts := strings.Split(ret, "/")
895+
parts := strings.Split(ret, string(separator))
896896
prefix := ""
897897
if len(parts) > 1 {
898898
for _, r := range parts[0] {

timestamps_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package kallax
22

33
import (
44
"testing"
5+
"time"
56

67
"github.com/stretchr/testify/require"
78
)
@@ -18,7 +19,8 @@ func TestTimestampsBeforeSave(t *testing.T) {
1819
s.False(ts.UpdatedAt.IsZero())
1920

2021
createdAt := ts.CreatedAt
21-
updatedAt := ts.CreatedAt
22+
updatedAt := ts.UpdatedAt
23+
time.Sleep(50 * time.Millisecond)
2224
s.NoError(ts.BeforeSave())
2325
s.Equal(createdAt, ts.CreatedAt)
2426
s.NotEqual(updatedAt, ts.UpdatedAt)

0 commit comments

Comments
 (0)