Skip to content

Commit

Permalink
Merge pull request #163 from erizocosmico/fix/windows
Browse files Browse the repository at this point in the history
fix windows tests and behaviour
  • Loading branch information
Miguel Molina authored May 16, 2017
2 parents 8c64e54 + b771a39 commit df7d54f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: build-{build}.{branch}
platform: x64

clone_folder: c:\gopath\src\gopkg.in\src-d\go-kallax.v1

shallow_clone: true

environment:
Expand Down
2 changes: 1 addition & 1 deletion generator/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ func castSlice(f *Field) (cast string, ok bool) {

func typeString(ty types.Type, pkg *types.Package) string {
ret := types.TypeString(ty, types.RelativeTo(pkg))
parts := strings.Split(ret, "/")
parts := strings.Split(ret, string(separator))
prefix := ""
if len(parts) > 1 {
for _, r := range parts[0] {
Expand Down
4 changes: 3 additions & 1 deletion timestamps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package kallax

import (
"testing"
"time"

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

createdAt := ts.CreatedAt
updatedAt := ts.CreatedAt
updatedAt := ts.UpdatedAt
time.Sleep(50 * time.Millisecond)
s.NoError(ts.BeforeSave())
s.Equal(createdAt, ts.CreatedAt)
s.NotEqual(updatedAt, ts.UpdatedAt)
Expand Down

0 comments on commit df7d54f

Please sign in to comment.