1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

test: remove t.Log()

This commit is contained in:
dudaodong
2023-04-26 14:59:45 +08:00
parent 581e338889
commit 4311b9ac66
14 changed files with 15 additions and 38 deletions

View File

@@ -254,7 +254,7 @@ func ExampleMTime() {
fmt.Println(err)
// Output:
// 1682391110
// 1682478195
// <nil>
}

View File

@@ -107,7 +107,7 @@ func TestReadFileToString(t *testing.T) {
_, err := f.WriteString("hello world")
if err != nil {
t.Log(err)
t.Error(err)
}
content, _ := ReadFileToString(path)
@@ -127,7 +127,7 @@ func TestClearFile(t *testing.T) {
_, err := f.WriteString("hello world")
if err != nil {
t.Log(err)
t.Error(err)
}
err = ClearFile(path)
@@ -151,7 +151,7 @@ func TestReadFileByLine(t *testing.T) {
_, err := f.WriteString("hello\nworld")
if err != nil {
t.Log(err)
t.Error(err)
}
expected := []string{"hello", "world"}
@@ -198,9 +198,9 @@ func TestFileMode(t *testing.T) {
CreateFile(srcFile)
mode, err := FileMode(srcFile)
assert.IsNil(err)
t.Log(mode)
assert.IsNotNil(mode)
assert.IsNil(err)
os.Remove(srcFile)
}
@@ -269,7 +269,7 @@ func TestMTime(t *testing.T) {
mtime, err := MTime("./testdata/test.txt")
assert.IsNil(err)
assert.Equal(int64(1682391110), mtime)
assert.Equal(int64(1682478195), mtime)
}
func TestSha(t *testing.T) {
@@ -289,7 +289,6 @@ func TestReadCsvFile(t *testing.T) {
assert := internal.NewAssert(t, "TestReadCsvFile")
content, err := ReadCsvFile("./testdata/test.csv")
t.Log(content)
assert.IsNil(err)