]> git.lizzy.rs Git - rust.git/commitdiff
update tests
authorDavid Renshaw <dwrenshaw@gmail.com>
Fri, 31 Dec 2021 17:51:27 +0000 (12:51 -0500)
committerDavid Renshaw <dwrenshaw@gmail.com>
Fri, 31 Dec 2021 17:51:27 +0000 (12:51 -0500)
compiler/rustc_builtin_macros/src/format_foreign/printf/tests.rs

index 1336aab7316747a8e5043e321abc07314826d268..fc7442470ac82a85ada490cd9555bc3be920017d 100644 (file)
@@ -13,9 +13,9 @@ macro_rules! assert_eq_pnsat {
 fn test_escape() {
     assert_eq!(pns("has no escapes"), None);
     assert_eq!(pns("has no escapes, either %"), None);
-    assert_eq!(pns("*so* has a %% escape"), Some((S::Escape, " escape")));
-    assert_eq!(pns("%% leading escape"), Some((S::Escape, " leading escape")));
-    assert_eq!(pns("trailing escape %%"), Some((S::Escape, "")));
+    assert_eq!(pns("*so* has a %% escape"), Some((S::Escape((11, 13)), " escape")));
+    assert_eq!(pns("%% leading escape"), Some((S::Escape((0, 2)), " leading escape")));
+    assert_eq!(pns("trailing escape %%"), Some((S::Escape((16, 18)), "")));
 }
 
 #[test]