From 8def5fc831743b7ac07923aa76ac06448c01d028 Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 19 Nov 2024 14:21:58 -0300 Subject: [PATCH 1/6] fix test --- vm/src/serde/deserialize_program.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vm/src/serde/deserialize_program.rs b/vm/src/serde/deserialize_program.rs index 052d9ae09c..82771f7552 100644 --- a/vm/src/serde/deserialize_program.rs +++ b/vm/src/serde/deserialize_program.rs @@ -1492,8 +1492,7 @@ mod tests { #[test] #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)] fn test_felt_from_number_with_scientific_notation() { - let n = Number::deserialize(serde_json::Value::from(1000000000000000000000000000_u128)) - .unwrap(); + let n = Number::deserialize(serde_json::Value::from(1e27)).unwrap(); assert_eq!(n.to_string(), "1e27".to_owned()); assert_matches!( From f86b53b2db1bf7e6d7a499b5e61ee045086e3353 Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 19 Nov 2024 14:36:20 -0300 Subject: [PATCH 2/6] fix test --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b98d86551a..742eabe68d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## Cairo-VM Changelog #### Upcoming Changes +* fix: [#1878](https://github.com/lambdaclass/cairo-vm/pull/1878) + * Fix test `test_felt_from_number_with_scientific_notation` * fix: [#1873](https://github.com/lambdaclass/cairo-vm/pull/1873) * Fix broken num-prime `is_prime` call * fix: [#1868](https://github.com/lambdaclass/cairo-vm/pull/1855): From e845febbe5737744bd10e46878be69ffa7f4706c Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 19 Nov 2024 15:12:52 -0300 Subject: [PATCH 3/6] reviews --- CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 742eabe68d..b98d86551a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,6 @@ ## Cairo-VM Changelog #### Upcoming Changes -* fix: [#1878](https://github.com/lambdaclass/cairo-vm/pull/1878) - * Fix test `test_felt_from_number_with_scientific_notation` * fix: [#1873](https://github.com/lambdaclass/cairo-vm/pull/1873) * Fix broken num-prime `is_prime` call * fix: [#1868](https://github.com/lambdaclass/cairo-vm/pull/1855): From 82d803b662dc4eb2a9474d035216eb6faa1b66c8 Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Fri, 27 Dec 2024 09:39:29 -0300 Subject: [PATCH 4/6] fix changed entrypoint offset on test --- vm/src/tests/cairo_1_run_from_entrypoint_tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/src/tests/cairo_1_run_from_entrypoint_tests.rs b/vm/src/tests/cairo_1_run_from_entrypoint_tests.rs index 4ed670c679..aa1807d26c 100644 --- a/vm/src/tests/cairo_1_run_from_entrypoint_tests.rs +++ b/vm/src/tests/cairo_1_run_from_entrypoint_tests.rs @@ -39,7 +39,7 @@ fn test_uint256_div_mod_hint() { run_cairo_1_entrypoint( program_data.as_slice(), - 208, + 219, &[36_usize.into(), 2_usize.into()], &[Felt252::from(18_usize)], ); From 422e074287d3cd7394dd73a155f1c7049ad586ce Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Fri, 27 Dec 2024 10:46:02 -0300 Subject: [PATCH 5/6] try fix --- vm/src/tests/cairo_1_run_from_entrypoint_tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/src/tests/cairo_1_run_from_entrypoint_tests.rs b/vm/src/tests/cairo_1_run_from_entrypoint_tests.rs index aa1807d26c..4ed670c679 100644 --- a/vm/src/tests/cairo_1_run_from_entrypoint_tests.rs +++ b/vm/src/tests/cairo_1_run_from_entrypoint_tests.rs @@ -39,7 +39,7 @@ fn test_uint256_div_mod_hint() { run_cairo_1_entrypoint( program_data.as_slice(), - 219, + 208, &[36_usize.into(), 2_usize.into()], &[Felt252::from(18_usize)], ); From 02bd8052b10afd8d87195911808f3846c59d5f3c Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Fri, 27 Dec 2024 11:46:27 -0300 Subject: [PATCH 6/6] try fix --- vm/src/tests/cairo_1_run_from_entrypoint_tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/src/tests/cairo_1_run_from_entrypoint_tests.rs b/vm/src/tests/cairo_1_run_from_entrypoint_tests.rs index 4ed670c679..aa1807d26c 100644 --- a/vm/src/tests/cairo_1_run_from_entrypoint_tests.rs +++ b/vm/src/tests/cairo_1_run_from_entrypoint_tests.rs @@ -39,7 +39,7 @@ fn test_uint256_div_mod_hint() { run_cairo_1_entrypoint( program_data.as_slice(), - 208, + 219, &[36_usize.into(), 2_usize.into()], &[Felt252::from(18_usize)], );