Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(198)

Unified Diff: foundation_test.go

Issue 5874049: use readable time stamps on log messages.
Patch Set: use readable time stamps on log messages. Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bootstrap_test.go ('k') | gocheck.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: foundation_test.go
=== modified file 'foundation_test.go'
--- foundation_test.go 2013-03-01 22:15:07 +0000
+++ foundation_test.go 2014-02-18 16:19:00 +0000
@@ -301,14 +301,9 @@
logger = log.New(os.Stderr, "", 0)
logger = c
logger.Output(0, "Hello there")
- expected := "\\[LOG\\] [.0-9]+ Hello there\n"
+ expected := `\[LOG\] [0-9]+:[0-9][0-9]\.[0-9][0-9][0-9] +Hello there\n`
output := c.GetTestLog()
- matched, err := regexp.MatchString(expected, output)
- if err != nil {
- c.Error("Bad expression: ", expected)
- } else if !matched {
- c.Error("Output() didn't log properly:\n", output)
- }
+ c.Assert(output, gocheck.Matches, expected)
}
// -----------------------------------------------------------------------
« no previous file with comments | « bootstrap_test.go ('k') | gocheck.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b