Skip to content

Commit fdf4780

Browse files
committed
add more test
1 parent 31f9138 commit fdf4780

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/unittest/convolution_test.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,19 @@ TEST(ConvolutionTest, Conv2) {
391391
ASSERT_EQ(empty, convolution<2>(empty, empty));
392392
}
393393

394+
TEST(ConvolutionTest, Conv257) {
395+
const int MOD = 257;
396+
std::vector<ll> a(128), b(129);
397+
for (int i = 0; i < 128; i++) {
398+
a[i] = randint(0, MOD - 1);
399+
}
400+
for (int i = 0; i < 129; i++) {
401+
b[i] = randint(0, MOD - 1);
402+
}
403+
404+
ASSERT_EQ(conv_naive<MOD>(a, b), convolution<MOD>(a, b));
405+
}
406+
394407
TEST(ConvolutionTest, Conv2147483647) {
395408
const int MOD = 2147483647;
396409
using mint = static_modint<MOD>;

0 commit comments

Comments
 (0)