]> Repositorios git - scryer-prolog.git/commitdiff
Document test methods
authorbakaq <[email protected]>
Mon, 30 Sep 2024 02:45:40 +0000 (23:45 -0300)
committerbakaq <[email protected]>
Sun, 8 Dec 2024 23:18:06 +0000 (20:18 -0300)
src/machine/mock_wam.rs

index 2c7e37d6b3a9ee0c5629cea69bdc4296e3bfa860..a4aba11281741df65af8b42f92a6b04077c6e050 100644 (file)
@@ -232,10 +232,12 @@ pub(crate) fn parse_and_write_parsed_term_to_heap(
 }
 
 impl Machine {
+    /// For use in tests.
     pub fn with_test_streams() -> Self {
         Machine::new(MachineConfig::default().with_streams(StreamConfig::in_memory()))
     }
 
+    /// For use in tests.
     pub fn test_load_file(&mut self, file: &str) -> Vec<u8> {
         let stream = Stream::from_owned_string(
             std::fs::read_to_string(AsRef::<std::path::Path>::as_ref(file)).unwrap(),
@@ -246,6 +248,7 @@ impl Machine {
         self.user_output.bytes().map(|b| b.unwrap()).collect()
     }
 
+    /// For use in tests.
     pub fn test_load_string(&mut self, code: &str) -> Vec<u8> {
         let stream = Stream::from_owned_string(code.to_owned(), &mut self.machine_st.arena);