MCPcopy Index your code
hub / github.com/endbasic/endbasic / expect_prints

Method expect_prints

std/src/testutils.rs:964–969  ·  view source on GitHub ↗

Adds the `out` sequence of strings to the expected outputs of the execution. This is a convenience function around `expect_output` that wraps all incoming strings in `CapturedOut::Print` objects, as these are the most common outputs in tests.

(mut self, out: V)

Source from the content-addressed store, hash-verified

962 /// This is a convenience function around `expect_output` that wraps all incoming strings in
963 /// `CapturedOut::Print` objects, as these are the most common outputs in tests.
964 pub fn expect_prints<S: Into<String>, V: Into<Vec<S>>>(mut self, out: V) -> Self {
965 let out = out.into();
966 self.exp_output
967 .append(&mut out.into_iter().map(|x| CapturedOut::Print(x.into())).collect());
968 self
969 }
970
971 /// Sets the expected name of the stored program to `name` and its contents to `text`. Can only
972 /// be called once and `text` must not be empty.

Callers 15

test_disasm_nothingFunction · 0.45
test_disasm_okFunction · 0.45
test_disasm_pagingFunction · 0.45
test_list_okFunction · 0.45
test_list_pagingFunction · 0.45

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected