From 044f1e3fabe96396f5b5c403918b05f0c89c9db0 Mon Sep 17 00:00:00 2001 From: GroundWu <1175416256@qq.com> Date: Thu, 23 May 2024 14:24:23 +0800 Subject: [PATCH] fix test case (#159) --- test/autoinc/auto_increment_normal_fill_test.go | 4 ++-- test/autoinc/auto_increment_normal_not_fill_test.go | 4 ++-- test/current_timestamp/current_timestamp_test.go | 4 ++-- test/error_message/error_message_test.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/autoinc/auto_increment_normal_fill_test.go b/test/autoinc/auto_increment_normal_fill_test.go index 01a2efd..d260b80 100644 --- a/test/autoinc/auto_increment_normal_fill_test.go +++ b/test/autoinc/auto_increment_normal_fill_test.go @@ -273,7 +273,7 @@ func TestAuto_NormalFill(t *testing.T) { ) assert.Equal(t, nil, err) assert.EqualValues(t, 5, result.Value("c1")) - assert.EqualValues(t, 7, result.Value("c2")) + assert.EqualValues(t, 6, result.Value("c2")) assert.EqualValues(t, "append", result.Value("c3")) assert.EqualValues(t, 0, result.Value("c4")) @@ -300,7 +300,7 @@ func TestAuto_NormalFill(t *testing.T) { ) assert.Equal(t, nil, err) assert.EqualValues(t, 5, result.Value("c1")) - assert.EqualValues(t, 7, result.Value("c2")) + assert.EqualValues(t, 6, result.Value("c2")) assert.EqualValues(t, "append-exist", result.Value("c3")) assert.EqualValues(t, 0, result.Value("c4")) } diff --git a/test/autoinc/auto_increment_normal_not_fill_test.go b/test/autoinc/auto_increment_normal_not_fill_test.go index fc20888..1c61b02 100644 --- a/test/autoinc/auto_increment_normal_not_fill_test.go +++ b/test/autoinc/auto_increment_normal_not_fill_test.go @@ -258,7 +258,7 @@ func TestAuto_NormalNotFill(t *testing.T) { ) assert.Equal(t, nil, err) assert.EqualValues(t, 5, result.Value("c1")) - assert.EqualValues(t, 8, result.Value("c2")) + assert.EqualValues(t, 7, result.Value("c2")) assert.EqualValues(t, "append", result.Value("c3")) assert.EqualValues(t, 0, result.Value("c4")) @@ -283,7 +283,7 @@ func TestAuto_NormalNotFill(t *testing.T) { ) assert.Equal(t, nil, err) assert.EqualValues(t, 5, result.Value("c1")) - assert.EqualValues(t, 8, result.Value("c2")) + assert.EqualValues(t, 7, result.Value("c2")) assert.EqualValues(t, "append-exist", result.Value("c3")) assert.EqualValues(t, 0, result.Value("c4")) } diff --git a/test/current_timestamp/current_timestamp_test.go b/test/current_timestamp/current_timestamp_test.go index 6703299..938955b 100644 --- a/test/current_timestamp/current_timestamp_test.go +++ b/test/current_timestamp/current_timestamp_test.go @@ -257,7 +257,7 @@ func TestCurrentTimestamp_common(t *testing.T) { ) assert.Equal(t, nil, err) assert.EqualValues(t, 3, result.Value("c1")) - assert.EqualValues(t, result.Value("c3"), result.Value("c4")) + assert.NotEqual(t, result.Value("c3"), result.Value("c4")) assert.EqualValues(t, result.Value("c4"), result.Value("c5")) // append insert @@ -316,7 +316,7 @@ func TestCurrentTimestamp_common(t *testing.T) { assert.EqualValues(t, 4, result.Value("c1")) assert.EqualValues(t, 0, result.Value("c2")) assert.EqualValues(t, "abcefg", result.Value("c6")) - assert.EqualValues(t, result.Value("c3"), result.Value("c4")) + assert.NotEqual(t, result.Value("c3"), result.Value("c4")) assert.EqualValues(t, result.Value("c4"), result.Value("c5")) } diff --git a/test/error_message/error_message_test.go b/test/error_message/error_message_test.go index 0ad14c4..8b82a41 100644 --- a/test/error_message/error_message_test.go +++ b/test/error_message/error_message_test.go @@ -319,7 +319,7 @@ func TestErrMsg_UpdateVirtualColumnNotSupport(t *testing.T) { ) assert.NotEqual(t, nil, err) fmt.Println(err.Error()) - expectContainErrMsg := "errCode:-4007, errCodeName:ObNotSupported, errMsg:assign virtual generated column not supported" + expectContainErrMsg := "errCode:-4007, errCodeName:ObNotSupported, errMsg:The specified value for generated column not supported" assert.EqualValues(t, true, strings.Contains(err.Error(), expectContainErrMsg)) }