chiark / gitweb /
apitest: Rename reset_game() to otter_resetting()
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 21 May 2021 18:44:32 +0000 (19:44 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 21 May 2021 18:44:32 +0000 (19:44 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
apitest/at-bundles.rs
apitest/at-otter.rs
apitest/main.rs

index b1e09eb014f68252e3701f0ea7d0cbd3c0e3466f..8a0b763b266635cc79a1d610134f363b0d8b09a8 100644 (file)
@@ -20,7 +20,7 @@ impl Ctx {
       "big-bundle","duped-example", "chess-purple-cannon", "a purple cannon",
       &mut |ctx|
     {
-      ctx.reset_game(&ctx.ds().gss("reset modded-spec")?)?;
+      ctx.otter_resetting(&ctx.ds().gss("reset modded-spec")?)?;
 
       let alice = ctx.connect_player(&ctx.alice)?;
       let pieces = alice.pieces::<PIA>()?;
@@ -49,7 +49,7 @@ impl Ctx {
   fn reset_with_bundles(&mut self) {
     self.clear_reset_to_demo()?;
 
-    self.reset_game(&self.ds().gss(
+    self.otter_resetting(&self.ds().gss(
       "reset demo-in-test-bundle @examples@/test-bundle.zip"
     )?)?;
 
index bbcba3d1f02654f371167745b86c81264172dfe5..d86d25402ead35c56fd8a890c83dca5e3f93cc16 100644 (file)
@@ -146,7 +146,7 @@ impl Ctx {
                a_pieces[a_pawns[0]].pos);
 
     let command = self.ds().gss("reset demo")?;
-    self.reset_game(&command)?;
+    self.otter_resetting(&command)?;
   }
 
   #[throws(Explode)]
@@ -178,7 +178,7 @@ impl Ctx {
       if !(py || gy) { break }
       let command = self.ds().also(&[("game",&game),("perm",&perm)])
         .gss("reset --reset-table @perm@ @game@")?;
-      self.reset_game(&command).context(perm).context(game)?;
+      self.otter_resetting(&command).context(perm).context(game)?;
     }
   }
 
index fba1923c10dcac94978c61a4b055e9d4f00867f1..6460d7dfb5e49bf12658b602884bb6b9228f48d7 100644 (file)
@@ -502,7 +502,7 @@ impl UsualCtx {
   }
 
   #[throws(AE)]
-  pub fn reset_game<S:AsRef<str>>(&mut self, args: &[S]) -> OtterOutput {
+  pub fn otter_resetting<S:AsRef<str>>(&mut self, args: &[S]) -> OtterOutput {
     self.has_lib_markers = false;
     self.otter(args)?
   }
@@ -627,8 +627,8 @@ impl UsualCtx {
   #[throws(Explode)]
   pub fn clear_reset_to_demo(&mut self) {
     let ds = self.su().ds.clone();
-    self.reset_game(&ds.gss("clear-game")?)?;
-    self.reset_game(&ds.gss("reset demo")?)?;
+    self.otter_resetting(&ds.gss("clear-game")?)?;
+    self.otter_resetting(&ds.gss("reset demo")?)?;
   }
 }