Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a failing test for time output based on encoding.TextMarshaler #17

Closed
wants to merge 1 commit into from

Conversation

cee-dub
Copy link
Collaborator

@cee-dub cee-dub commented Sep 30, 2014

Incomplete: needs implementation.

Review on Reviewable

func TestTime(t *testing.T) {
date := time.Date(2006, 1, 2, 3, 4, 5, .678901e9, time.Local)
d, _ := date.MarshalText()
s := fmt.Sprintf("%# v", Formatter(date))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could write this as Sprintf("%# v", date).

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OTOH, I guess all the other ones in this file already use fmt, so might as well be consistent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I won't have time to dive into a fix for this right away. Not a pain point for me, but I had the itch to at least reproduce it. Another dev on my team hit it once and also didn't provide steps to reproduce, so I had to scratch that itch.

On Sep 29, 2014, at 22:04, Keith Rarick notifications@github.com wrote:

In formatter_test.go:

@@ -259,3 +260,13 @@ func TestCycle(t *testing.T) {
*iv = *i
t.Logf("Example long interface cycle:\n%# v", Formatter(i))
}
+
+func TestTime(t *testing.T) {

  • date := time.Date(2006, 1, 2, 3, 4, 5, .678901e9, time.Local)
  • d, _ := date.MarshalText()
  • s := fmt.Sprintf("%# v", Formatter(date))
    I guess all the other ones in this file already use fmt, so might as well be consistent.


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants