Skip to content

Commit

Permalink
update: uncomment fft tests
Browse files Browse the repository at this point in the history
  • Loading branch information
heemankv committed Sep 4, 2024
1 parent 4ea7b24 commit 5a57002
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions crates/orchestrator/src/jobs/da_job/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,27 +496,27 @@ pub mod test {
/// Verifies the correctness of FFT and IFFT transformations by ensuring round-trip consistency.
/// Parses the original blob data, recovers it using IFFT, and re-applies FFT.
/// Asserts that the transformed data matches the original pre-IFFT data, ensuring integrity.
// #[rstest]
// #[case("src/tests/jobs/da_job/test_data/test_blob/638353.txt")]
// #[case("src/tests/jobs/da_job/test_data/test_blob/631861.txt")]
// #[case("src/tests/jobs/da_job/test_data/test_blob/639404.txt")]
// #[case("src/tests/jobs/da_job/test_data/test_blob/640641.txt")]
// #[case("src/tests/jobs/da_job/test_data/test_blob/640644.txt")]
// #[case("src/tests/jobs/da_job/test_data/test_blob/640646.txt")]
// #[case("src/tests/jobs/da_job/test_data/test_blob/640647.txt")]
// fn test_fft_transformation(#[case] file_to_check: &str) {
// // parsing the blob hex to the bigUints

// use crate::jobs::da_job::fft_transformation;
// let original_blob_data = serde::parse_file_to_blob_data(file_to_check);
// // converting the data to its original format
// let ifft_blob_data = blob::recover(original_blob_data.clone());
// // applying the fft function again on the original format
// let fft_blob_data = fft_transformation(ifft_blob_data);

// // ideally the data after fft transformation and the data before ifft should be same.
// assert_eq!(fft_blob_data, original_blob_data);
// }
#[rstest]
#[case("src/tests/jobs/da_job/test_data/test_blob/638353.txt")]
#[case("src/tests/jobs/da_job/test_data/test_blob/631861.txt")]
#[case("src/tests/jobs/da_job/test_data/test_blob/639404.txt")]
#[case("src/tests/jobs/da_job/test_data/test_blob/640641.txt")]
#[case("src/tests/jobs/da_job/test_data/test_blob/640644.txt")]
#[case("src/tests/jobs/da_job/test_data/test_blob/640646.txt")]
#[case("src/tests/jobs/da_job/test_data/test_blob/640647.txt")]
fn test_fft_transformation(#[case] file_to_check: &str) {
// parsing the blob hex to the bigUints

use crate::jobs::da_job::fft_transformation;
let original_blob_data = serde::parse_file_to_blob_data(file_to_check);
// converting the data to its original format
let ifft_blob_data = blob::recover(original_blob_data.clone());
// applying the fft function again on the original format
let fft_blob_data = fft_transformation(ifft_blob_data);

// ideally the data after fft transformation and the data before ifft should be same.
assert_eq!(fft_blob_data, original_blob_data);
}

/// Tests the serialization and deserialization process using bincode.
/// Serializes a nested vector of integers and then deserializes it back.
Expand Down

0 comments on commit 5a57002

Please sign in to comment.