Skip to content

Commit

Permalink
some cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
Innokenty committed Nov 21, 2024
1 parent 483c703 commit 23b0db2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 20 deletions.
2 changes: 1 addition & 1 deletion lib/src/metta/runner/stdlib_minimal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ mod tests {
use std::fmt::Display;
use regex::Regex;

fn run_program(program: &str) -> Result<Vec<Vec<Atom>>, String> {
pub fn run_program(program: &str) -> Result<Vec<Vec<Atom>>, String> {
let metta = Metta::new(Some(EnvBuilder::test_env()));
metta.run(SExprParser::new(program))
}
Expand Down
6 changes: 1 addition & 5 deletions lib/src/metta/runner/stdlib_minimal/stdlib_common_tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -768,11 +768,7 @@ mod tests {
use crate::metta::runner::EnvBuilder;
use crate::matcher::atoms_are_equivalent;
use crate::common::test_utils::metta_space;

fn run_program(program: &str) -> Result<Vec<Vec<Atom>>, String> {
let metta = Metta::new(Some(EnvBuilder::test_env()));
metta.run(SExprParser::new(program))
}
use crate::metta::runner::stdlib_minimal::tests::run_program;

#[test]
fn get_type_op() {
Expand Down
9 changes: 1 addition & 8 deletions lib/src/metta/runner/stdlib_minimal/stdlib_math.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,14 +408,7 @@ impl CustomExecute for IsInfMathOp {
#[cfg(test)]
mod tests {
use super::*;
use crate::metta::text::SExprParser;
use crate::metta::runner::EnvBuilder;
use crate::metta::runner::Metta;

fn run_program(program: &str) -> Result<Vec<Vec<Atom>>, String> {
let metta = Metta::new(Some(EnvBuilder::test_env()));
metta.run(SExprParser::new(program))
}
use crate::metta::runner::stdlib_minimal::tests::run_program;

#[test]
fn metta_pow_math() {
Expand Down
7 changes: 1 addition & 6 deletions lib/src/metta/runner/stdlib_minimal/stdlib_runner_tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ mod tests {
use crate::metta::text::SExprParser;
use crate::metta::runner::EnvBuilder;
use crate::common::test_utils::metta_space;

use crate::metta::runner::stdlib_minimal::tests::run_program;
use std::convert::TryFrom;
use regex::Regex;

Expand All @@ -688,11 +688,6 @@ mod tests {
}
}

fn run_program(program: &str) -> Result<Vec<Vec<Atom>>, String> {
let metta = Metta::new(Some(EnvBuilder::test_env()));
metta.run(SExprParser::new(program))
}

#[test]
fn metta_assert_equal_op() {
let metta = Metta::new(Some(EnvBuilder::test_env()));
Expand Down

0 comments on commit 23b0db2

Please sign in to comment.