diff options
author | zelig <viktor.tron@gmail.com> | 2014-07-15 01:50:06 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2014-07-15 01:50:06 +0800 |
commit | 3d5db7288f134fef7e51b25776007705f6663654 (patch) | |
tree | edda6e8fd23584327473058411df9cd2c53241f4 /ethlog/loggers_test.go | |
parent | dc11b5c55e2888a7a3dac51fedc3864d112136ce (diff) | |
parent | 8845fb7eae3e51fd3e55c47c377bf1a9e0cfe2a9 (diff) | |
download | go-tangerine-3d5db7288f134fef7e51b25776007705f6663654.tar go-tangerine-3d5db7288f134fef7e51b25776007705f6663654.tar.gz go-tangerine-3d5db7288f134fef7e51b25776007705f6663654.tar.bz2 go-tangerine-3d5db7288f134fef7e51b25776007705f6663654.tar.lz go-tangerine-3d5db7288f134fef7e51b25776007705f6663654.tar.xz go-tangerine-3d5db7288f134fef7e51b25776007705f6663654.tar.zst go-tangerine-3d5db7288f134fef7e51b25776007705f6663654.zip |
merge upstream
Diffstat (limited to 'ethlog/loggers_test.go')
-rw-r--r-- | ethlog/loggers_test.go | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ethlog/loggers_test.go b/ethlog/loggers_test.go index 0e1c12e55..a9b1463e7 100644 --- a/ethlog/loggers_test.go +++ b/ethlog/loggers_test.go @@ -54,8 +54,9 @@ func TestLoggerPrintln(t *testing.T) { Flush() Reset() output := testLogSystem.Output + fmt.Println(quote(output)) if output != "[TEST] error\n[TEST] warn\n" { - t.Error("Expected logger output '[TEST] error\\n[TEST] warn\\n', got ", testLogSystem.Output) + t.Error("Expected logger output '[TEST] error\\n[TEST] warn\\n', got ", output) } } @@ -71,7 +72,7 @@ func TestLoggerPrintf(t *testing.T) { Reset() output := testLogSystem.Output if output != "[TEST] error to { 2}\n[TEST] warn" { - t.Error("Expected logger output '[TEST] error to { 2}\\n[TEST] warn', got ", testLogSystem.Output) + t.Error("Expected logger output '[TEST] error to { 2}\\n[TEST] warn', got ", output) } } @@ -88,10 +89,10 @@ func TestMultipleLogSystems(t *testing.T) { output0 := testLogSystem0.Output output1 := testLogSystem1.Output if output0 != "[TEST] error\n" { - t.Error("Expected logger 0 output '[TEST] error\\n', got ", testLogSystem0.Output) + t.Error("Expected logger 0 output '[TEST] error\\n', got ", output0) } if output1 != "[TEST] error\n[TEST] warn\n" { - t.Error("Expected logger 1 output '[TEST] error\\n[TEST] warn\\n', got ", testLogSystem1.Output) + t.Error("Expected logger 1 output '[TEST] error\\n[TEST] warn\\n', got ", output1) } } @@ -104,7 +105,6 @@ func TestFileLogSystem(t *testing.T) { logger.Errorf("error to %s\n", filename) logger.Warnln("warn") Flush() - Reset() contents, _ := ioutil.ReadFile(filename) output := string(contents) if output != "[TEST] error to test.log\n[TEST] warn\n" { @@ -117,7 +117,5 @@ func TestFileLogSystem(t *testing.T) { func TestNoLogSystem(t *testing.T) { logger := NewLogger("TEST") logger.Warnln("warn") - fmt.Println("1") Flush() - Reset() } |