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

Method set_program

std/src/testutils.rs:720–728  ·  view source on GitHub ↗

Sets the initial name of the recorded program to `name` (if any) and its contents to `text`. Can only be called once and `text` must not be empty.

(self, name: Option<&str>, text: &str)

Source from the content-addressed store, hash-verified

718 /// Sets the initial name of the recorded program to `name` (if any) and its contents to `text`.
719 /// Can only be called once and `text` must not be empty.
720 pub fn set_program(self, name: Option<&str>, text: &str) -> Self {
721 assert!(!text.is_empty());
722 {
723 let mut program = self.program.borrow_mut();
724 assert!(program.text().is_empty());
725 program.load(name, text);
726 }
727 self
728 }
729
730 /// Creates or overwrites a file in the storage medium.
731 pub fn write_file(self, name: &str, content: &str) -> Self {

Callers 15

test_disasm_okFunction · 0.80
test_disasm_pagingFunction · 0.80
test_disasm_code_errorsFunction · 0.80
test_edit_okFunction · 0.80
test_list_okFunction · 0.80
test_list_pagingFunction · 0.80

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected