File: copier_time_test.go

package info (click to toggle)
golang-github-mitchellh-copystructure 1.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 124 kB
  • sloc: makefile: 2
file content (17 lines) | stat: -rw-r--r-- 266 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package copystructure

import (
	"testing"
	"time"
)

func TestTimeCopier(t *testing.T) {
	v := time.Now().UTC()
	result, err := timeCopier(v)
	if err != nil {
		t.Fatalf("err: %s", err)
	}
	if result.(time.Time) != v {
		t.Fatalf("bad: %#v\n\n%#v", v, result)
	}
}