diff --git a/internal/pkg/sub_timeline_fixer/calculate_curve_correlation_test.go b/internal/pkg/sub_timeline_fixer/calculate_curve_correlation_test.go index ae96cc057..f59e56771 100644 --- a/internal/pkg/sub_timeline_fixer/calculate_curve_correlation_test.go +++ b/internal/pkg/sub_timeline_fixer/calculate_curve_correlation_test.go @@ -56,6 +56,36 @@ func TestCalculateCurveCorrelation(t *testing.T) { n: 30, }, want: -1}, + {name: "03", args: args{ + s1: []float64{0.309016989, 0.587785244, 0.809016985, 0.95105651, 1, 0.951056526, + 0.809017016, 0.587785287, 0.30901704, 5.35898e-08, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0}, + s2: []float64{0, 0, 0.187381311, 0.368124547, 0.535826787, + 0.684547097, 0.809016985, 0.904827044, 0.968583156, 0.998026727, + 0.992114705, 0.951056526, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0}, + n: 30, + }, + want: 0.4024278361610972}, + {name: "03", args: args{ + s1: []float64{0.309016989, 0.587785244, 0.809016985, 0.95105651, 1, 0.951056526, + 0.809017016, 0.587785287, 0.30901704, 5.35898e-08, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0}, + s2: []float64{0.187381311, 0.368124547, 0.535826787, 0.684547097, 0.809016985, + 0.904827044, 0.968583156, 0.998026727, 0.992114705, 0.951056526, + 0.876306697, 0.770513267, 0.637424022, 0.481753714, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0}, + n: 30, + }, + want: 0.6126176272432471}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) {