Skip to content

Commit

Permalink
pass test
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhub committed Jan 31, 2019
1 parent f40546d commit 842758d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
Binary file modified bin/chio-darwin-64
Binary file not shown.
Binary file added bin/chio-linux-64
Binary file not shown.
4 changes: 0 additions & 4 deletions pkg/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ type Module struct {
func NewModule(rootPath string) *Module {
absPath, _ := filepath.Abs(rootPath)
return &Module{
<<<<<<< HEAD
RootPath: absPath + "/", // module dir path end with '/'
=======
RootPath: absPath,
>>>>>>> 7cae6a0c7f1057cbc163dd35969511074d6f8c1e
SourceFiles: EmptySourceFiles(),
}
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func TestModule_AddSourceFile_FirstTimeAddFileToEmptyModule(t *testing.T) {

err := emptyModule.AddSourceFile(file)
assert.Nil(t, err)
assert.Equal(t, "/home/user/go/src/sample", emptyModule.RootPath)
assert.Equal(t, "/home/user/go/src/sample/", emptyModule.RootPath)
}

func TestModule_AddSourceFile_AddFileToExistedModule(t *testing.T) {
Expand All @@ -24,7 +24,7 @@ func TestModule_AddSourceFile_AddFileToExistedModule(t *testing.T) {
err := emptyModule.AddSourceFile(file1)
err = emptyModule.AddSourceFile(file2)
assert.Nil(t, err)
assert.Equal(t, "/home/user/go/src/sample", emptyModule.RootPath)
assert.Equal(t, "/home/user/go/src/sample/", emptyModule.RootPath)
}

func TestModule_GetSourceFilesPath(t *testing.T) {
Expand Down

0 comments on commit 842758d

Please sign in to comment.