Skip to content

Commit

Permalink
github.com/dromara/carbon -> github.com/dromara/carbon
Browse files Browse the repository at this point in the history
  • Loading branch information
gouguoyin committed Nov 24, 2024
1 parent 44bd697 commit 21b4a2f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion difference_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ func TestCarbon_DiffForHumans(t *testing.T) {

}

// https://github.com/golang-module/carbon/issues/255
// https://github.com/dromara/carbon/issues/255
func TestCarbon_Issue255(t *testing.T) {
tests := []struct {
name string
Expand Down
20 changes: 10 additions & 10 deletions parser_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@ func TestCarbon_ParseByLayout(t *testing.T) {
}
}

func TestError_ParseByLayout(t *testing.T) {
assert.NotNil(t, ParseByLayout("2020-08-05", "2006-03-04", "xxx").Error, "It should catch an exception in ParseByLayout")
assert.NotNil(t, ParseByLayout("xxx", "2006-03-04", PRC).Error, "It should catch an exception in ParseByLayout")
}

func TestError_ParseByFormat(t *testing.T) {
assert.NotNil(t, ParseByFormat("2020-08-05", "Y-m-d", "xxx").Error, "It should catch an exception in ParseByFormat()")
assert.NotNil(t, ParseByFormat("xxx", "Y-m-d", PRC).Error, "It should catch an exception in ParseByFormat")
}

// https://github.com/dromara/carbon/issues/202
func TestCarbon_Issue202(t *testing.T) {
tests := []struct {
Expand Down Expand Up @@ -183,16 +193,6 @@ func TestCarbon_Issue202(t *testing.T) {
}
}

func TestError_ParseByLayout(t *testing.T) {
assert.NotNil(t, ParseByLayout("2020-08-05", "2006-03-04", "xxx").Error, "It should catch an exception in ParseByLayout")
assert.NotNil(t, ParseByLayout("xxx", "2006-03-04", PRC).Error, "It should catch an exception in ParseByLayout")
}

func TestError_ParseByFormat(t *testing.T) {
assert.NotNil(t, ParseByFormat("2020-08-05", "Y-m-d", "xxx").Error, "It should catch an exception in ParseByFormat()")
assert.NotNil(t, ParseByFormat("xxx", "Y-m-d", PRC).Error, "It should catch an exception in ParseByFormat")
}

// https://github.com/dromara/carbon/issues/206
func TestCarbon_Issue206(t *testing.T) {
tests := []struct {
Expand Down

0 comments on commit 21b4a2f

Please sign in to comment.