diff --git a/tests/simplex_regression_test.cc b/tests/simplex_regression_test.cc index ae4cce6..645ff86 100644 --- a/tests/simplex_regression_test.cc +++ b/tests/simplex_regression_test.cc @@ -62,11 +62,6 @@ int main() typedef std::uniform_int_distribution uniform; typedef std::normal_distribution normal; - int8_t *code = new int8_t[CODE_LEN]; - int8_t *orig = new int8_t[CODE_LEN]; - int8_t *noisy = new int8_t[CODE_LEN]; - float *symb = new float[CODE_LEN]; - float min_SNR = 20; for (float SNR = -10; SNR <= 10; SNR += 0.1) { @@ -83,6 +78,9 @@ int main() int uncorrected_errors = 0; int decoder_errors = 0; for (int loop = 0; loop < LOOPS; ++loop) { + int8_t code[CODE_LEN], orig[CODE_LEN], noisy[CODE_LEN]; + float symb[CODE_LEN]; + int dat = data(); encode(code, dat); @@ -131,11 +129,6 @@ int main() } } - delete[] code; - delete[] orig; - delete[] noisy; - delete[] symb; - std::cerr << "QEF at: " << min_SNR << " SNR" << std::endl; assert(min_SNR < QEF_SNR); std::cerr << "Simplex code regression test passed!" << std::endl;