Fix and re-enable pretty print test for bigint

This commit is contained in:
Niels Mündler 2023-12-18 13:28:09 +01:00 committed by Lucas
parent 89e518f878
commit fb56700bde
1 changed files with 3 additions and 6 deletions

View File

@ -167,17 +167,14 @@ fn constant_data_int() {
"(con data (I 2))", "(con data (I 2))",
); );
// TODO: large integers currently encode as bytestrings, which isn't great let term = Term::<Name>::Constant(Constant::Data(
/*
let term = Term::<DeBruijn>::Constant(Constant::Data(
PlutusData::BigInt(pallas_primitives::alonzo::BigInt::BigUInt(vec![2,3,4].into())), PlutusData::BigInt(pallas_primitives::alonzo::BigInt::BigUInt(vec![2,3,4].into())),
).into()); ).into());
assert_eq!(term.to_pretty(), "(con data (I 131844))"); assert_eq!(term.to_pretty(), "(con data (I 131844))");
let term = Term::<DeBruijn>::Constant(Constant::Data( let term = Term::<Name>::Constant(Constant::Data(
PlutusData::BigInt(pallas_primitives::alonzo::BigInt::BigNInt(vec![FF,FD,FC,FC].into())), PlutusData::BigInt(pallas_primitives::alonzo::BigInt::BigNInt(vec![2,3,3].into())),
).into()); ).into());
assert_eq!(term.to_pretty(), "(con data (I -131844))"); assert_eq!(term.to_pretty(), "(con data (I -131844))");
*/
} }
#[test] #[test]