Skip to content

Commit

Permalink
fix test case for accounting fast preset.
Browse files Browse the repository at this point in the history
  • Loading branch information
aikiriao committed Jan 26, 2025
1 parent c6d7520 commit 70dc8a2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 34 deletions.
6 changes: 0 additions & 6 deletions test/lpc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ TEST(LPCCalculatorTest, CreateDestroyHandleTest)
EXPECT_TRUE(lpcc == NULL);

/* コンフィグパラメータが不正 */
config.max_order = 0; config.max_num_samples = 1;
lpcc = LPCCalculator_Create(&config, work, work_size);
EXPECT_TRUE(lpcc == NULL);
config.max_order = 1; config.max_num_samples = 0;
lpcc = LPCCalculator_Create(&config, work, work_size);
EXPECT_TRUE(lpcc == NULL);
Expand All @@ -99,9 +96,6 @@ TEST(LPCCalculatorTest, CreateDestroyHandleTest)
struct LPCCalculatorConfig config;

/* コンフィグパラメータが不正 */
config.max_order = 0; config.max_num_samples = 1;
lpcc = LPCCalculator_Create(&config, NULL, 0);
EXPECT_TRUE(lpcc == NULL);
config.max_order = 1; config.max_num_samples = 0;
lpcc = LPCCalculator_Create(&config, NULL, 0);
EXPECT_TRUE(lpcc == NULL);
Expand Down
14 changes: 0 additions & 14 deletions test/srla_decoder/srla_decoder_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,6 @@ TEST(SRLADecoderTest, CreateDestroyHandleTest)
SRLADecoder_SetValidConfig(&config);
config.max_num_channels = 0;
EXPECT_TRUE(SRLADecoder_CalculateWorkSize(&config) < 0);

SRLADecoder_SetValidConfig(&config);
config.max_num_parameters = 0;
EXPECT_TRUE(SRLADecoder_CalculateWorkSize(&config) < 0);
}

/* ワーク領域渡しによるハンドル作成(成功例) */
Expand Down Expand Up @@ -265,11 +261,6 @@ TEST(SRLADecoderTest, CreateDestroyHandleTest)
config.max_num_channels = 0;
decoder = SRLADecoder_Create(&config, work, work_size);
EXPECT_TRUE(decoder == NULL);

SRLADecoder_SetValidConfig(&config);
config.max_num_parameters = 0;
decoder = SRLADecoder_Create(&config, work, work_size);
EXPECT_TRUE(decoder == NULL);
}

/* 自前確保によるハンドル作成(失敗ケース) */
Expand All @@ -288,11 +279,6 @@ TEST(SRLADecoderTest, CreateDestroyHandleTest)
config.max_num_channels = 0;
decoder = SRLADecoder_Create(&config, NULL, 0);
EXPECT_TRUE(decoder == NULL);

SRLADecoder_SetValidConfig(&config);
config.max_num_parameters = 0;
decoder = SRLADecoder_Create(&config, NULL, 0);
EXPECT_TRUE(decoder == NULL);
}
}

Expand Down
14 changes: 0 additions & 14 deletions test/srla_encoder/srla_encoder_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@ TEST(SRLAEncoderTest, CreateDestroyHandleTest)
SRLAEncoder_SetValidConfig(&config);
config.max_num_samples_per_block = 0;
EXPECT_TRUE(SRLAEncoder_CalculateWorkSize(&config) < 0);

SRLAEncoder_SetValidConfig(&config);
config.max_num_parameters = 0;
EXPECT_TRUE(SRLAEncoder_CalculateWorkSize(&config) < 0);
}

/* ワーク領域渡しによるハンドル作成(成功例) */
Expand Down Expand Up @@ -213,11 +209,6 @@ TEST(SRLAEncoderTest, CreateDestroyHandleTest)
encoder = SRLAEncoder_Create(&config, work, work_size);
EXPECT_TRUE(encoder == NULL);

SRLAEncoder_SetValidConfig(&config);
config.max_num_parameters = 0;
encoder = SRLAEncoder_Create(&config, work, work_size);
EXPECT_TRUE(encoder == NULL);

free(work);
}

Expand All @@ -242,11 +233,6 @@ TEST(SRLAEncoderTest, CreateDestroyHandleTest)
config.max_num_samples_per_block = 0;
encoder = SRLAEncoder_Create(&config, NULL, 0);
EXPECT_TRUE(encoder == NULL);

SRLAEncoder_SetValidConfig(&config);
config.max_num_parameters = 0;
encoder = SRLAEncoder_Create(&config, NULL, 0);
EXPECT_TRUE(encoder == NULL);
}
}

Expand Down

0 comments on commit 70dc8a2

Please sign in to comment.