11package period
22
33import (
4- "github.com/stretchr/testify/assert"
54 "testing"
65 "time"
6+
7+ "github.com/stretchr/testify/assert"
78)
89
910func TestNewPeriod (t * testing.T ) {
@@ -25,8 +26,8 @@ func TestNewPeriod(t *testing.T) {
2526 boundaryType : IncludeAll ,
2627 },
2728 want : Period {
28- startDate : time .Date (2023 , 1 , 1 , 0 , 0 , 0 , 0 , time .Local ),
29- endDate : time .Date (2023 , 1 , 2 , 0 , 0 , 0 , 0 , time .Local ),
29+ startDate : time .Date (2023 , 1 , 2 , 0 , 0 , 0 , 0 , time .Local ),
30+ endDate : time .Date (2023 , 1 , 1 , 0 , 0 , 0 , 0 , time .Local ),
3031 boundaryType : IncludeAll ,
3132 },
3233 },
@@ -83,8 +84,8 @@ func TestNewDefaultPeriod(t *testing.T) {
8384 endDate : time .Date (2023 , 1 , 1 , 0 , 0 , 0 , 0 , time .Local ),
8485 },
8586 want : Period {
86- startDate : time .Date (2023 , 1 , 1 , 0 , 0 , 0 , 0 , time .Local ),
87- endDate : time .Date (2023 , 1 , 2 , 0 , 0 , 0 , 0 , time .Local ),
87+ startDate : time .Date (2023 , 1 , 2 , 0 , 0 , 0 , 0 , time .Local ),
88+ endDate : time .Date (2023 , 1 , 1 , 0 , 0 , 0 , 0 , time .Local ),
8889 boundaryType : IncludeStartExcludeEnd ,
8990 },
9091 },
@@ -128,8 +129,8 @@ func TestNewIncludeAllPeriod(t *testing.T) {
128129 endDate : time .Date (2023 , 1 , 1 , 0 , 0 , 0 , 0 , time .Local ),
129130 },
130131 want : Period {
131- startDate : time .Date (2023 , 1 , 1 , 0 , 0 , 0 , 0 , time .Local ),
132- endDate : time .Date (2023 , 1 , 2 , 0 , 0 , 0 , 0 , time .Local ),
132+ startDate : time .Date (2023 , 1 , 2 , 0 , 0 , 0 , 0 , time .Local ),
133+ endDate : time .Date (2023 , 1 , 1 , 0 , 0 , 0 , 0 , time .Local ),
133134 boundaryType : IncludeAll ,
134135 },
135136 },
0 commit comments