Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove from_segment
Browse files Browse the repository at this point in the history
odesenfans committed Jan 18, 2024
1 parent f1a34dd commit a3b078e
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions vm/src/vm/runners/builtin_runner/output.rs
Original file line number Diff line number Diff line change
@@ -31,16 +31,6 @@ impl OutputBuiltinRunner {
}
}

pub fn from_segment(segment: &Relocatable, included: bool) -> Self {
Self {
base: segment.segment_index as usize,
pages: HashMap::default(),
attributes: HashMap::default(),
stop_ptr: None,
included,
}
}

pub fn new_state(&mut self, base: usize, included: bool) {
self.base = base;
self.pages = HashMap::default();
@@ -528,19 +518,6 @@ mod tests {
assert!(builtin.air_private_input(&memory).is_empty());
}

#[test]
fn from_segment() {
let segment_base = Relocatable::from((10, 0));
let included = true;

let builtin = OutputBuiltinRunner::from_segment(&segment_base, included);
assert_eq!(builtin.base, segment_base.segment_index as usize);
assert_eq!(builtin.stop_ptr, None);
assert_eq!(builtin.pages, HashMap::default());
assert_eq!(builtin.attributes, HashMap::default());
assert_eq!(builtin.included, included);
}

#[test]
fn set_state() {
let mut builtin = OutputBuiltinRunner::new(true);

0 comments on commit a3b078e

Please sign in to comment.