Rename 'aiken-project::script' into 'aiken-project::test_framework'

This commit is contained in:
KtorZ 2024-03-02 14:59:18 +01:00
parent bbc9fc5762
commit 2db15d59be
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
3 changed files with 6 additions and 9 deletions

View File

@ -10,8 +10,8 @@ pub mod options;
pub mod package_name; pub mod package_name;
pub mod paths; pub mod paths;
pub mod pretty; pub mod pretty;
pub mod script;
pub mod telemetry; pub mod telemetry;
pub mod test_framework;
#[cfg(test)] #[cfg(test)]
mod tests; mod tests;
pub mod watch; pub mod watch;
@ -47,7 +47,6 @@ use pallas::ledger::{
primitives::babbage::{self as cardano, PolicyId}, primitives::babbage::{self as cardano, PolicyId},
traverse::ComputeHash, traverse::ComputeHash,
}; };
use script::{Assertion, Fuzzer, Test, TestResult};
use std::{ use std::{
collections::HashMap, collections::HashMap,
fs::{self, File}, fs::{self, File},
@ -56,6 +55,7 @@ use std::{
rc::Rc, rc::Rc,
}; };
use telemetry::EventListener; use telemetry::EventListener;
use test_framework::{Assertion, Fuzzer, Test, TestResult};
use uplc::{ use uplc::{
ast::{DeBruijn, Name, NamedDeBruijn, Program, Term}, ast::{DeBruijn, Name, NamedDeBruijn, Program, Term},
machine::cost_model::ExBudget, machine::cost_model::ExBudget,

View File

@ -1,5 +1,5 @@
use crate::pretty; use crate::pretty;
use crate::script::{PropertyTestResult, TestResult, UnitTestResult}; use crate::test_framework::{PropertyTestResult, TestResult, UnitTestResult};
use aiken_lang::{expr::UntypedExpr, format::Formatter}; use aiken_lang::{expr::UntypedExpr, format::Formatter};
use owo_colors::{OwoColorize, Stream::Stderr}; use owo_colors::{OwoColorize, Stream::Stderr};
use std::{collections::BTreeMap, fmt::Display, path::PathBuf}; use std::{collections::BTreeMap, fmt::Display, path::PathBuf};

View File

@ -341,7 +341,7 @@ impl Prng {
} }
} }
panic!("Malformed Prng: {cst:#?}") unreachable!("Malformed Prng: {cst:#?}")
} }
fn as_u32(field: &PlutusData) -> u32 { fn as_u32(field: &PlutusData) -> u32 {
@ -349,7 +349,7 @@ impl Prng {
return u32::try_from(*i).expect("Choice doesn't fit in u32?"); return u32::try_from(*i).expect("Choice doesn't fit in u32?");
} }
panic!("Malformed choice's value: {field:#?}") unreachable!("Malformed choice's value: {field:#?}")
} }
if let Term::Constant(rc) = &result { if let Term::Constant(rc) = &result {
@ -372,9 +372,6 @@ impl Prng {
} }
} }
// In principle, this cannot happen provided that the 'result' was produced from a
// type-checked fuzzer. The type-checker enforces that fuzzers are of the right shape
// describe above.
unreachable!("Fuzzer yielded a malformed result? {result:#?}") unreachable!("Fuzzer yielded a malformed result? {result:#?}")
} }
} }