diff --git a/.maintainer-scripts/chmod.sh b/.maintainer-scripts/chmod.sh
new file mode 100755
index 000000000..cc2547206
--- /dev/null
+++ b/.maintainer-scripts/chmod.sh
@@ -0,0 +1,103 @@
+#!/bin/bash
+
+set -eu
+
+# Function to generate a random octal permission mode, including sticky and suid bits
+generate_random_octal_mode() {
+ echo "$((RANDOM % 8))$((RANDOM % 8))$((RANDOM % 8))"
+}
+
+# Function to generate a random octal permission mode, including sticky and suid bits
+generate_random_octal_mode_special() {
+ local special_bits=("4" "2" "1" "0") # 4 for SUID, 2 for SGID, 1 for sticky bit, 0 for none
+ local operations=("+" "-" "=")
+ local special_bit=""
+ local op=""
+ if [ $((RANDOM % 5)) -eq 0 ]; then
+ special_bit=${special_bits[$RANDOM % ${#special_bits[@]}]}
+ fi
+ if [ $((RANDOM % 5)) -eq 0 ]; then
+ op=${operations[$RANDOM % ${#operations[@]}]}
+ fi
+ echo "$op$special_bit$(generate_random_octal_mode)"
+}
+
+# Function to generate a valid complex random symbolic permission mode
+generate_random_complex_symbolic_mode() {
+ local symbols=("u" "g" "o" "a")
+ local operations=("+" "-" "=")
+ local permissions=("r" "w" "x" "X" "s" "t") # Including 'X' for conditional execute, 's' for SUID/SGID, 't' for sticky bit
+ local copyfrom=("u" "g" "o")
+
+ # Generating symbol groups and permissions
+ local result=""
+ local num_symbols=$((RANDOM % 3 + 1))
+ for (( i=0; i<$num_symbols; i++ )); do
+ local symbol=${symbols[$RANDOM % ${#symbols[@]}]}
+ # Avoid duplicating symbols
+ if [[ $result != *"$symbol"* ]]; then
+ result+="$symbol"
+ fi
+ done
+
+ if [ $((RANDOM % 5)) -eq 0 ]; then
+ local operation=${operations[$RANDOM % ${#operations[@]}]}
+ local source=${copyfrom[$RANDOM % ${#copyfrom[@]}]}
+ result+="$operation$source"
+ else
+ local num_groups=$((RANDOM % 3 + 1))
+ local ops=""
+ for (( i=0; i<$num_groups; i++ )); do
+ local operation=${operations[$RANDOM % ${#operations[@]}]}
+ if [[ $ops != *"$operation"* ]]; then
+ ops+="$operation"
+ local permission_group=""
+ local num_permissions=$((RANDOM % 3 + 1))
+ for (( i=0; i<$num_permissions; i++ )); do
+ local permission=${permissions[$RANDOM % ${#permissions[@]}]}
+ # Avoid duplicating permissions
+ if [[ $permission_group != *"$permission"* ]]; then
+ permission_group+="$permission"
+ fi
+ done
+ result+="$operation$permission_group"
+ fi
+ done
+ fi
+
+ echo "$result"
+}
+
+# Main loop
+for i in {1..2000}; do
+ # Generate random chmod mode string
+ if [ $((RANDOM % 10)) -eq 0 ]; then
+ mode=$(generate_random_octal_mode_special)
+ else
+ mode=$(generate_random_complex_symbolic_mode)
+ fi
+
+ # Set random umask
+ umask_value=$(generate_random_octal_mode)
+ umask $umask_value
+
+ # Create a dummy file with random permissions and get its initial permissions
+ dummy_file="dummy_$i.txt"
+ touch $dummy_file
+ chmod $(generate_random_octal_mode_special) $dummy_file
+ original_permissions=$(stat -c "%a" $dummy_file)
+
+ # Run chmod with the generated mode on the dummy file
+ chmod $mode $dummy_file
+
+ # Read the new permissions from the dummy file
+ new_permissions=$(stat -c "%a" $dummy_file)
+
+ # Print umask, chmod string, original and new file permissions
+ cat <.
+ */
+
+#include
+
+#include
+
+#include
+
+#include "dwarfs/chmod_transformer.h"
+
+using namespace dwarfs;
+namespace fs = std::filesystem;
+
+namespace {
+
+class octal_mode {
+ public:
+ friend std::ostream& operator<<(std::ostream& os, octal_mode const& mode);
+
+ explicit octal_mode(std::optional mode)
+ : mode_{mode} {}
+
+ bool operator==(octal_mode const& rhs) const { return mode_ == rhs.mode_; }
+
+ private:
+ std::optional mode_;
+};
+
+std::ostream& operator<<(std::ostream& os, octal_mode const& mode) {
+ if (mode.mode_.has_value()) {
+ auto const m = mode.mode_.value();
+ os << fmt::format("0{:o} ", m);
+ os << (m & uint16_t(fs::perms::set_uid) ? 'U' : '-');
+ os << (m & uint16_t(fs::perms::set_gid) ? 'G' : '-');
+ os << (m & uint16_t(fs::perms::sticky_bit) ? 'S' : '-');
+ os << (m & uint16_t(fs::perms::owner_read) ? 'r' : '-');
+ os << (m & uint16_t(fs::perms::owner_write) ? 'w' : '-');
+ os << (m & uint16_t(fs::perms::owner_exec) ? 'x' : '-');
+ os << (m & uint16_t(fs::perms::group_read) ? 'r' : '-');
+ os << (m & uint16_t(fs::perms::group_write) ? 'w' : '-');
+ os << (m & uint16_t(fs::perms::group_exec) ? 'x' : '-');
+ os << (m & uint16_t(fs::perms::others_read) ? 'r' : '-');
+ os << (m & uint16_t(fs::perms::others_write) ? 'w' : '-');
+ os << (m & uint16_t(fs::perms::others_exec) ? 'x' : '-');
+ } else {
+ os << "std::nullopt";
+ }
+ return os;
+}
+
+} // namespace
+
+#define EXPECT_EQ_MODE(a, b) EXPECT_EQ(octal_mode{a}, octal_mode{b})
+
+TEST(chmod_transformer, basic) {
+ {
+ chmod_transformer ct{"u+x", 0022};
+ EXPECT_EQ_MODE(ct.transform(0644, false), 0744);
+ EXPECT_EQ_MODE(ct.transform(0755, false), 0755);
+ EXPECT_EQ_MODE(ct.transform(0644, true), 0744);
+ EXPECT_EQ_MODE(ct.transform(0755, true), 0755);
+ }
+
+ {
+ chmod_transformer ct{"Fu+x", 0022};
+ EXPECT_EQ_MODE(ct.transform(0644, false), 0744);
+ EXPECT_EQ_MODE(ct.transform(0755, false), 0755);
+ EXPECT_EQ_MODE(ct.transform(0644, true), std::nullopt);
+ EXPECT_EQ_MODE(ct.transform(0755, true), std::nullopt);
+ }
+
+ {
+ chmod_transformer ct{"Du+x", 0022};
+ EXPECT_EQ_MODE(ct.transform(0644, false), std::nullopt);
+ EXPECT_EQ_MODE(ct.transform(0755, false), std::nullopt);
+ EXPECT_EQ_MODE(ct.transform(0644, true), 0744);
+ EXPECT_EQ_MODE(ct.transform(0755, true), 0755);
+ }
+}
+
+TEST(chmod_transformer, random) {
+ using xfm = chmod_transformer;
+ EXPECT_EQ_MODE(xfm("o=wxr", 0533).transform(02136, false), 02137);
+ EXPECT_EQ_MODE(xfm("oug-Xw", 0746).transform(022, false), 00);
+ EXPECT_EQ_MODE(xfm("g+x", 0520).transform(02402, false), 02412);
+ EXPECT_EQ_MODE(xfm("a=rw", 0445).transform(030, false), 0666);
+ EXPECT_EQ_MODE(xfm("303", 0305).transform(060, false), 0303);
+ EXPECT_EQ_MODE(xfm("u+tXs", 0334).transform(040, false), 04040);
+ EXPECT_EQ_MODE(xfm("0504", 0334).transform(0402, false), 0504);
+ EXPECT_EQ_MODE(xfm("g-r=Xt", 0071).transform(0553, false), 0513);
+ EXPECT_EQ_MODE(xfm("g-u", 0020).transform(0766, false), 0706);
+ EXPECT_EQ_MODE(xfm("oa=swx", 0453).transform(0432, false), 06333);
+ EXPECT_EQ_MODE(xfm("oa+w", 0515).transform(02330, false), 02332);
+ EXPECT_EQ_MODE(xfm("uao=Xx", 0773).transform(0440, false), 0111);
+ EXPECT_EQ_MODE(xfm("oau=ts", 0426).transform(0727, false), 07000);
+ EXPECT_EQ_MODE(xfm("=727", 0714).transform(035, false), 0727);
+ EXPECT_EQ_MODE(xfm("g+xws", 0046).transform(0632, false), 02632);
+ EXPECT_EQ_MODE(xfm("=653", 0515).transform(0154, false), 0653);
+ EXPECT_EQ_MODE(xfm("a+s", 0026).transform(0223, false), 06223);
+ EXPECT_EQ_MODE(xfm("ago-xt", 0053).transform(0677, false), 0666);
+ EXPECT_EQ_MODE(xfm("aug=o", 0175).transform(02712, false), 0222);
+ EXPECT_EQ_MODE(xfm("gu-s", 0473).transform(0204, false), 0204);
+ EXPECT_EQ_MODE(xfm("gua+o", 0050).transform(0667, false), 0777);
+ EXPECT_EQ_MODE(xfm("g-r", 0250).transform(072, false), 032);
+ EXPECT_EQ_MODE(xfm("a-swt", 0270).transform(0757, false), 0555);
+ EXPECT_EQ_MODE(xfm("uga+Xr", 0572).transform(0361, false), 0775);
+ EXPECT_EQ_MODE(xfm("ua+ws", 0640).transform(076, false), 06276);
+ EXPECT_EQ_MODE(xfm("oa+s", 0240).transform(0761, false), 06761);
+ EXPECT_EQ_MODE(xfm("u-tX", 0566).transform(0366, false), 0266);
+ EXPECT_EQ_MODE(xfm("ou+tsr", 0007).transform(0216, false), 05616);
+ EXPECT_EQ_MODE(xfm("ug+t", 0470).transform(0403, false), 0403);
+ EXPECT_EQ_MODE(xfm("go+xs", 0425).transform(02216, false), 02217);
+ EXPECT_EQ_MODE(xfm("o-t", 0066).transform(0624, false), 0624);
+ EXPECT_EQ_MODE(xfm("g+g", 0250).transform(0224, false), 0224);
+ EXPECT_EQ_MODE(xfm("ag+o", 0410).transform(0736, false), 0776);
+ EXPECT_EQ_MODE(xfm("o+st", 0345).transform(0636, false), 01636);
+ EXPECT_EQ_MODE(xfm("253", 0460).transform(0261, false), 0253);
+ EXPECT_EQ_MODE(xfm("ou-sr", 0767).transform(0651, false), 0251);
+ EXPECT_EQ_MODE(xfm("o+w", 0263).transform(0345, false), 0347);
+ EXPECT_EQ_MODE(xfm("oa+st", 0441).transform(0767, false), 07767);
+ EXPECT_EQ_MODE(xfm("oga-rws", 0442).transform(0322, false), 0100);
+ EXPECT_EQ_MODE(xfm("ag+xrX", 0425).transform(0462, false), 0577);
+ EXPECT_EQ_MODE(xfm("go+tws", 0210).transform(0206, false), 03226);
+ EXPECT_EQ_MODE(xfm("a+o", 0227).transform(02132, false), 02332);
+ EXPECT_EQ_MODE(xfm("ga+u", 0220).transform(0242, false), 0262);
+ EXPECT_EQ_MODE(xfm("ga-Xw", 0765).transform(0114, false), 04);
+ EXPECT_EQ_MODE(xfm("ga-rw", 0112).transform(04211, false), 04011);
+ EXPECT_EQ_MODE(xfm("u+trw", 0636).transform(0135, false), 0735);
+ EXPECT_EQ_MODE(xfm("730", 0103).transform(0664, false), 0730);
+ EXPECT_EQ_MODE(xfm("o=wx", 0336).transform(0770, false), 0773);
+ EXPECT_EQ_MODE(xfm("gu-ws", 0760).transform(0102, false), 0102);
+ EXPECT_EQ_MODE(xfm("g+srt", 0616).transform(00, false), 02040);
+ EXPECT_EQ_MODE(xfm("o=str", 0547).transform(0446, false), 01444);
+ EXPECT_EQ_MODE(xfm("o+Xxw", 0554).transform(0703, false), 0703);
+ EXPECT_EQ_MODE(xfm("o-rw", 0531).transform(0545, false), 0541);
+ EXPECT_EQ_MODE(xfm("a+o", 0345).transform(04254, false), 04654);
+ EXPECT_EQ_MODE(xfm("guo+xtw", 0013).transform(0703, false), 01733);
+ EXPECT_EQ_MODE(xfm("ga+r", 0406).transform(047, false), 0447);
+ EXPECT_EQ_MODE(xfm("ug+Xsw", 0020).transform(0173, false), 06373);
+ EXPECT_EQ_MODE(xfm("go=o", 0765).transform(0667, false), 0677);
+ EXPECT_EQ_MODE(xfm("ga+sx", 0710).transform(0654, false), 06755);
+ EXPECT_EQ_MODE(xfm("o=tX", 0450).transform(0346, false), 01341);
+ EXPECT_EQ_MODE(xfm("u-x", 0457).transform(0734, false), 0634);
+ EXPECT_EQ_MODE(xfm("ga-x=t+t", 0751).transform(0600, false), 01000);
+ EXPECT_EQ_MODE(xfm("oau=tX", 0725).transform(0510, false), 01111);
+ EXPECT_EQ_MODE(xfm("g+w", 0050).transform(0725, false), 0725);
+ EXPECT_EQ_MODE(xfm("ua+s=X", 0432).transform(0764, false), 0111);
+ EXPECT_EQ_MODE(xfm("a=g", 0640).transform(050, false), 0555);
+ EXPECT_EQ_MODE(xfm("o=sXt", 0565).transform(0622, false), 01620);
+ EXPECT_EQ_MODE(xfm("ag=o", 0762).transform(03, false), 0333);
+ EXPECT_EQ_MODE(xfm("oug-w", 0136).transform(0445, false), 0445);
+ EXPECT_EQ_MODE(xfm("u-w", 0173).transform(00, false), 00);
+ EXPECT_EQ_MODE(xfm("oua-tX", 0643).transform(024, false), 024);
+ EXPECT_EQ_MODE(xfm("+0710", 0761).transform(0646, false), 0756);
+ EXPECT_EQ_MODE(xfm("oau=w", 0604).transform(0442, false), 0222);
+ EXPECT_EQ_MODE(xfm("a+rs", 0627).transform(0601, false), 06645);
+ EXPECT_EQ_MODE(xfm("oga+wX", 0235).transform(0207, false), 0337);
+ EXPECT_EQ_MODE(xfm("ga-s", 0300).transform(0616, false), 0616);
+ EXPECT_EQ_MODE(xfm("og+rwt", 0536).transform(04337, false), 05377);
+ EXPECT_EQ_MODE(xfm("go=g", 0134).transform(041, false), 044);
+ EXPECT_EQ_MODE(xfm("237", 0516).transform(0536, false), 0237);
+ EXPECT_EQ_MODE(xfm("ug=rxX", 0766).transform(0140, false), 0550);
+ EXPECT_EQ_MODE(xfm("goa=x-xX", 0211).transform(0464, false), 00);
+ EXPECT_EQ_MODE(xfm("ag=w", 0342).transform(0150, false), 0222);
+ EXPECT_EQ_MODE(xfm("761", 0162).transform(0734, false), 0761);
+ EXPECT_EQ_MODE(xfm("oa-g", 0302).transform(0200, false), 0200);
+ EXPECT_EQ_MODE(xfm("ug-o", 0571).transform(04237, false), 04007);
+ EXPECT_EQ_MODE(xfm("gu+xX", 0423).transform(01451, false), 01551);
+ EXPECT_EQ_MODE(xfm("goa-o", 0445).transform(04642, false), 04440);
+ EXPECT_EQ_MODE(xfm("uog-u", 0260).transform(0653, false), 011);
+ EXPECT_EQ_MODE(xfm("og+t", 0433).transform(0147, false), 01147);
+ EXPECT_EQ_MODE(xfm("au-g", 0075).transform(022, false), 00);
+ EXPECT_EQ_MODE(xfm("a=Xx", 0430).transform(0242, false), 0111);
+ EXPECT_EQ_MODE(xfm("ug-rws", 0560).transform(0646, false), 06);
+ EXPECT_EQ_MODE(xfm("gu-rtw", 0442).transform(0620, false), 00);
+ EXPECT_EQ_MODE(xfm("uo=w", 0163).transform(0625, false), 0222);
+ EXPECT_EQ_MODE(xfm("a+t", 0201).transform(040, false), 01040);
+ EXPECT_EQ_MODE(xfm("=010", 0106).transform(01761, false), 010);
+ EXPECT_EQ_MODE(xfm("u=u", 0242).transform(0555, false), 0555);
+ EXPECT_EQ_MODE(xfm("ug-u", 0762).transform(02260, false), 02040);
+ EXPECT_EQ_MODE(xfm("uo+g", 0023).transform(0723, false), 0723);
+ EXPECT_EQ_MODE(xfm("o-rw", 0607).transform(04361, false), 04361);
+ EXPECT_EQ_MODE(xfm("o-g", 0603).transform(0656, false), 0652);
+ EXPECT_EQ_MODE(xfm("u=xw", 0171).transform(0775, false), 0375);
+ EXPECT_EQ_MODE(xfm("agu+x-sx", 0771).transform(0321, false), 0220);
+ EXPECT_EQ_MODE(xfm("g=xr", 0671).transform(04233, false), 04253);
+ EXPECT_EQ_MODE(xfm("ao-tw", 0305).transform(0233, false), 011);
+ EXPECT_EQ_MODE(xfm("goa-rw", 0514).transform(02005, false), 02001);
+ EXPECT_EQ_MODE(xfm("gu-u", 0416).transform(02542, false), 02002);
+ EXPECT_EQ_MODE(xfm("u+txw", 0736).transform(0173, false), 0373);
+ EXPECT_EQ_MODE(xfm("u+r", 0055).transform(0103, false), 0503);
+ EXPECT_EQ_MODE(xfm("o-sr", 0732).transform(0457, false), 0453);
+ EXPECT_EQ_MODE(xfm("g-swx", 0201).transform(0162, false), 0142);
+ EXPECT_EQ_MODE(xfm("gao+wX", 0745).transform(0704, false), 0737);
+ EXPECT_EQ_MODE(xfm("ao-r", 0411).transform(02614, false), 02210);
+ EXPECT_EQ_MODE(xfm("420", 0070).transform(0324, false), 0420);
+ EXPECT_EQ_MODE(xfm("u=rXw", 0457).transform(0613, false), 0713);
+ EXPECT_EQ_MODE(xfm("au=s", 0646).transform(0530, false), 06000);
+ EXPECT_EQ_MODE(xfm("ag+r", 0344).transform(0631, false), 0675);
+ EXPECT_EQ_MODE(xfm("a+g", 0210).transform(0724, false), 0726);
+ EXPECT_EQ_MODE(xfm("go-g", 0374).transform(0772, false), 0700);
+ EXPECT_EQ_MODE(xfm("ug-t", 0300).transform(0553, false), 0553);
+ EXPECT_EQ_MODE(xfm("au-X", 0214).transform(0662, false), 0662);
+ EXPECT_EQ_MODE(xfm("oa-o", 0632).transform(0667, false), 00);
+ EXPECT_EQ_MODE(xfm("agu-x", 0145).transform(0324, false), 0224);
+ EXPECT_EQ_MODE(xfm("a+rXs", 0500).transform(02174, false), 06575);
+ EXPECT_EQ_MODE(xfm("ua+g", 0426).transform(0506, false), 0506);
+ EXPECT_EQ_MODE(xfm("a=g", 0750).transform(0553, false), 0555);
+ EXPECT_EQ_MODE(xfm("ug=Xt", 0775).transform(0740, false), 0110);
+ EXPECT_EQ_MODE(xfm("ou=Xr", 0137).transform(0163, false), 0565);
+ EXPECT_EQ_MODE(xfm("472", 0457).transform(0306, false), 0472);
+ EXPECT_EQ_MODE(xfm("g=Xx", 0535).transform(077, false), 017);
+ EXPECT_EQ_MODE(xfm("o-tXx", 0354).transform(051, false), 050);
+ EXPECT_EQ_MODE(xfm("uga-rX", 0007).transform(04766, false), 04222);
+ EXPECT_EQ_MODE(xfm("047", 0224).transform(0763, false), 047);
+ EXPECT_EQ_MODE(xfm("u-t", 0014).transform(0663, false), 0663);
+ EXPECT_EQ_MODE(xfm("ou-g", 0330).transform(02715, false), 02614);
+ EXPECT_EQ_MODE(xfm("g+x", 0307).transform(0462, false), 0472);
+ EXPECT_EQ_MODE(xfm("aou=rw", 0313).transform(04504, false), 0666);
+ EXPECT_EQ_MODE(xfm("uo=stx", 0065).transform(02763, false), 07161);
+ EXPECT_EQ_MODE(xfm("go=tw", 0041).transform(0751, false), 01722);
+ EXPECT_EQ_MODE(xfm("gu-X+tr", 0361).transform(02005, false), 02445);
+ EXPECT_EQ_MODE(xfm("go+o", 0464).transform(02234, false), 02274);
+ EXPECT_EQ_MODE(xfm("o+t", 0372).transform(0545, false), 01545);
+ EXPECT_EQ_MODE(xfm("go+rt", 0627).transform(0703, false), 01747);
+ EXPECT_EQ_MODE(xfm("g+Xxt", 0662).transform(061, false), 071);
+ EXPECT_EQ_MODE(xfm("aug-sXt", 0152).transform(0240, false), 0240);
+ EXPECT_EQ_MODE(xfm("ou+x", 0704).transform(016, false), 0117);
+ EXPECT_EQ_MODE(xfm("ga+x", 0742).transform(0727, false), 0737);
+ EXPECT_EQ_MODE(xfm("o-sxt", 0602).transform(0774, false), 0774);
+ EXPECT_EQ_MODE(xfm("g-s", 0203).transform(0340, false), 0340);
+ EXPECT_EQ_MODE(xfm("og+t", 0230).transform(0757, false), 01757);
+ EXPECT_EQ_MODE(xfm("au=o", 0327).transform(0525, false), 0555);
+ EXPECT_EQ_MODE(xfm("o=o", 0371).transform(0224, false), 0224);
+ EXPECT_EQ_MODE(xfm("gua-wrX", 0235).transform(01057, false), 01000);
+ EXPECT_EQ_MODE(xfm("ag+xts", 0151).transform(0521, false), 07531);
+ EXPECT_EQ_MODE(xfm("oua+rX", 0311).transform(0100, false), 0555);
+ EXPECT_EQ_MODE(xfm("go-w", 0451).transform(0545, false), 0545);
+ EXPECT_EQ_MODE(xfm("g=Xtw", 0706).transform(0170, false), 0130);
+ EXPECT_EQ_MODE(xfm("ou=xs", 0614).transform(0322, false), 04121);
+ EXPECT_EQ_MODE(xfm("g-Xx", 0266).transform(0126, false), 0126);
+ EXPECT_EQ_MODE(xfm("gu+u", 0150).transform(0602, false), 0662);
+ EXPECT_EQ_MODE(xfm("o=w", 0613).transform(0164, false), 0162);
+ EXPECT_EQ_MODE(xfm("go=o", 0143).transform(0230, false), 0200);
+ EXPECT_EQ_MODE(xfm("o+xw", 0522).transform(0151, false), 0153);
+ EXPECT_EQ_MODE(xfm("go=X", 0240).transform(02045, false), 011);
+ EXPECT_EQ_MODE(xfm("o+t-Xxt", 0607).transform(046, false), 046);
+ EXPECT_EQ_MODE(xfm("u=st", 0261).transform(02731, false), 06031);
+ EXPECT_EQ_MODE(xfm("g=tx", 0451).transform(0204, false), 0214);
+ EXPECT_EQ_MODE(xfm("g-Xws", 0701).transform(0674, false), 0644);
+ EXPECT_EQ_MODE(xfm("uo-o", 0520).transform(0570, false), 0570);
+ EXPECT_EQ_MODE(xfm("u=Xs", 0545).transform(0111, false), 04111);
+ EXPECT_EQ_MODE(xfm("706", 0777).transform(00, false), 0706);
+ EXPECT_EQ_MODE(xfm("112", 0105).transform(0625, false), 0112);
+ EXPECT_EQ_MODE(xfm("oa-Xw", 0454).transform(0745, false), 0444);
+ EXPECT_EQ_MODE(xfm("g=r", 0163).transform(0610, false), 0640);
+ EXPECT_EQ_MODE(xfm("672", 0601).transform(0660, false), 0672);
+ EXPECT_EQ_MODE(xfm("ug=rx", 0624).transform(0207, false), 0557);
+ EXPECT_EQ_MODE(xfm("ua=u", 0415).transform(062, false), 00);
+ EXPECT_EQ_MODE(xfm("ug=rxt", 0170).transform(0204, false), 0554);
+ EXPECT_EQ_MODE(xfm("oau=xrs", 0134).transform(0224, false), 06555);
+ EXPECT_EQ_MODE(xfm("o=g", 0262).transform(04734, false), 04733);
+ EXPECT_EQ_MODE(xfm("=740", 0311).transform(0363, false), 0740);
+ EXPECT_EQ_MODE(xfm("ou+s", 0540).transform(0647, false), 04647);
+ EXPECT_EQ_MODE(xfm("aog-g", 0231).transform(0767, false), 0101);
+ EXPECT_EQ_MODE(xfm("u-X", 0135).transform(070, false), 070);
+ EXPECT_EQ_MODE(xfm("536", 0365).transform(01631, false), 0536);
+ EXPECT_EQ_MODE(xfm("a-x", 0514).transform(01422, false), 01422);
+ EXPECT_EQ_MODE(xfm("og-u", 0661).transform(0544, false), 0500);
+ EXPECT_EQ_MODE(xfm("a=tX", 0443).transform(0762, false), 01111);
+ EXPECT_EQ_MODE(xfm("u+s", 0017).transform(053, false), 04053);
+ EXPECT_EQ_MODE(xfm("a+trX", 0501).transform(0420, false), 01464);
+ EXPECT_EQ_MODE(xfm("056", 0334).transform(0240, false), 056);
+ EXPECT_EQ_MODE(xfm("ua-X", 0641).transform(0523, false), 0422);
+ EXPECT_EQ_MODE(xfm("737", 0141).transform(0646, false), 0737);
+ EXPECT_EQ_MODE(xfm("u+t", 0072).transform(0451, false), 0451);
+ EXPECT_EQ_MODE(xfm("1700", 0600).transform(01407, false), 01700);
+ EXPECT_EQ_MODE(xfm("a+g", 0221).transform(0720, false), 0722);
+ EXPECT_EQ_MODE(xfm("ga-g", 0461).transform(032, false), 00);
+ EXPECT_EQ_MODE(xfm("ou=u", 0070).transform(0744, false), 0747);
+ EXPECT_EQ_MODE(xfm("o-X", 0211).transform(04162, false), 04162);
+ EXPECT_EQ_MODE(xfm("uo+X", 0617).transform(0773, false), 0773);
+ EXPECT_EQ_MODE(xfm("oa+xs", 0653).transform(026, false), 06137);
+ EXPECT_EQ_MODE(xfm("a=tX", 0771).transform(0257, false), 01111);
+ EXPECT_EQ_MODE(xfm("o-ts", 0126).transform(0704, false), 0704);
+ EXPECT_EQ_MODE(xfm("ou=o", 0601).transform(0470, false), 070);
+ EXPECT_EQ_MODE(xfm("ua=xX", 0153).transform(0337, false), 0111);
+ EXPECT_EQ_MODE(xfm("g-g", 0532).transform(0547, false), 0507);
+ EXPECT_EQ_MODE(xfm("a+tw", 0740).transform(0713, false), 01733);
+ EXPECT_EQ_MODE(xfm("u=u", 0106).transform(0640, false), 0640);
+ EXPECT_EQ_MODE(xfm("uao+w-ws", 0707).transform(040, false), 040);
+ EXPECT_EQ_MODE(xfm("o+g", 0572).transform(0266, false), 0266);
+ EXPECT_EQ_MODE(xfm("ug=rx", 0356).transform(0561, false), 0551);
+ EXPECT_EQ_MODE(xfm("u=rx", 0233).transform(0314, false), 0514);
+ EXPECT_EQ_MODE(xfm("uo=o", 0456).transform(0651, false), 0151);
+ EXPECT_EQ_MODE(xfm("uog-X=xr", 0445).transform(0714, false), 0555);
+ EXPECT_EQ_MODE(xfm("u+t", 0115).transform(0566, false), 0566);
+ EXPECT_EQ_MODE(xfm("g=rx", 0343).transform(024, false), 054);
+ EXPECT_EQ_MODE(xfm("a+w", 0614).transform(0773, false), 0773);
+ EXPECT_EQ_MODE(xfm("oga=s", 0027).transform(02055, false), 06000);
+ EXPECT_EQ_MODE(xfm("ga-g", 0452).transform(062, false), 00);
+ EXPECT_EQ_MODE(xfm("oua=x", 0133).transform(0643, false), 0111);
+ EXPECT_EQ_MODE(xfm("a+wt", 0375).transform(0127, false), 01327);
+ EXPECT_EQ_MODE(xfm("aog=x", 0767).transform(0236, false), 0111);
+ EXPECT_EQ_MODE(xfm("a=s+w", 0404).transform(0347, false), 06222);
+ EXPECT_EQ_MODE(xfm("ua-w=wrx", 0247).transform(0103, false), 0777);
+ EXPECT_EQ_MODE(xfm("uo=tsx", 0746).transform(0513, false), 05111);
+ EXPECT_EQ_MODE(xfm("710", 0775).transform(02266, false), 0710);
+ EXPECT_EQ_MODE(xfm("-1130", 0147).transform(0542, false), 0442);
+ EXPECT_EQ_MODE(xfm("o-Xws", 0014).transform(0673, false), 0670);
+ EXPECT_EQ_MODE(xfm("o-x", 0121).transform(04625, false), 04624);
+ EXPECT_EQ_MODE(xfm("g-u", 0250).transform(0503, false), 0503);
+ EXPECT_EQ_MODE(xfm("u=t", 0512).transform(0307, false), 07);
+ EXPECT_EQ_MODE(xfm("gau+r=Xsw", 0375).transform(0572, false), 06333);
+ EXPECT_EQ_MODE(xfm("oa-s", 0340).transform(0516, false), 0516);
+ EXPECT_EQ_MODE(xfm("u+wts", 0461).transform(0353, false), 04353);
+ EXPECT_EQ_MODE(xfm("ua+wr", 0602).transform(02456, false), 02676);
+ EXPECT_EQ_MODE(xfm("og+twx", 0504).transform(0645, false), 01677);
+ EXPECT_EQ_MODE(xfm("ua+u", 0034).transform(0310, false), 0333);
+ EXPECT_EQ_MODE(xfm("uo=wsr", 0602).transform(02077, false), 06676);
+ EXPECT_EQ_MODE(xfm("u+X=tX", 0130).transform(0432, false), 0132);
+ EXPECT_EQ_MODE(xfm("ga-rx", 0300).transform(0464, false), 020);
+ EXPECT_EQ_MODE(xfm("o-X+swt", 0613).transform(02020, false), 03022);
+ EXPECT_EQ_MODE(xfm("ua-xt", 0727).transform(0166, false), 066);
+ EXPECT_EQ_MODE(xfm("go+X", 0371).transform(0154, false), 0155);
+ EXPECT_EQ_MODE(xfm("o-s", 0573).transform(0252, false), 0252);
+ EXPECT_EQ_MODE(xfm("g+stw", 0121).transform(0731, false), 02731);
+ EXPECT_EQ_MODE(xfm("a+wX", 0037).transform(07, false), 0337);
+ EXPECT_EQ_MODE(xfm("uo=xs", 0560).transform(012, false), 04111);
+ EXPECT_EQ_MODE(xfm("ua+g", 0660).transform(0523, false), 0723);
+ EXPECT_EQ_MODE(xfm("u+tx", 0425).transform(04755, false), 04755);
+ EXPECT_EQ_MODE(xfm("ga+Xst", 0421).transform(057, false), 07157);
+ EXPECT_EQ_MODE(xfm("uga=srx", 0235).transform(0177, false), 06555);
+ EXPECT_EQ_MODE(xfm("u=wt", 0540).transform(0442, false), 0242);
+ EXPECT_EQ_MODE(xfm("a=g", 0377).transform(0245, false), 0444);
+ EXPECT_EQ_MODE(xfm("g=xs", 0572).transform(054, false), 02014);
+ EXPECT_EQ_MODE(xfm("ug=w+t-s", 0712).transform(0212, false), 0222);
+ EXPECT_EQ_MODE(xfm("oug+Xsw", 0266).transform(0577, false), 06777);
+ EXPECT_EQ_MODE(xfm("agu=X", 0251).transform(0143, false), 0111);
+ EXPECT_EQ_MODE(xfm("gu+xtr", 0351).transform(0340, false), 0750);
+ EXPECT_EQ_MODE(xfm("g+u", 0511).transform(0352, false), 0372);
+ EXPECT_EQ_MODE(xfm("go-o", 0736).transform(0374, false), 0330);
+ EXPECT_EQ_MODE(xfm("oau=w", 0421).transform(0237, false), 0222);
+ EXPECT_EQ_MODE(xfm("gao+x", 0123).transform(0354, false), 0355);
+ EXPECT_EQ_MODE(xfm("a+rt", 0453).transform(02036, false), 03476);
+ EXPECT_EQ_MODE(xfm("uo+g", 0527).transform(02137, false), 02337);
+ EXPECT_EQ_MODE(xfm("ag=o", 0715).transform(040, false), 00);
+ EXPECT_EQ_MODE(xfm("g-wt", 0252).transform(04273, false), 04253);
+ EXPECT_EQ_MODE(xfm("a=s", 0164).transform(0307, false), 06000);
+ EXPECT_EQ_MODE(xfm("ua+w", 0513).transform(0136, false), 0336);
+ EXPECT_EQ_MODE(xfm("ao=sx", 0442).transform(05, false), 06111);
+ EXPECT_EQ_MODE(xfm("461", 0340).transform(04020, false), 0461);
+ EXPECT_EQ_MODE(xfm("744", 0645).transform(02120, false), 0744);
+ EXPECT_EQ_MODE(xfm("oa=t", 0770).transform(0537, false), 01000);
+ EXPECT_EQ_MODE(xfm("gou=xX", 0654).transform(0265, false), 0111);
+ EXPECT_EQ_MODE(xfm("ou+g", 0160).transform(0712, false), 0713);
+ EXPECT_EQ_MODE(xfm("ug+Xs", 0776).transform(0523, false), 06533);
+ EXPECT_EQ_MODE(xfm("go=sx", 0675).transform(02703, false), 02711);
+ EXPECT_EQ_MODE(xfm("o=g", 0531).transform(00, false), 00);
+ EXPECT_EQ_MODE(xfm("u+tr", 0445).transform(0577, false), 0577);
+ EXPECT_EQ_MODE(xfm("o+tr", 0427).transform(0375, false), 01375);
+ EXPECT_EQ_MODE(xfm("o=r", 0507).transform(0645, false), 0644);
+ EXPECT_EQ_MODE(xfm("ag-w", 0535).transform(0247, false), 045);
+ EXPECT_EQ_MODE(xfm("ua=w", 0454).transform(0642, false), 0222);
+ EXPECT_EQ_MODE(xfm("ga=w", 0025).transform(0326, false), 0222);
+ EXPECT_EQ_MODE(xfm("g=w", 0622).transform(046, false), 026);
+ EXPECT_EQ_MODE(xfm("-0614", 0226).transform(0304, false), 0100);
+ EXPECT_EQ_MODE(xfm("a=x", 0720).transform(032, false), 0111);
+ EXPECT_EQ_MODE(xfm("uo-xX", 0512).transform(0622, false), 0622);
+ EXPECT_EQ_MODE(xfm("u=Xxr", 0733).transform(0414, false), 0514);
+ EXPECT_EQ_MODE(xfm("a+X", 0142).transform(04777, false), 04777);
+ EXPECT_EQ_MODE(xfm("a-u", 0416).transform(0456, false), 012);
+ EXPECT_EQ_MODE(xfm("gua+sX", 0112).transform(0310, false), 06311);
+ EXPECT_EQ_MODE(xfm("a-wt", 0171).transform(04230, false), 04010);
+ EXPECT_EQ_MODE(xfm("=4433", 0263).transform(0264, false), 04433);
+ EXPECT_EQ_MODE(xfm("o=xt", 0466).transform(044, false), 01041);
+ EXPECT_EQ_MODE(xfm("ug+srx", 0543).transform(0522, false), 06572);
+ EXPECT_EQ_MODE(xfm("au-sx", 0004).transform(0551, false), 0440);
+ EXPECT_EQ_MODE(xfm("o-s", 0203).transform(0737, false), 0737);
+ EXPECT_EQ_MODE(xfm("o-r+sx", 0347).transform(0126, false), 0123);
+ EXPECT_EQ_MODE(xfm("g-u", 0655).transform(0536, false), 0526);
+ EXPECT_EQ_MODE(xfm("uo-wrx", 0666).transform(01744, false), 01040);
+ EXPECT_EQ_MODE(xfm("g+rsx", 0772).transform(0647, false), 02657);
+ EXPECT_EQ_MODE(xfm("a-u", 0206).transform(0761, false), 00);
+ EXPECT_EQ_MODE(xfm("423", 0662).transform(0277, false), 0423);
+ EXPECT_EQ_MODE(xfm("ug=r-x", 0246).transform(0677, false), 0447);
+ EXPECT_EQ_MODE(xfm("a=w", 0107).transform(032, false), 0222);
+ EXPECT_EQ_MODE(xfm("ao+g", 0024).transform(0100, false), 0100);
+ EXPECT_EQ_MODE(xfm("oa+sr", 0616).transform(013, false), 06457);
+ EXPECT_EQ_MODE(xfm("ua+xt", 0347).transform(01710, false), 01711);
+ EXPECT_EQ_MODE(xfm("g=o", 0057).transform(0306, false), 0366);
+ EXPECT_EQ_MODE(xfm("g-xs", 0411).transform(06, false), 06);
+ EXPECT_EQ_MODE(xfm("oa=rX", 0745).transform(020, false), 0444);
+ EXPECT_EQ_MODE(xfm("ug-o", 0711).transform(0364, false), 0324);
+ EXPECT_EQ_MODE(xfm("ao+u", 0521).transform(0431, false), 0475);
+ EXPECT_EQ_MODE(xfm("g-wr", 0165).transform(0776, false), 0716);
+ EXPECT_EQ_MODE(xfm("o-sr", 0677).transform(036, false), 032);
+ EXPECT_EQ_MODE(xfm("267", 0675).transform(0464, false), 0267);
+ EXPECT_EQ_MODE(xfm("ou=u", 0770).transform(0465, false), 0464);
+ EXPECT_EQ_MODE(xfm("auo-X", 0134).transform(0762, false), 0662);
+ EXPECT_EQ_MODE(xfm("go-Xs", 0357).transform(0520, false), 0520);
+ EXPECT_EQ_MODE(xfm("a+s", 0045).transform(0667, false), 06667);
+ EXPECT_EQ_MODE(xfm("561", 0511).transform(0356, false), 0561);
+ EXPECT_EQ_MODE(xfm("o-ts", 0004).transform(07, false), 07);
+ EXPECT_EQ_MODE(xfm("u-rxs", 0600).transform(0641, false), 0241);
+ EXPECT_EQ_MODE(xfm("uo=wX", 0440).transform(024, false), 0222);
+ EXPECT_EQ_MODE(xfm("u+x", 0260).transform(0727, false), 0727);
+ EXPECT_EQ_MODE(xfm("=501", 0744).transform(01370, false), 0501);
+ EXPECT_EQ_MODE(xfm("ga=t", 0253).transform(01401, false), 01000);
+ EXPECT_EQ_MODE(xfm("ua+x", 0516).transform(0712, false), 0713);
+ EXPECT_EQ_MODE(xfm("gu=s", 0424).transform(0762, false), 06002);
+ EXPECT_EQ_MODE(xfm("2237", 0354).transform(020, false), 02237);
+ EXPECT_EQ_MODE(xfm("au+sXw", 0367).transform(07, false), 06337);
+ EXPECT_EQ_MODE(xfm("ug+Xw", 0121).transform(0651, false), 0771);
+ EXPECT_EQ_MODE(xfm("a+Xs", 0355).transform(0677, false), 06777);
+ EXPECT_EQ_MODE(xfm("515", 0563).transform(04136, false), 0515);
+ EXPECT_EQ_MODE(xfm("g-o", 0242).transform(0772, false), 0752);
+ EXPECT_EQ_MODE(xfm("au+rw", 0750).transform(0355, false), 0777);
+ EXPECT_EQ_MODE(xfm("a=u", 0577).transform(0160, false), 0111);
+ EXPECT_EQ_MODE(xfm("ug-Xw", 0476).transform(0523, false), 0403);
+ EXPECT_EQ_MODE(xfm("a+tX", 0134).transform(0555, false), 01555);
+ EXPECT_EQ_MODE(xfm("ou-s", 0057).transform(0721, false), 0721);
+ EXPECT_EQ_MODE(xfm("173", 0666).transform(070, false), 0173);
+ EXPECT_EQ_MODE(xfm("u+x", 0465).transform(01373, false), 01373);
+ EXPECT_EQ_MODE(xfm("ua+Xsw", 0121).transform(0377, false), 06377);
+ EXPECT_EQ_MODE(xfm("o=tsX", 0410).transform(0601, false), 01601);
+ EXPECT_EQ_MODE(xfm("u-r=wt", 0525).transform(0524, false), 0224);
+ EXPECT_EQ_MODE(xfm("ou=ts", 0261).transform(0361, false), 05060);
+ EXPECT_EQ_MODE(xfm("og+wxX", 0316).transform(0452, false), 0473);
+ EXPECT_EQ_MODE(xfm("g-x", 0111).transform(0760, false), 0760);
+ EXPECT_EQ_MODE(xfm("og+ws", 0763).transform(0737, false), 02737);
+ EXPECT_EQ_MODE(xfm("o+r", 0377).transform(00, false), 04);
+ EXPECT_EQ_MODE(xfm("gou=t", 0125).transform(0346, false), 01000);
+ EXPECT_EQ_MODE(xfm("ao-w", 0065).transform(0726, false), 0504);
+ EXPECT_EQ_MODE(xfm("u=s-X", 0523).transform(0730, false), 04030);
+ EXPECT_EQ_MODE(xfm("ga-X", 0315).transform(021, false), 020);
+ EXPECT_EQ_MODE(xfm("+270", 0702).transform(0753, false), 0773);
+ EXPECT_EQ_MODE(xfm("a-w+t", 0477).transform(0332, false), 01110);
+ EXPECT_EQ_MODE(xfm("o-t+x", 0000).transform(0701, false), 0701);
+ EXPECT_EQ_MODE(xfm("uo-xt", 0376).transform(0576, false), 0476);
+ EXPECT_EQ_MODE(xfm("o=u", 0055).transform(0345, false), 0343);
+ EXPECT_EQ_MODE(xfm("og+rXt", 0514).transform(04406, false), 05446);
+ EXPECT_EQ_MODE(xfm("gu+o", 0007).transform(0420, false), 0420);
+ EXPECT_EQ_MODE(xfm("uo+txw", 0145).transform(0672, false), 01773);
+ EXPECT_EQ_MODE(xfm("gu+o", 0567).transform(0517, false), 0777);
+ EXPECT_EQ_MODE(xfm("ug-xr", 0472).transform(0200, false), 0200);
+ EXPECT_EQ_MODE(xfm("gu-X+stw", 0174).transform(0767, false), 06667);
+ EXPECT_EQ_MODE(xfm("o=t", 0536).transform(050, false), 01050);
+ EXPECT_EQ_MODE(xfm("ao+t", 0730).transform(0545, false), 01545);
+ EXPECT_EQ_MODE(xfm("u+tx", 0553).transform(0274, false), 0374);
+ EXPECT_EQ_MODE(xfm("u-r=s+t", 0601).transform(0502, false), 04002);
+ EXPECT_EQ_MODE(xfm("gu-rX", 0306).transform(0200, false), 0200);
+ EXPECT_EQ_MODE(xfm("o+g", 0143).transform(075, false), 077);
+ EXPECT_EQ_MODE(xfm("gau+o", 0242).transform(04241, false), 04351);
+ EXPECT_EQ_MODE(xfm("ua=Xr", 0460).transform(0402, false), 0444);
+ EXPECT_EQ_MODE(xfm("au+o", 0245).transform(044, false), 0444);
+ EXPECT_EQ_MODE(xfm("0475", 0073).transform(00, false), 0475);
+ EXPECT_EQ_MODE(xfm("ua=xrs", 0013).transform(0451, false), 06555);
+ EXPECT_EQ_MODE(xfm("o-st", 0662).transform(0713, false), 0713);
+ EXPECT_EQ_MODE(xfm("uo-rx", 0115).transform(0336, false), 0232);
+ EXPECT_EQ_MODE(xfm("a+s", 0436).transform(01201, false), 07201);
+ EXPECT_EQ_MODE(xfm("a-o", 0520).transform(0733, false), 0400);
+ EXPECT_EQ_MODE(xfm("a+Xt", 0352).transform(0737, false), 01737);
+ EXPECT_EQ_MODE(xfm("aog+rXs", 0206).transform(0230, false), 06775);
+ EXPECT_EQ_MODE(xfm("g-Xr", 0602).transform(064, false), 024);
+ EXPECT_EQ_MODE(xfm("g=w", 0244).transform(0571, false), 0521);
+ EXPECT_EQ_MODE(xfm("ug=Xst", 0615).transform(04044, false), 06004);
+ EXPECT_EQ_MODE(xfm("ga-o", 0002).transform(0541, false), 0440);
+ EXPECT_EQ_MODE(xfm("g+r", 0571).transform(0206, false), 0246);
+ EXPECT_EQ_MODE(xfm("u-r=X", 0677).transform(0321, false), 0121);
+ EXPECT_EQ_MODE(xfm("go=stw", 0632).transform(0347, false), 03322);
+ EXPECT_EQ_MODE(xfm("gu=sr", 0776).transform(0170, false), 06440);
+ EXPECT_EQ_MODE(xfm("ou=sXx", 0152).transform(0420, false), 04121);
+ EXPECT_EQ_MODE(xfm("a-tx", 0357).transform(0432, false), 0422);
+ EXPECT_EQ_MODE(xfm("o=x", 0411).transform(06, false), 01);
+ EXPECT_EQ_MODE(xfm("oa=r", 0501).transform(0364, false), 0444);
+ EXPECT_EQ_MODE(xfm("ao-t", 0424).transform(0400, false), 0400);
+ EXPECT_EQ_MODE(xfm("u=rx", 0407).transform(0323, false), 0523);
+ EXPECT_EQ_MODE(xfm("gau=s", 0303).transform(0464, false), 06000);
+ EXPECT_EQ_MODE(xfm("o-u", 0561).transform(0247, false), 0245);
+ EXPECT_EQ_MODE(xfm("ua-w", 0252).transform(0306, false), 0104);
+ EXPECT_EQ_MODE(xfm("gu=u", 0273).transform(0341, false), 0331);
+ EXPECT_EQ_MODE(xfm("o-r", 0202).transform(02467, false), 02463);
+ EXPECT_EQ_MODE(xfm("ug=Xs", 0243).transform(0562, false), 06112);
+ EXPECT_EQ_MODE(xfm("=131", 0530).transform(036, false), 0131);
+ EXPECT_EQ_MODE(xfm("aou-g", 0132).transform(0337, false), 04);
+ EXPECT_EQ_MODE(xfm("g+s", 0475).transform(0772, false), 02772);
+ EXPECT_EQ_MODE(xfm("oau-xrw", 0530).transform(0666, false), 00);
+ EXPECT_EQ_MODE(xfm("o-ws", 0264).transform(0633, false), 0631);
+ EXPECT_EQ_MODE(xfm("u=rXx", 0045).transform(0252, false), 0552);
+ EXPECT_EQ_MODE(xfm("uo=trw", 0676).transform(0755, false), 01656);
+ EXPECT_EQ_MODE(xfm("auo+ts", 0016).transform(01745, false), 07745);
+ EXPECT_EQ_MODE(xfm("gu+u", 0464).transform(0603, false), 0663);
+ EXPECT_EQ_MODE(xfm("o+s=w", 0417).transform(0505, false), 0502);
+ EXPECT_EQ_MODE(xfm("u+x", 0512).transform(0230, false), 0330);
+ EXPECT_EQ_MODE(xfm("a=s", 0600).transform(0643, false), 06000);
+ EXPECT_EQ_MODE(xfm("agu+rx", 0021).transform(0225, false), 0775);
+ EXPECT_EQ_MODE(xfm("460", 0262).transform(0166, false), 0460);
+ EXPECT_EQ_MODE(xfm("117", 0611).transform(0153, false), 0117);
+ EXPECT_EQ_MODE(xfm("g-tw", 0772).transform(0153, false), 0153);
+ EXPECT_EQ_MODE(xfm("oa-g", 0214).transform(0365, false), 0101);
+ EXPECT_EQ_MODE(xfm("a-X", 0424).transform(0400, false), 0400);
+ EXPECT_EQ_MODE(xfm("go=X", 0074).transform(0457, false), 0411);
+ EXPECT_EQ_MODE(xfm("gu=s", 0232).transform(0411, false), 06001);
+ EXPECT_EQ_MODE(xfm("go+X=sw", 0416).transform(0775, false), 02722);
+ EXPECT_EQ_MODE(xfm("g-wX", 0776).transform(0442, false), 0442);
+ EXPECT_EQ_MODE(xfm("a=x", 0313).transform(024, false), 0111);
+ EXPECT_EQ_MODE(xfm("a+wst", 0567).transform(04745, false), 07767);
+ EXPECT_EQ_MODE(xfm("o+g", 0710).transform(0445, false), 0445);
+ EXPECT_EQ_MODE(xfm("613", 0251).transform(0577, false), 0613);
+ EXPECT_EQ_MODE(xfm("agu-r", 0435).transform(0167, false), 0123);
+ EXPECT_EQ_MODE(xfm("uao+trX", 0347).transform(0337, false), 01777);
+ EXPECT_EQ_MODE(xfm("u-trs", 0774).transform(04142, false), 0142);
+ EXPECT_EQ_MODE(xfm("og-xt", 0470).transform(0733, false), 0722);
+ EXPECT_EQ_MODE(xfm("a+sx", 0116).transform(0162, false), 06173);
+ EXPECT_EQ_MODE(xfm("o-rs", 0325).transform(01061, false), 01061);
+ EXPECT_EQ_MODE(xfm("agu+s", 0217).transform(070, false), 06070);
+ EXPECT_EQ_MODE(xfm("goa=x", 0004).transform(0205, false), 0111);
+ EXPECT_EQ_MODE(xfm("a+Xr", 0614).transform(0555, false), 0555);
+ EXPECT_EQ_MODE(xfm("740", 0433).transform(0245, false), 0740);
+ EXPECT_EQ_MODE(xfm("667", 0550).transform(0220, false), 0667);
+ EXPECT_EQ_MODE(xfm("0217", 0133).transform(0470, false), 0217);
+ EXPECT_EQ_MODE(xfm("u=wxr", 0637).transform(0614, false), 0714);
+ EXPECT_EQ_MODE(xfm("uoa-g", 0341).transform(0606, false), 0606);
+ EXPECT_EQ_MODE(xfm("go-g", 0073).transform(0722, false), 0700);
+ EXPECT_EQ_MODE(xfm("ga=u", 0124).transform(0440, false), 0444);
+ EXPECT_EQ_MODE(xfm("ao-g", 0563).transform(0336, false), 04);
+ EXPECT_EQ_MODE(xfm("ogu-X", 0705).transform(043, false), 042);
+ EXPECT_EQ_MODE(xfm("o-wXs", 0164).transform(0736, false), 0734);
+ EXPECT_EQ_MODE(xfm("ag=o", 0406).transform(0675, false), 0555);
+ EXPECT_EQ_MODE(xfm("ua-w", 0710).transform(00, false), 00);
+ EXPECT_EQ_MODE(xfm("332", 0330).transform(02401, false), 0332);
+ EXPECT_EQ_MODE(xfm("ao+r", 0007).transform(0167, false), 0567);
+ EXPECT_EQ_MODE(xfm("gau=X", 0055).transform(0435, false), 0111);
+ EXPECT_EQ_MODE(xfm("ogu-rx", 0752).transform(0366, false), 0222);
+ EXPECT_EQ_MODE(xfm("o=t", 0355).transform(04, false), 01000);
+ EXPECT_EQ_MODE(xfm("g+w", 0421).transform(0164, false), 0164);
+ EXPECT_EQ_MODE(xfm("a+sx", 0757).transform(0151, false), 06151);
+ EXPECT_EQ_MODE(xfm("au-g", 0617).transform(040, false), 00);
+ EXPECT_EQ_MODE(xfm("uga=rxs", 0766).transform(0411, false), 06555);
+ EXPECT_EQ_MODE(xfm("uo+xs", 0736).transform(027, false), 04127);
+ EXPECT_EQ_MODE(xfm("ua+s", 0476).transform(00, false), 06000);
+ EXPECT_EQ_MODE(xfm("og+s", 0375).transform(0663, false), 02663);
+ EXPECT_EQ_MODE(xfm("552", 0322).transform(0677, false), 0552);
+ EXPECT_EQ_MODE(xfm("ua=Xx", 0753).transform(0503, false), 0111);
+ EXPECT_EQ_MODE(xfm("oa+sr", 0060).transform(0437, false), 06477);
+ EXPECT_EQ_MODE(xfm("uo+u", 0753).transform(0374, false), 0377);
+ EXPECT_EQ_MODE(xfm("uo=wsX", 0345).transform(04615, false), 04313);
+ EXPECT_EQ_MODE(xfm("4225", 0354).transform(00, false), 04225);
+ EXPECT_EQ_MODE(xfm("gao=w", 0205).transform(0422, false), 0222);
+ EXPECT_EQ_MODE(xfm("u=wx", 0315).transform(0722, false), 0322);
+ EXPECT_EQ_MODE(xfm("uoa-g", 0067).transform(051, false), 00);
+ EXPECT_EQ_MODE(xfm("a=s", 0521).transform(01271, false), 06000);
+ EXPECT_EQ_MODE(xfm("go-g", 0736).transform(02654, false), 02600);
+ EXPECT_EQ_MODE(xfm("g=X", 0352).transform(0574, false), 0514);
+ EXPECT_EQ_MODE(xfm("gu-srt", 0232).transform(0760, false), 0320);
+ EXPECT_EQ_MODE(xfm("g=o", 0515).transform(0665, false), 0655);
+ EXPECT_EQ_MODE(xfm("g=t", 0425).transform(0242, false), 0202);
+ EXPECT_EQ_MODE(xfm("a=X", 0522).transform(0171, false), 0111);
+ EXPECT_EQ_MODE(xfm("gao=wx", 0223).transform(0160, false), 0333);
+ EXPECT_EQ_MODE(xfm("guo=wx", 0175).transform(0753, false), 0333);
+ EXPECT_EQ_MODE(xfm("gau-ws", 0770).transform(0144, false), 0144);
+ EXPECT_EQ_MODE(xfm("u+wt", 0523).transform(0764, false), 0764);
+ EXPECT_EQ_MODE(xfm("gao-t", 0545).transform(0324, false), 0324);
+ EXPECT_EQ_MODE(xfm("oa-Xsx", 0476).transform(0552, false), 0442);
+ EXPECT_EQ_MODE(xfm("ga=x-s", 0330).transform(0250, false), 0111);
+ EXPECT_EQ_MODE(xfm("462", 0646).transform(0460, false), 0462);
+ EXPECT_EQ_MODE(xfm("u-X", 0765).transform(0305, false), 0205);
+ EXPECT_EQ_MODE(xfm("g=rx", 0500).transform(0424, false), 0454);
+ EXPECT_EQ_MODE(xfm("go-xr", 0140).transform(0132, false), 0122);
+ EXPECT_EQ_MODE(xfm("gou=wt", 0656).transform(0610, false), 01222);
+ EXPECT_EQ_MODE(xfm("gu+x", 0227).transform(0764, false), 0774);
+ EXPECT_EQ_MODE(xfm("ug+ws", 0112).transform(0647, false), 06667);
+ EXPECT_EQ_MODE(xfm("oga-wts", 0414).transform(0472, false), 0450);
+ EXPECT_EQ_MODE(xfm("a=Xr", 0057).transform(0560, false), 0555);
+ EXPECT_EQ_MODE(xfm("ao+u", 0750).transform(0141, false), 0151);
+ EXPECT_EQ_MODE(xfm("g=u", 0037).transform(02257, false), 0227);
+ EXPECT_EQ_MODE(xfm("u-r", 0427).transform(0267, false), 0267);
+ EXPECT_EQ_MODE(xfm("oag+rX", 0302).transform(0412, false), 0557);
+ EXPECT_EQ_MODE(xfm("ua=Xr", 0266).transform(0101, false), 0555);
+ EXPECT_EQ_MODE(xfm("uag+xt", 0636).transform(00, false), 01111);
+ EXPECT_EQ_MODE(xfm("guo=o", 0473).transform(0633, false), 0333);
+ EXPECT_EQ_MODE(xfm("a=xr", 0545).transform(0255, false), 0555);
+ EXPECT_EQ_MODE(xfm("u+r", 0717).transform(02725, false), 02725);
+ EXPECT_EQ_MODE(xfm("u=X", 0226).transform(0173, false), 0173);
+ EXPECT_EQ_MODE(xfm("ou-txw", 0442).transform(0171, false), 070);
+ EXPECT_EQ_MODE(xfm("u+s", 0312).transform(0327, false), 04327);
+ EXPECT_EQ_MODE(xfm("uog+X", 0456).transform(0147, false), 0157);
+ EXPECT_EQ_MODE(xfm("052", 0530).transform(0771, false), 052);
+ EXPECT_EQ_MODE(xfm("au-sX", 0414).transform(0235, false), 0224);
+ EXPECT_EQ_MODE(xfm("0145", 0205).transform(0764, false), 0145);
+ EXPECT_EQ_MODE(xfm("go-r", 0710).transform(046, false), 02);
+ EXPECT_EQ_MODE(xfm("g-r", 0656).transform(0650, false), 0610);
+ EXPECT_EQ_MODE(xfm("u-o", 0655).transform(0357, false), 057);
+ EXPECT_EQ_MODE(xfm("o-o", 0675).transform(0712, false), 0710);
+ EXPECT_EQ_MODE(xfm("ug=Xr", 0660).transform(0753, false), 0553);
+ EXPECT_EQ_MODE(xfm("ua-Xr", 0624).transform(0555, false), 00);
+ EXPECT_EQ_MODE(xfm("a=g", 0043).transform(00, false), 00);
+ EXPECT_EQ_MODE(xfm("a=x", 0517).transform(0713, false), 0111);
+ EXPECT_EQ_MODE(xfm("o=sr", 0630).transform(0311, false), 0314);
+ EXPECT_EQ_MODE(xfm("u=o", 0267).transform(0366, false), 0666);
+ EXPECT_EQ_MODE(xfm("ugo-rx", 0335).transform(0606, false), 0202);
+ EXPECT_EQ_MODE(xfm("ua-r+Xt", 0107).transform(0231, false), 01331);
+ EXPECT_EQ_MODE(xfm("1746", 0543).transform(0170, false), 01746);
+ EXPECT_EQ_MODE(xfm("o+wts", 0433).transform(0466, false), 01466);
+ EXPECT_EQ_MODE(xfm("g-g", 0710).transform(0117, false), 0107);
+ EXPECT_EQ_MODE(xfm("404", 0034).transform(026, false), 0404);
+ EXPECT_EQ_MODE(xfm("oa=Xs", 0147).transform(0610, false), 06111);
+ EXPECT_EQ_MODE(xfm("a=x", 0262).transform(0774, false), 0111);
+ EXPECT_EQ_MODE(xfm("g+sXr", 0710).transform(01767, false), 03777);
+ EXPECT_EQ_MODE(xfm("og+wrs", 0747).transform(0675, false), 02677);
+ EXPECT_EQ_MODE(xfm("uog+r", 0731).transform(0704, false), 0744);
+ EXPECT_EQ_MODE(xfm("ao=tx", 0023).transform(037, false), 01111);
+ EXPECT_EQ_MODE(xfm("u=x", 0423).transform(01, false), 0101);
+ EXPECT_EQ_MODE(xfm("ug+rX", 0274).transform(020, false), 0460);
+ EXPECT_EQ_MODE(xfm("og-u", 0424).transform(02, false), 02);
+ EXPECT_EQ_MODE(xfm("g=t", 0544).transform(02147, false), 0107);
+ EXPECT_EQ_MODE(xfm("1366", 0570).transform(02046, false), 01366);
+ EXPECT_EQ_MODE(xfm("uo+g", 0271).transform(04061, false), 04667);
+ EXPECT_EQ_MODE(xfm("ou=ws", 0723).transform(02222, false), 06222);
+ EXPECT_EQ_MODE(xfm("au=xX", 0053).transform(0775, false), 0111);
+ EXPECT_EQ_MODE(xfm("o=wXs", 0203).transform(0512, false), 0513);
+ EXPECT_EQ_MODE(xfm("ua+wr", 0725).transform(0462, false), 0666);
+ EXPECT_EQ_MODE(xfm("og-rxw", 0674).transform(0521, false), 0500);
+ EXPECT_EQ_MODE(xfm("aug+x=ts", 0235).transform(0704, false), 07000);
+ EXPECT_EQ_MODE(xfm("ao-xX", 0047).transform(0215, false), 0204);
+ EXPECT_EQ_MODE(xfm("353", 0054).transform(0171, false), 0353);
+ EXPECT_EQ_MODE(xfm("ga=rw", 0376).transform(01035, false), 0666);
+ EXPECT_EQ_MODE(xfm("ua-x", 0210).transform(0423, false), 0422);
+ EXPECT_EQ_MODE(xfm("u+rs", 0321).transform(0427, false), 04427);
+ EXPECT_EQ_MODE(xfm("a=X", 0567).transform(0120, false), 0111);
+ EXPECT_EQ_MODE(xfm("oa=r", 0715).transform(047, false), 0444);
+ EXPECT_EQ_MODE(xfm("goa=txr", 0126).transform(0352, false), 01555);
+ EXPECT_EQ_MODE(xfm("aug+o", 0667).transform(0103, false), 0333);
+ EXPECT_EQ_MODE(xfm("au+ts", 0654).transform(023, false), 07023);
+ EXPECT_EQ_MODE(xfm("ogu-sw", 0165).transform(0553, false), 0551);
+ EXPECT_EQ_MODE(xfm("044", 0755).transform(0120, false), 044);
+ EXPECT_EQ_MODE(xfm("gu+sxr", 0032).transform(04326, false), 06776);
+ EXPECT_EQ_MODE(xfm("au+w", 0261).transform(0646, false), 0666);
+ EXPECT_EQ_MODE(xfm("a=g", 0711).transform(04540, false), 0444);
+ EXPECT_EQ_MODE(xfm("g=x", 0466).transform(061, false), 011);
+ EXPECT_EQ_MODE(xfm("go-g", 0040).transform(04257, false), 04202);
+ EXPECT_EQ_MODE(xfm("og=Xs", 0553).transform(0362, false), 02311);
+ EXPECT_EQ_MODE(xfm("g-r", 0622).transform(00, false), 00);
+ EXPECT_EQ_MODE(xfm("o+r", 0422).transform(0176, false), 0176);
+ EXPECT_EQ_MODE(xfm("ou=wtx", 0236).transform(02075, false), 03373);
+ EXPECT_EQ_MODE(xfm("o=r", 0035).transform(0644, false), 0644);
+ EXPECT_EQ_MODE(xfm("633", 0461).transform(076, false), 0633);
+ EXPECT_EQ_MODE(xfm("a=rw", 0641).transform(043, false), 0666);
+ EXPECT_EQ_MODE(xfm("ua+s", 0134).transform(0364, false), 06364);
+ EXPECT_EQ_MODE(xfm("g-w", 0420).transform(0506, false), 0506);
+ EXPECT_EQ_MODE(xfm("oa-tX", 0337).transform(0264, false), 0264);
+ EXPECT_EQ_MODE(xfm("uo=u", 0221).transform(0715, false), 0717);
+ EXPECT_EQ_MODE(xfm("o+u", 0643).transform(0104, false), 0105);
+ EXPECT_EQ_MODE(xfm("ag+Xt", 0670).transform(0420, false), 01420);
+ EXPECT_EQ_MODE(xfm("uo-Xx", 0065).transform(04000, false), 04000);
+ EXPECT_EQ_MODE(xfm("guo-stw", 0717).transform(0760, false), 0540);
+ EXPECT_EQ_MODE(xfm("a+t", 0650).transform(0260, false), 01260);
+ EXPECT_EQ_MODE(xfm("gu-twX", 0305).transform(0462, false), 0442);
+ EXPECT_EQ_MODE(xfm("o+Xt", 0021).transform(064, false), 01064);
+ EXPECT_EQ_MODE(xfm("u-r", 0775).transform(0650, false), 0250);
+ EXPECT_EQ_MODE(xfm("u+u", 0750).transform(0205, false), 0205);
+ EXPECT_EQ_MODE(xfm("o-sX", 0406).transform(0455, false), 0454);
+ EXPECT_EQ_MODE(xfm("o-Xw", 0006).transform(01713, false), 01710);
+ EXPECT_EQ_MODE(xfm("gu+wr", 0477).transform(02715, false), 02775);
+ EXPECT_EQ_MODE(xfm("o+wx", 0570).transform(0243, false), 0243);
+ EXPECT_EQ_MODE(xfm("u=g", 0642).transform(021, false), 0221);
+ EXPECT_EQ_MODE(xfm("a-xs", 0763).transform(02367, false), 0266);
+ EXPECT_EQ_MODE(xfm("ag=Xwr", 0076).transform(0250, false), 0777);
+ EXPECT_EQ_MODE(xfm("ug-x", 0044).transform(0136, false), 026);
+ EXPECT_EQ_MODE(xfm("g+w=tw", 0002).transform(0777, false), 0727);
+ EXPECT_EQ_MODE(xfm("g+u", 0235).transform(0131, false), 0131);
+ EXPECT_EQ_MODE(xfm("g=rw", 0650).transform(01131, false), 01161);
+ EXPECT_EQ_MODE(xfm("o=t+tsX", 0106).transform(044, false), 01040);
+ EXPECT_EQ_MODE(xfm("ag-Xx", 0123).transform(0157, false), 046);
+ EXPECT_EQ_MODE(xfm("oga-xX", 0707).transform(0143, false), 042);
+ EXPECT_EQ_MODE(xfm("611", 0141).transform(0163, false), 0611);
+ EXPECT_EQ_MODE(xfm("062", 0346).transform(02741, false), 062);
+ EXPECT_EQ_MODE(xfm("o+o", 0035).transform(0706, false), 0706);
+ EXPECT_EQ_MODE(xfm("ao-u", 0077).transform(016, false), 016);
+ EXPECT_EQ_MODE(xfm("go-u", 0447).transform(04642, false), 04600);
+ EXPECT_EQ_MODE(xfm("o+o", 0766).transform(0345, false), 0345);
+ EXPECT_EQ_MODE(xfm("uo-ts", 0505).transform(0447, false), 0447);
+ EXPECT_EQ_MODE(xfm("au-xXr", 0275).transform(0600, false), 0200);
+ EXPECT_EQ_MODE(xfm("=544", 0633).transform(0534, false), 0544);
+ EXPECT_EQ_MODE(xfm("344", 0115).transform(0553, false), 0344);
+ EXPECT_EQ_MODE(xfm("a=o", 0520).transform(0745, false), 0555);
+ EXPECT_EQ_MODE(xfm("o+X-s", 0135).transform(0202, false), 0202);
+ EXPECT_EQ_MODE(xfm("g=tsw", 0065).transform(0602, false), 02622);
+ EXPECT_EQ_MODE(xfm("gou-x", 0460).transform(0551, false), 0440);
+ EXPECT_EQ_MODE(xfm("ou-Xws", 0524).transform(0610, false), 0410);
+ EXPECT_EQ_MODE(xfm("ua-wr", 0732).transform(0325, false), 0101);
+ EXPECT_EQ_MODE(xfm("go=rwX", 0356).transform(0367, false), 0377);
+ EXPECT_EQ_MODE(xfm("a-o", 0725).transform(0333, false), 00);
+ EXPECT_EQ_MODE(xfm("o-x=s", 0136).transform(0406, false), 0400);
+ EXPECT_EQ_MODE(xfm("ao+w", 0211).transform(0715, false), 0737);
+ EXPECT_EQ_MODE(xfm("136", 0254).transform(0451, false), 0136);
+ EXPECT_EQ_MODE(xfm("u-rst", 0331).transform(0275, false), 0275);
+ EXPECT_EQ_MODE(xfm("u+st", 0000).transform(0333, false), 04333);
+ EXPECT_EQ_MODE(xfm("a+xXt", 0273).transform(0304, false), 01315);
+ EXPECT_EQ_MODE(xfm("og+rw", 0001).transform(0114, false), 0176);
+ EXPECT_EQ_MODE(xfm("u+rX", 0351).transform(0426, false), 0426);
+ EXPECT_EQ_MODE(xfm("a=wx", 0273).transform(0266, false), 0333);
+ EXPECT_EQ_MODE(xfm("gu+Xs", 0142).transform(037, false), 06137);
+ EXPECT_EQ_MODE(xfm("oga=st", 0246).transform(0402, false), 07000);
+ EXPECT_EQ_MODE(xfm("ag=r+xt", 0412).transform(0741, false), 01555);
+ EXPECT_EQ_MODE(xfm("610", 0062).transform(0636, false), 0610);
+ EXPECT_EQ_MODE(xfm("g=wXx", 0617).transform(0433, false), 0433);
+ EXPECT_EQ_MODE(xfm("o=u", 0035).transform(0230, false), 0232);
+ EXPECT_EQ_MODE(xfm("u=rt", 0561).transform(0301, false), 0401);
+ EXPECT_EQ_MODE(xfm("a+sx", 0770).transform(0150, false), 06151);
+ EXPECT_EQ_MODE(xfm("ao-o", 0145).transform(0303, false), 00);
+ EXPECT_EQ_MODE(xfm("oa+rs", 0757).transform(0156, false), 06556);
+ EXPECT_EQ_MODE(xfm("gu=w-xtw", 0173).transform(01770, false), 01000);
+ EXPECT_EQ_MODE(xfm("ga+xtX", 0350).transform(0404, false), 01515);
+ EXPECT_EQ_MODE(xfm("agu+tX", 0450).transform(04737, false), 05737);
+ EXPECT_EQ_MODE(xfm("ga-wr", 0043).transform(0110, false), 0110);
+ EXPECT_EQ_MODE(xfm("g=t", 0325).transform(060, false), 00);
+ EXPECT_EQ_MODE(xfm("-630", 0322).transform(02656, false), 02046);
+ EXPECT_EQ_MODE(xfm("ag+ws", 0165).transform(0245, false), 06267);
+ EXPECT_EQ_MODE(xfm("u-xs", 0612).transform(0137, false), 037);
+ EXPECT_EQ_MODE(xfm("ou-u", 0201).transform(0754, false), 050);
+ EXPECT_EQ_MODE(xfm("ga=tX", 0250).transform(0642, false), 01000);
+ EXPECT_EQ_MODE(xfm("og+r", 0327).transform(065, false), 065);
+ EXPECT_EQ_MODE(xfm("ug+sX", 0030).transform(0104, false), 06114);
+ EXPECT_EQ_MODE(xfm("g=r", 0346).transform(0102, false), 0142);
+ EXPECT_EQ_MODE(xfm("0147", 0172).transform(0710, false), 0147);
+ EXPECT_EQ_MODE(xfm("167", 0517).transform(0225, false), 0167);
+ EXPECT_EQ_MODE(xfm("0061", 0545).transform(0560, false), 061);
+ EXPECT_EQ_MODE(xfm("a+ts", 0010).transform(0174, false), 07174);
+ EXPECT_EQ_MODE(xfm("og=rX", 0535).transform(0501, false), 0555);
+ EXPECT_EQ_MODE(xfm("uo+sX", 0021).transform(0331, false), 04331);
+ EXPECT_EQ_MODE(xfm("oua+X-x", 0351).transform(01247, false), 01246);
+ EXPECT_EQ_MODE(xfm("gou+t", 0376).transform(0400, false), 01400);
+ EXPECT_EQ_MODE(xfm("ag=u", 0767).transform(0663, false), 0666);
+ EXPECT_EQ_MODE(xfm("ga-xw", 0126).transform(0141, false), 040);
+ EXPECT_EQ_MODE(xfm("gu-t", 0601).transform(0241, false), 0241);
+ EXPECT_EQ_MODE(xfm("a+sw", 0334).transform(00, false), 06222);
+ EXPECT_EQ_MODE(xfm("ga+o", 0156).transform(0474, false), 0474);
+ EXPECT_EQ_MODE(xfm("g-tX", 0363).transform(0265, false), 0265);
+ EXPECT_EQ_MODE(xfm("u+o", 0167).transform(07, false), 0707);
+ EXPECT_EQ_MODE(xfm("ug+o", 0223).transform(023, false), 0333);
+ EXPECT_EQ_MODE(xfm("oa=s", 0373).transform(0235, false), 06000);
+ EXPECT_EQ_MODE(xfm("ua+wxX", 0315).transform(042, false), 0373);
+ EXPECT_EQ_MODE(xfm("4122", 0050).transform(0125, false), 04122);
+ EXPECT_EQ_MODE(xfm("uo=r", 0360).transform(0357, false), 0454);
+ EXPECT_EQ_MODE(xfm("a-g", 0354).transform(0300, false), 0300);
+ EXPECT_EQ_MODE(xfm("156", 0673).transform(0415, false), 0156);
+ EXPECT_EQ_MODE(xfm("ug=wXs", 0313).transform(0473, false), 06333);
+ EXPECT_EQ_MODE(xfm("ga-xt", 0022).transform(0600, false), 0600);
+ EXPECT_EQ_MODE(xfm("oug-w", 0334).transform(0746, false), 0544);
+ EXPECT_EQ_MODE(xfm("oag+u", 0667).transform(0514, false), 0555);
+ EXPECT_EQ_MODE(xfm("au+o", 0311).transform(0326, false), 0766);
+ EXPECT_EQ_MODE(xfm("goa-r", 0165).transform(0602, false), 0202);
+ EXPECT_EQ_MODE(xfm("637", 0427).transform(0510, false), 0637);
+ EXPECT_EQ_MODE(xfm("ag-tX", 0114).transform(02207, false), 02206);
+ EXPECT_EQ_MODE(xfm("ga-g", 0057).transform(0104, false), 0104);
+ EXPECT_EQ_MODE(xfm("o-xt", 0225).transform(0177, false), 0176);
+ EXPECT_EQ_MODE(xfm("a=xw", 0304).transform(0357, false), 0333);
+ EXPECT_EQ_MODE(xfm("346", 0317).transform(0415, false), 0346);
+ EXPECT_EQ_MODE(xfm("ug=xr", 0370).transform(0304, false), 0554);
+ EXPECT_EQ_MODE(xfm("uo+o", 0501).transform(0206, false), 0606);
+ EXPECT_EQ_MODE(xfm("auo+u", 0201).transform(0672, false), 0676);
+ EXPECT_EQ_MODE(xfm("g-xrt", 0547).transform(0620, false), 0620);
+ EXPECT_EQ_MODE(xfm("au=tx", 0700).transform(054, false), 01111);
+ EXPECT_EQ_MODE(xfm("uag+x", 0144).transform(0507, false), 0517);
+ EXPECT_EQ_MODE(xfm("ag-w+tr", 0551).transform(0400, false), 01444);
+ EXPECT_EQ_MODE(xfm("603", 0121).transform(0332, false), 0603);
+ EXPECT_EQ_MODE(xfm("ga+rxX", 0704).transform(0202, false), 0757);
+ EXPECT_EQ_MODE(xfm("o+sX", 0322).transform(0226, false), 0226);
+ EXPECT_EQ_MODE(xfm("a-twx", 0162).transform(037, false), 04);
+ EXPECT_EQ_MODE(xfm("o=u", 0031).transform(0476, false), 0474);
+ EXPECT_EQ_MODE(xfm("g+u", 0405).transform(0206, false), 0226);
+ EXPECT_EQ_MODE(xfm("oa+xsX", 0755).transform(0606, false), 06717);
+ EXPECT_EQ_MODE(xfm("ga-t", 0716).transform(055, false), 055);
+ EXPECT_EQ_MODE(xfm("a=tX", 0716).transform(0136, false), 01111);
+ EXPECT_EQ_MODE(xfm("gao=xXw", 0130).transform(0666, false), 0333);
+ EXPECT_EQ_MODE(xfm("a=xt", 0232).transform(0511, false), 01111);
+ EXPECT_EQ_MODE(xfm("ga-u", 0337).transform(0441, false), 01);
+ EXPECT_EQ_MODE(xfm("243", 0713).transform(0167, false), 0243);
+ EXPECT_EQ_MODE(xfm("ua-u", 0714).transform(02467, false), 02023);
+ EXPECT_EQ_MODE(xfm("ou+ts", 0622).transform(0141, false), 05141);
+ EXPECT_EQ_MODE(xfm("ou=s", 0356).transform(0470, false), 04070);
+ EXPECT_EQ_MODE(xfm("auo-rs", 0016).transform(0674, false), 0230);
+ EXPECT_EQ_MODE(xfm("1611", 0143).transform(0635, false), 01611);
+ EXPECT_EQ_MODE(xfm("u-Xw", 0467).transform(0267, false), 067);
+ EXPECT_EQ_MODE(xfm("a+Xsr", 0531).transform(071, false), 06575);
+ EXPECT_EQ_MODE(xfm("ag=x", 0613).transform(0450, false), 0111);
+ EXPECT_EQ_MODE(xfm("a+t", 0244).transform(015, false), 01015);
+ EXPECT_EQ_MODE(xfm("g-g", 0232).transform(00, false), 00);
+ EXPECT_EQ_MODE(xfm("gu-tw", 0755).transform(01614, false), 01414);
+ EXPECT_EQ_MODE(xfm("ga+sX", 0465).transform(04657, false), 06757);
+ EXPECT_EQ_MODE(xfm("oga+st", 0461).transform(0342, false), 07342);
+ EXPECT_EQ_MODE(xfm("u+tw", 0122).transform(0132, false), 0332);
+ EXPECT_EQ_MODE(xfm("a=u", 0445).transform(073, false), 00);
+ EXPECT_EQ_MODE(xfm("u=ts", 0324).transform(0306, false), 04006);
+ EXPECT_EQ_MODE(xfm("o=Xts", 0500).transform(043, false), 01041);
+ EXPECT_EQ_MODE(xfm("aog+rs", 0672).transform(0135, false), 06575);
+ EXPECT_EQ_MODE(xfm("u=xt", 0541).transform(0763, false), 0163);
+ EXPECT_EQ_MODE(xfm("o=o", 0650).transform(0577, false), 0577);
+ EXPECT_EQ_MODE(xfm("oa=rs", 0563).transform(022, false), 06444);
+ EXPECT_EQ_MODE(xfm("ua+t-wXs", 0550).transform(0721, false), 01400);
+ EXPECT_EQ_MODE(xfm("aog=s+s", 0513).transform(0141, false), 06000);
+ EXPECT_EQ_MODE(xfm("gou+w", 0273).transform(054, false), 0276);
+ EXPECT_EQ_MODE(xfm("a+t=t", 0363).transform(0746, false), 01000);
+ EXPECT_EQ_MODE(xfm("g=t", 0210).transform(0676, false), 0606);
+ EXPECT_EQ_MODE(xfm("go=xsr", 0670).transform(01517, false), 02555);
+ EXPECT_EQ_MODE(xfm("ou+ts", 0736).transform(0265, false), 05265);
+ EXPECT_EQ_MODE(xfm("ao-t", 0565).transform(0643, false), 0643);
+ EXPECT_EQ_MODE(xfm("uo+wr", 0207).transform(0355, false), 0757);
+ EXPECT_EQ_MODE(xfm("gu+s", 0236).transform(0400, false), 06400);
+ EXPECT_EQ_MODE(xfm("ao=Xs", 0626).transform(0447, false), 06111);
+ EXPECT_EQ_MODE(xfm("g-str", 0277).transform(0262, false), 0222);
+ EXPECT_EQ_MODE(xfm("g=rt", 0453).transform(0637, false), 0647);
+ EXPECT_EQ_MODE(xfm("g=tX", 0473).transform(04573, false), 04513);
+ EXPECT_EQ_MODE(xfm("a=r", 0323).transform(04550, false), 0444);
+ EXPECT_EQ_MODE(xfm("ua+o", 0127).transform(0666, false), 0666);
+ EXPECT_EQ_MODE(xfm("ao+sxX", 0761).transform(0203, false), 06313);
+ EXPECT_EQ_MODE(xfm("auo-tX", 0246).transform(04714, false), 04604);
+ EXPECT_EQ_MODE(xfm("u+x-s", 0753).transform(0476, false), 0576);
+ EXPECT_EQ_MODE(xfm("ua+wt", 0457).transform(0443, false), 01663);
+ EXPECT_EQ_MODE(xfm("ga-Xw", 0474).transform(0126, false), 04);
+ EXPECT_EQ_MODE(xfm("agu+u", 0551).transform(0630, false), 0676);
+ EXPECT_EQ_MODE(xfm("auo=sr", 0565).transform(0357, false), 06444);
+ EXPECT_EQ_MODE(xfm("2045", 0244).transform(0762, false), 02045);
+ EXPECT_EQ_MODE(xfm("=246", 0200).transform(0772, false), 0246);
+ EXPECT_EQ_MODE(xfm("g=tr", 0260).transform(0316, false), 0346);
+ EXPECT_EQ_MODE(xfm("a+w", 0670).transform(0227, false), 0227);
+ EXPECT_EQ_MODE(xfm("u+rt", 0531).transform(0520, false), 0520);
+ EXPECT_EQ_MODE(xfm("go-twx", 0525).transform(0146, false), 0144);
+ EXPECT_EQ_MODE(xfm("oag=xs", 0252).transform(051, false), 06111);
+ EXPECT_EQ_MODE(xfm("oug+tr", 0030).transform(067, false), 01467);
+ EXPECT_EQ_MODE(xfm("oa-Xs", 0026).transform(0711, false), 0600);
+ EXPECT_EQ_MODE(xfm("-337", 0546).transform(0746, false), 0440);
+ EXPECT_EQ_MODE(xfm("025", 0643).transform(0762, false), 025);
+ EXPECT_EQ_MODE(xfm("goa+X", 0252).transform(0340, false), 0351);
+ EXPECT_EQ_MODE(xfm("ag-g", 0556).transform(0727, false), 0505);
+ EXPECT_EQ_MODE(xfm("au-X", 0020).transform(04353, false), 04242);
+ EXPECT_EQ_MODE(xfm("324", 0567).transform(0144, false), 0324);
+ EXPECT_EQ_MODE(xfm("u-wxX", 0037).transform(0344, false), 044);
+ EXPECT_EQ_MODE(xfm("uo=xrw", 0414).transform(0376, false), 0777);
+ EXPECT_EQ_MODE(xfm("ug+rw", 0162).transform(04617, false), 04677);
+ EXPECT_EQ_MODE(xfm("a-sX", 0067).transform(0253, false), 0242);
+ EXPECT_EQ_MODE(xfm("ga=g", 0266).transform(01714, false), 0111);
+ EXPECT_EQ_MODE(xfm("g+o", 0577).transform(0275, false), 0275);
+ EXPECT_EQ_MODE(xfm("414", 0127).transform(0366, false), 0414);
+ EXPECT_EQ_MODE(xfm("a-Xsr", 0122).transform(0410, false), 00);
+ EXPECT_EQ_MODE(xfm("oa=r-x", 0105).transform(01024, false), 0444);
+ EXPECT_EQ_MODE(xfm("u=X", 0344).transform(0133, false), 0133);
+ EXPECT_EQ_MODE(xfm("a+g", 0305).transform(0370, false), 0777);
+ EXPECT_EQ_MODE(xfm("agu=g", 0172).transform(0335, false), 0333);
+ EXPECT_EQ_MODE(xfm("o-wr", 0637).transform(0342, false), 0340);
+ EXPECT_EQ_MODE(xfm("og=r+X", 0220).transform(0524, false), 0555);
+ EXPECT_EQ_MODE(xfm("uo+u", 0716).transform(0342, false), 0343);
+ EXPECT_EQ_MODE(xfm("a-rs", 0741).transform(027, false), 023);
+ EXPECT_EQ_MODE(xfm("g=o", 0475).transform(00, false), 00);
+ EXPECT_EQ_MODE(xfm("gu-Xw", 0042).transform(0774, false), 0444);
+ EXPECT_EQ_MODE(xfm("u-rwt", 0045).transform(0763, false), 0163);
+ EXPECT_EQ_MODE(xfm("ou+wr", 0670).transform(0606, false), 0606);
+ EXPECT_EQ_MODE(xfm("uo=s", 0535).transform(0642, false), 04040);
+ EXPECT_EQ_MODE(xfm("o=wXs", 0327).transform(0457, false), 0453);
+ EXPECT_EQ_MODE(xfm("617", 0265).transform(0175, false), 0617);
+ EXPECT_EQ_MODE(xfm("oga=sr", 0406).transform(0216, false), 06444);
+ EXPECT_EQ_MODE(xfm("o-sxt", 0357).transform(0212, false), 0212);
+ EXPECT_EQ_MODE(xfm("go+w=s", 0572).transform(01024, false), 02000);
+ EXPECT_EQ_MODE(xfm("=141", 0742).transform(04634, false), 0141);
+ EXPECT_EQ_MODE(xfm("g+x", 0064).transform(0504, false), 0514);
+ EXPECT_EQ_MODE(xfm("o-tx", 0660).transform(01261, false), 0260);
+ EXPECT_EQ_MODE(xfm("a=xw", 0116).transform(0105, false), 0333);
+ EXPECT_EQ_MODE(xfm("ag=r", 0007).transform(01702, false), 0444);
+ EXPECT_EQ_MODE(xfm("au-xt", 0466).transform(045, false), 044);
+ EXPECT_EQ_MODE(xfm("og+w=t", 0042).transform(0350, false), 01300);
+ EXPECT_EQ_MODE(xfm("o=x", 0416).transform(04474, false), 04471);
+ EXPECT_EQ_MODE(xfm("365", 0107).transform(04263, false), 0365);
+ EXPECT_EQ_MODE(xfm("u=sx", 0750).transform(0215, false), 04115);
+ EXPECT_EQ_MODE(xfm("o+rX", 0017).transform(067, false), 067);
+ EXPECT_EQ_MODE(xfm("a+g", 0103).transform(01555, false), 01555);
+ EXPECT_EQ_MODE(xfm("ga-wX", 0032).transform(0476, false), 0444);
+ EXPECT_EQ_MODE(xfm("g+s", 0254).transform(0265, false), 02265);
+ EXPECT_EQ_MODE(xfm("ga+o", 0125).transform(0762, false), 0762);
+ EXPECT_EQ_MODE(xfm("ua+xs", 0545).transform(070, false), 06171);
+ EXPECT_EQ_MODE(xfm("gu+stx", 0314).transform(0405, false), 06515);
+ EXPECT_EQ_MODE(xfm("u=x-tw", 0015).transform(02443, false), 02143);
+ EXPECT_EQ_MODE(xfm("u=o", 0415).transform(0571, false), 0171);
+ EXPECT_EQ_MODE(xfm("uog=xr", 0605).transform(062, false), 0555);
+ EXPECT_EQ_MODE(xfm("o-wt", 0541).transform(0364, false), 0364);
+ EXPECT_EQ_MODE(xfm("o=wXt", 0674).transform(01073, false), 01073);
+ EXPECT_EQ_MODE(xfm("au-Xws", 0210).transform(0115, false), 04);
+ EXPECT_EQ_MODE(xfm("a+rsw", 0344).transform(0735, false), 06777);
+ EXPECT_EQ_MODE(xfm("og-st", 0275).transform(0566, false), 0566);
+ EXPECT_EQ_MODE(xfm("265", 0444).transform(022, false), 0265);
+ EXPECT_EQ_MODE(xfm("g-w", 0761).transform(0323, false), 0303);
+ EXPECT_EQ_MODE(xfm("oag-wX", 0356).transform(0421, false), 0400);
+ EXPECT_EQ_MODE(xfm("a-Xw", 0436).transform(0772, false), 0440);
+ EXPECT_EQ_MODE(xfm("a-tX", 0176).transform(0673, false), 0662);
+ EXPECT_EQ_MODE(xfm("a+s", 0572).transform(0525, false), 06525);
+ EXPECT_EQ_MODE(xfm("037", 0051).transform(04555, false), 037);
+ EXPECT_EQ_MODE(xfm("gu=r-xr", 0707).transform(0763, false), 03);
+ EXPECT_EQ_MODE(xfm("oa=X+st", 0451).transform(0614, false), 07111);
+ EXPECT_EQ_MODE(xfm("auo=t+X-Xwr", 0254).transform(0460, false), 01000);
+ EXPECT_EQ_MODE(xfm("au+s", 0735).transform(0654, false), 06654);
+ EXPECT_EQ_MODE(xfm("ao=xtX", 0605).transform(0170, false), 01111);
+ EXPECT_EQ_MODE(xfm("ug-sX", 0273).transform(0637, false), 0627);
+ EXPECT_EQ_MODE(xfm("ua+wt", 0570).transform(0555, false), 01777);
+ EXPECT_EQ_MODE(xfm("o=t", 0347).transform(020, false), 01020);
+ EXPECT_EQ_MODE(xfm("ag-sx", 0152).transform(0341, false), 0240);
+ EXPECT_EQ_MODE(xfm("g+r", 0421).transform(0350, false), 0350);
+ EXPECT_EQ_MODE(xfm("u=r", 0437).transform(010, false), 0410);
+ EXPECT_EQ_MODE(xfm("u=sx", 0354).transform(0166, false), 04166);
+ EXPECT_EQ_MODE(xfm("uoa=xwX", 0213).transform(0366, false), 0333);
+ EXPECT_EQ_MODE(xfm("0757", 0440).transform(043, false), 0757);
+ EXPECT_EQ_MODE(xfm("355", 0676).transform(0603, false), 0355);
+ EXPECT_EQ_MODE(xfm("au+x", 0771).transform(0371, false), 0371);
+ EXPECT_EQ_MODE(xfm("g=Xtr", 0341).transform(0326, false), 0356);
+ EXPECT_EQ_MODE(xfm("o-w", 0572).transform(072, false), 070);
+ EXPECT_EQ_MODE(xfm("ga-X", 0665).transform(0700, false), 0600);
+ EXPECT_EQ_MODE(xfm("u+x", 0726).transform(0443, false), 0543);
+ EXPECT_EQ_MODE(xfm("g+o", 0243).transform(0534, false), 0574);
+ EXPECT_EQ_MODE(xfm("u=tXr", 0421).transform(0704, false), 0504);
+ EXPECT_EQ_MODE(xfm("ugo+X", 0046).transform(0722, false), 0733);
+ EXPECT_EQ_MODE(xfm("017", 0146).transform(0341, false), 017);
+ EXPECT_EQ_MODE(xfm("ug+s", 0442).transform(0611, false), 06611);
+ EXPECT_EQ_MODE(xfm("uoa+rt", 0736).transform(02241, false), 03645);
+ EXPECT_EQ_MODE(xfm("ag=r", 0716).transform(0401, false), 0444);
+ EXPECT_EQ_MODE(xfm("ua-wrt", 0565).transform(0511, false), 0111);
+ EXPECT_EQ_MODE(xfm("ua+r", 0370).transform(0714, false), 0754);
+ EXPECT_EQ_MODE(xfm("og+r", 0435).transform(0202, false), 0246);
+ EXPECT_EQ_MODE(xfm("733", 0240).transform(0223, false), 0733);
+ EXPECT_EQ_MODE(xfm("oua-rt", 0127).transform(0640, false), 0200);
+ EXPECT_EQ_MODE(xfm("uag=ws", 0123).transform(0747, false), 06222);
+ EXPECT_EQ_MODE(xfm("g=u", 0072).transform(0205, false), 0225);
+ EXPECT_EQ_MODE(xfm("ag=X", 0362).transform(0164, false), 0111);
+ EXPECT_EQ_MODE(xfm("605", 0110).transform(02347, false), 0605);
+ EXPECT_EQ_MODE(xfm("u-w", 0267).transform(0715, false), 0515);
+ EXPECT_EQ_MODE(xfm("ou+x", 0716).transform(0470, false), 0571);
+ EXPECT_EQ_MODE(xfm("a-tw", 0160).transform(0106, false), 0104);
+ EXPECT_EQ_MODE(xfm("u-ts", 0602).transform(040, false), 040);
+ EXPECT_EQ_MODE(xfm("ag=xsX", 0127).transform(0653, false), 06111);
+ EXPECT_EQ_MODE(xfm("gao+X", 0525).transform(0571, false), 0571);
+ EXPECT_EQ_MODE(xfm("a+w", 0775).transform(02, false), 0222);
+ EXPECT_EQ_MODE(xfm("goa-rxw", 0063).transform(02040, false), 02000);
+ EXPECT_EQ_MODE(xfm("o-w", 0160).transform(02073, false), 02071);
+ EXPECT_EQ_MODE(xfm("uoa=wst", 0473).transform(0515, false), 07222);
+ EXPECT_EQ_MODE(xfm("a-u", 0617).transform(0560, false), 020);
+ EXPECT_EQ_MODE(xfm("gau+trx", 0706).transform(0777, false), 01777);
+ EXPECT_EQ_MODE(xfm("ago+o", 0571).transform(0441, false), 0551);
+ EXPECT_EQ_MODE(xfm("717", 0600).transform(01515, false), 0717);
+ EXPECT_EQ_MODE(xfm("a-u", 0564).transform(01557, false), 01002);
+ EXPECT_EQ_MODE(xfm("a-t", 0274).transform(01054, false), 054);
+ EXPECT_EQ_MODE(xfm("g-g", 0757).transform(0114, false), 0104);
+ EXPECT_EQ_MODE(xfm("a+r-rws", 0723).transform(04071, false), 011);
+ EXPECT_EQ_MODE(xfm("g-w", 0424).transform(0642, false), 0642);
+ EXPECT_EQ_MODE(xfm("u-w", 0312).transform(0336, false), 0136);
+ EXPECT_EQ_MODE(xfm("uao-w", 0444).transform(0562, false), 0540);
+ EXPECT_EQ_MODE(xfm("g-g", 0725).transform(02707, false), 02707);
+ EXPECT_EQ_MODE(xfm("g=w", 0104).transform(0646, false), 0626);
+ EXPECT_EQ_MODE(xfm("au-rws", 0230).transform(0330, false), 0110);
+ EXPECT_EQ_MODE(xfm("u-rt", 0444).transform(0761, false), 0361);
+ EXPECT_EQ_MODE(xfm("au+xs", 0425).transform(0623, false), 06733);
+ EXPECT_EQ_MODE(xfm("ag=xw", 0421).transform(0556, false), 0333);
+ EXPECT_EQ_MODE(xfm("oa-t", 0412).transform(0764, false), 0764);
+ EXPECT_EQ_MODE(xfm("ou-xwr", 0361).transform(0200, false), 00);
+ EXPECT_EQ_MODE(xfm("ug-o", 0125).transform(0250, false), 0250);
+ EXPECT_EQ_MODE(xfm("ug=Xr", 0055).transform(0175, false), 0555);
+ EXPECT_EQ_MODE(xfm("g+Xrs", 0064).transform(075, false), 02075);
+ EXPECT_EQ_MODE(xfm("gu=Xrt", 0434).transform(034, false), 0554);
+ EXPECT_EQ_MODE(xfm("oa+u", 0361).transform(0250, false), 0272);
+ EXPECT_EQ_MODE(xfm("g=ts", 0163).transform(0204, false), 02204);
+ EXPECT_EQ_MODE(xfm("oa-x", 0705).transform(0624, false), 0624);
+ EXPECT_EQ_MODE(xfm("uo+o", 0520).transform(045, false), 0545);
+ EXPECT_EQ_MODE(xfm("a=r", 0376).transform(0116, false), 0444);
+ EXPECT_EQ_MODE(xfm("g+xw", 0203).transform(052, false), 072);
+ EXPECT_EQ_MODE(xfm("go=u", 0466).transform(0737, false), 0777);
+ EXPECT_EQ_MODE(xfm("a=sxX", 0603).transform(0675, false), 06111);
+ EXPECT_EQ_MODE(xfm("uoa-Xs", 0643).transform(0631, false), 0620);
+ EXPECT_EQ_MODE(xfm("g+o", 0076).transform(0570, false), 0570);
+ EXPECT_EQ_MODE(xfm("a=xs", 0607).transform(040, false), 06111);
+ EXPECT_EQ_MODE(xfm("440", 0665).transform(0522, false), 0440);
+ EXPECT_EQ_MODE(xfm("ug-w", 0402).transform(02453, false), 02453);
+ EXPECT_EQ_MODE(xfm("u+x", 0536).transform(0777, false), 0777);
+ EXPECT_EQ_MODE(xfm("o+wt", 0464).transform(0151, false), 01153);
+ EXPECT_EQ_MODE(xfm("+506", 0451).transform(0506, false), 0506);
+ EXPECT_EQ_MODE(xfm("a-srX", 0175).transform(0550, false), 00);
+ EXPECT_EQ_MODE(xfm("ao-s", 0020).transform(046, false), 046);
+ EXPECT_EQ_MODE(xfm("a=xs", 0447).transform(0460, false), 06111);
+ EXPECT_EQ_MODE(xfm("a-rx", 0625).transform(0410, false), 00);
+ EXPECT_EQ_MODE(xfm("a+u", 0033).transform(0400, false), 0444);
+ EXPECT_EQ_MODE(xfm("o+X", 0526).transform(0174, false), 0175);
+ EXPECT_EQ_MODE(xfm("a=ts", 0005).transform(02706, false), 07000);
+ EXPECT_EQ_MODE(xfm("ogu-g", 0212).transform(04567, false), 04101);
+ EXPECT_EQ_MODE(xfm("oa-u", 0406).transform(0271, false), 051);
+ EXPECT_EQ_MODE(xfm("a+srX", 0262).transform(0153, false), 06557);
+ EXPECT_EQ_MODE(xfm("ua+swt", 0441).transform(0125, false), 07327);
+ EXPECT_EQ_MODE(xfm("a-u", 0273).transform(0264, false), 044);
+ EXPECT_EQ_MODE(xfm("g=o", 0121).transform(0132, false), 0122);
+ EXPECT_EQ_MODE(xfm("a=s", 0664).transform(0313, false), 06000);
+ EXPECT_EQ_MODE(xfm("u-xw", 0071).transform(0633, false), 0433);
+ EXPECT_EQ_MODE(xfm("g-wxs", 0250).transform(0243, false), 0243);
+ EXPECT_EQ_MODE(xfm("ug+g", 0746).transform(0372, false), 0772);
+ EXPECT_EQ_MODE(xfm("ao-r", 0264).transform(0520, false), 0120);
+ EXPECT_EQ_MODE(xfm("ua=x", 0407).transform(04102, false), 0111);
+ EXPECT_EQ_MODE(xfm("ua=u", 0101).transform(0123, false), 0111);
+ EXPECT_EQ_MODE(xfm("2056", 0254).transform(0331, false), 02056);
+ EXPECT_EQ_MODE(xfm("ag=o", 0742).transform(0341, false), 0111);
+ EXPECT_EQ_MODE(xfm("oga=x", 0111).transform(0112, false), 0111);
+ EXPECT_EQ_MODE(xfm("ou=xX", 0413).transform(066, false), 0161);
+ EXPECT_EQ_MODE(xfm("ao+u", 0336).transform(0743, false), 0777);
+ EXPECT_EQ_MODE(xfm("u+sw", 0743).transform(0723, false), 04723);
+ EXPECT_EQ_MODE(xfm("=560", 0352).transform(0132, false), 0560);
+ EXPECT_EQ_MODE(xfm("ao=x", 0762).transform(0305, false), 0111);
+ EXPECT_EQ_MODE(xfm("g+X", 0766).transform(04515, false), 04515);
+ EXPECT_EQ_MODE(xfm("a-t+w=t", 0722).transform(0221, false), 01000);
+ EXPECT_EQ_MODE(xfm("go+swX", 0234).transform(0542, false), 02573);
+ EXPECT_EQ_MODE(xfm("643", 0447).transform(0161, false), 0643);
+ EXPECT_EQ_MODE(xfm("ua=r+r", 0141).transform(0435, false), 0444);
+ EXPECT_EQ_MODE(xfm("agu-wx", 0650).transform(017, false), 04);
+ EXPECT_EQ_MODE(xfm("541", 0524).transform(0240, false), 0541);
+ EXPECT_EQ_MODE(xfm("ou=s-s", 0147).transform(01675, false), 070);
+ EXPECT_EQ_MODE(xfm("oa-t", 0373).transform(01614, false), 0614);
+ EXPECT_EQ_MODE(xfm("u+X", 0272).transform(01501, false), 01501);
+ EXPECT_EQ_MODE(xfm("oa+ts", 0116).transform(0740, false), 07740);
+ EXPECT_EQ_MODE(xfm("gu-tw", 0570).transform(0760, false), 0540);
+ EXPECT_EQ_MODE(xfm("a+u", 0434).transform(0562, false), 0577);
+ EXPECT_EQ_MODE(xfm("ua+rs", 0521).transform(0400, false), 06444);
+ EXPECT_EQ_MODE(xfm("uo+t", 0207).transform(0563, false), 01563);
+ EXPECT_EQ_MODE(xfm("g=wr", 0371).transform(04756, false), 04766);
+ EXPECT_EQ_MODE(xfm("g+s", 0632).transform(04102, false), 06102);
+ EXPECT_EQ_MODE(xfm("gao+xs", 0265).transform(0565, false), 06575);
+ EXPECT_EQ_MODE(xfm("145", 0510).transform(0512, false), 0145);
+ EXPECT_EQ_MODE(xfm("g=x", 0340).transform(0620, false), 0610);
+ EXPECT_EQ_MODE(xfm("061", 0353).transform(0557, false), 061);
+ EXPECT_EQ_MODE(xfm("o-o", 0050).transform(0542, false), 0540);
+ EXPECT_EQ_MODE(xfm("go+rs", 0764).transform(02462, false), 02466);
+ EXPECT_EQ_MODE(xfm("503", 0355).transform(044, false), 0503);
+ EXPECT_EQ_MODE(xfm("o-X", 0207).transform(0634, false), 0634);
+ EXPECT_EQ_MODE(xfm("agu+s", 0010).transform(0567, false), 06567);
+ EXPECT_EQ_MODE(xfm("467", 0404).transform(0272, false), 0467);
+ EXPECT_EQ_MODE(xfm("ug-X", 0053).transform(0776, false), 0666);
+ EXPECT_EQ_MODE(xfm("aug+rs", 0241).transform(016, false), 06456);
+ EXPECT_EQ_MODE(xfm("a+s-rX", 0670).transform(065, false), 06020);
+ EXPECT_EQ_MODE(xfm("oa+Xxw", 0436).transform(0374, false), 0377);
+ EXPECT_EQ_MODE(xfm("o=xtX", 0430).transform(0355, false), 01351);
+ EXPECT_EQ_MODE(xfm("gu+g", 0552).transform(04744, false), 04744);
+ EXPECT_EQ_MODE(xfm("guo-sr", 0331).transform(0644, false), 0200);
+ EXPECT_EQ_MODE(xfm("g-x", 0215).transform(00, false), 00);
+ EXPECT_EQ_MODE(xfm("a+wt", 0321).transform(0444, false), 01666);
+ EXPECT_EQ_MODE(xfm("g=xt", 0402).transform(0200, false), 0210);
+ EXPECT_EQ_MODE(xfm("gau=Xx", 0500).transform(01722, false), 0111);
+ EXPECT_EQ_MODE(xfm("oua=wtX", 0227).transform(0400, false), 01222);
+ EXPECT_EQ_MODE(xfm("ga=st", 0426).transform(04300, false), 07000);
+ EXPECT_EQ_MODE(xfm("u+g", 0550).transform(0213, false), 0313);
+ EXPECT_EQ_MODE(xfm("g+rs", 0403).transform(02034, false), 02074);
+ EXPECT_EQ_MODE(xfm("oug=Xt", 0437).transform(0462, false), 01000);
+ EXPECT_EQ_MODE(xfm("u+wt", 0041).transform(0433, false), 0633);
+ EXPECT_EQ_MODE(xfm("ou+wt", 0430).transform(0114, false), 01316);
+ EXPECT_EQ_MODE(xfm("oa=Xxw", 0146).transform(0603, false), 0333);
+ EXPECT_EQ_MODE(xfm("ou+Xr", 0341).transform(0771, false), 0775);
+ EXPECT_EQ_MODE(xfm("og+X", 0114).transform(0667, false), 0677);
+ EXPECT_EQ_MODE(xfm("ag=u", 0167).transform(0314, false), 0333);
+ EXPECT_EQ_MODE(xfm("g+t", 0027).transform(0457, false), 0457);
+ EXPECT_EQ_MODE(xfm("ua+txs", 0360).transform(0254, false), 07355);
+ EXPECT_EQ_MODE(xfm("go-w=w", 0432).transform(0467, false), 0422);
+ EXPECT_EQ_MODE(xfm("g=rX", 0600).transform(040, false), 040);
+ EXPECT_EQ_MODE(xfm("a-X", 0637).transform(0716, false), 0606);
+ EXPECT_EQ_MODE(xfm("gau-o", 0005).transform(0272, false), 050);
+ EXPECT_EQ_MODE(xfm("oa+w", 0662).transform(0417, false), 0637);
+ EXPECT_EQ_MODE(xfm("g+tx", 0744).transform(0435, false), 0435);
+ EXPECT_EQ_MODE(xfm("ugo=w", 0327).transform(0370, false), 0222);
+ EXPECT_EQ_MODE(xfm("ua-r", 0075).transform(04657, false), 04213);
+ EXPECT_EQ_MODE(xfm("ugo-t+rs", 0426).transform(0666, false), 06666);
+ EXPECT_EQ_MODE(xfm("u-g", 0766).transform(0552, false), 052);
+ EXPECT_EQ_MODE(xfm("u=Xwt", 0566).transform(0207, false), 0307);
+ EXPECT_EQ_MODE(xfm("g=o", 0717).transform(0666, false), 0666);
+ EXPECT_EQ_MODE(xfm("o+o", 0300).transform(0360, false), 0360);
+ EXPECT_EQ_MODE(xfm("g-Xrt", 0671).transform(00, false), 00);
+ EXPECT_EQ_MODE(xfm("u+Xx", 0030).transform(01025, false), 01125);
+ EXPECT_EQ_MODE(xfm("go+rw", 0305).transform(0410, false), 0476);
+ EXPECT_EQ_MODE(xfm("a=rXw", 0243).transform(0415, false), 0777);
+ EXPECT_EQ_MODE(xfm("au=x", 0467).transform(050, false), 0111);
+ EXPECT_EQ_MODE(xfm("go+x", 0613).transform(0126, false), 0137);
+ EXPECT_EQ_MODE(xfm("oa=tX", 0030).transform(0443, false), 01111);
+ EXPECT_EQ_MODE(xfm("o=Xtr", 0451).transform(0356, false), 01355);
+ EXPECT_EQ_MODE(xfm("uo+w=rt", 0466).transform(027, false), 01424);
+ EXPECT_EQ_MODE(xfm("oa+wxr", 0442).transform(0324, false), 0777);
+ EXPECT_EQ_MODE(xfm("gu+x", 0733).transform(04372, false), 04372);
+ EXPECT_EQ_MODE(xfm("ou=t", 0520).transform(01676, false), 01070);
+ EXPECT_EQ_MODE(xfm("au-w", 0650).transform(0157, false), 0155);
+ EXPECT_EQ_MODE(xfm("o-g", 0614).transform(0271, false), 0270);
+ EXPECT_EQ_MODE(xfm("a+Xwt", 0154).transform(0742, false), 01773);
+ EXPECT_EQ_MODE(xfm("g-X", 0555).transform(041, false), 041);
+ EXPECT_EQ_MODE(xfm("oug-g", 0342).transform(0576, false), 00);
+ EXPECT_EQ_MODE(xfm("o=wst", 0076).transform(04671, false), 05672);
+ EXPECT_EQ_MODE(xfm("gua-r", 0337).transform(0754, false), 0310);
+ EXPECT_EQ_MODE(xfm("go+xXw", 0752).transform(020, false), 033);
+ EXPECT_EQ_MODE(xfm("o+Xrt", 0123).transform(0633, false), 01637);
+ EXPECT_EQ_MODE(xfm("oug-sXw", 0521).transform(024, false), 04);
+ EXPECT_EQ_MODE(xfm("130", 0317).transform(0244, false), 0130);
+ EXPECT_EQ_MODE(xfm("u-sxr", 0464).transform(0740, false), 0240);
+ EXPECT_EQ_MODE(xfm("ga-txw", 0007).transform(076, false), 044);
+ EXPECT_EQ_MODE(xfm("oau+tXw", 0006).transform(0660, false), 01662);
+ EXPECT_EQ_MODE(xfm("o-g", 0755).transform(0404, false), 0404);
+ EXPECT_EQ_MODE(xfm("ao+tX", 0266).transform(0135, false), 01135);
+ EXPECT_EQ_MODE(xfm("oa=wts", 0266).transform(0513, false), 07222);
+ EXPECT_EQ_MODE(xfm("ugo-xr", 0703).transform(0662, false), 0222);
+ EXPECT_EQ_MODE(xfm("g-rwx", 0420).transform(0130, false), 0100);
+ EXPECT_EQ_MODE(xfm("=133", 0551).transform(0417, false), 0133);
+ EXPECT_EQ_MODE(xfm("o=wXt", 0767).transform(04151, false), 05153);
+ EXPECT_EQ_MODE(xfm("060", 0041).transform(0204, false), 060);
+ EXPECT_EQ_MODE(xfm("ago+Xx", 0440).transform(0751, false), 0751);
+ EXPECT_EQ_MODE(xfm("g+w", 0263).transform(0110, false), 0130);
+ EXPECT_EQ_MODE(xfm("a-t", 0041).transform(0374, false), 0374);
+ EXPECT_EQ_MODE(xfm("g=u", 0564).transform(02436, false), 0446);
+ EXPECT_EQ_MODE(xfm("ago=Xw", 0724).transform(01327, false), 0333);
+ EXPECT_EQ_MODE(xfm("oa+x", 0424).transform(0632, false), 0733);
+ EXPECT_EQ_MODE(xfm("-2467", 0623).transform(0315, false), 0310);
+ EXPECT_EQ_MODE(xfm("au+t", 0544).transform(0740, false), 01740);
+ EXPECT_EQ_MODE(xfm("og=x-t+xr", 0325).transform(0237, false), 0255);
+ EXPECT_EQ_MODE(xfm("uag-rx", 0260).transform(0110, false), 00);
+ EXPECT_EQ_MODE(xfm("oa=w", 0100).transform(0736, false), 0222);
+ EXPECT_EQ_MODE(xfm("ua+X=x-wrt", 0452).transform(0131, false), 0111);
+ EXPECT_EQ_MODE(xfm("u-s", 0002).transform(0277, false), 0277);
+ EXPECT_EQ_MODE(xfm("a-w", 0771).transform(04752, false), 04550);
+ EXPECT_EQ_MODE(xfm("oa=w", 0764).transform(0205, false), 0222);
+ EXPECT_EQ_MODE(xfm("a=u", 0312).transform(04755, false), 0777);
+ EXPECT_EQ_MODE(xfm("o-wx", 0525).transform(0775, false), 0774);
+ EXPECT_EQ_MODE(xfm("go=g", 0122).transform(0551, false), 0555);
+ EXPECT_EQ_MODE(xfm("gu+xX", 0115).transform(0531, false), 0531);
+ EXPECT_EQ_MODE(xfm("604", 0400).transform(0202, false), 0604);
+ EXPECT_EQ_MODE(xfm("-0425", 0066).transform(0533, false), 0112);
+ EXPECT_EQ_MODE(xfm("503", 0024).transform(0236, false), 0503);
+ EXPECT_EQ_MODE(xfm("u=g", 0304).transform(0156, false), 0556);
+ EXPECT_EQ_MODE(xfm("gu=tx", 0465).transform(0545, false), 0115);
+ EXPECT_EQ_MODE(xfm("ug=o", 0377).transform(026, false), 0666);
+ EXPECT_EQ_MODE(xfm("ag-st", 0635).transform(071, false), 071);
+ EXPECT_EQ_MODE(xfm("a+wt", 0520).transform(0357, false), 01377);
+ EXPECT_EQ_MODE(xfm("og-tx", 0351).transform(04610, false), 04600);
+ EXPECT_EQ_MODE(xfm("a+tXs", 0126).transform(0505, false), 07515);
+ EXPECT_EQ_MODE(xfm("gu=w", 0365).transform(0436, false), 0226);
+ EXPECT_EQ_MODE(xfm("a+u", 0006).transform(0136, false), 0137);
+ EXPECT_EQ_MODE(xfm("ua-wx", 0511).transform(01326, false), 01004);
+ EXPECT_EQ_MODE(xfm("-360", 0214).transform(01603, false), 01403);
+ EXPECT_EQ_MODE(xfm("oa+sr", 0204).transform(0226, false), 06666);
+ EXPECT_EQ_MODE(xfm("u=sw", 0335).transform(0577, false), 04277);
+ EXPECT_EQ_MODE(xfm("o=u", 0506).transform(0775, false), 0777);
+ EXPECT_EQ_MODE(xfm("aog+X", 0277).transform(0541, false), 0551);
+ EXPECT_EQ_MODE(xfm("o=xX", 0574).transform(0445, false), 0441);
+ EXPECT_EQ_MODE(xfm("go-Xxt", 0610).transform(02305, false), 02304);
+ EXPECT_EQ_MODE(xfm("uo+Xr", 0615).transform(01242, false), 01646);
+ EXPECT_EQ_MODE(xfm("au=u", 0756).transform(00, false), 00);
+ EXPECT_EQ_MODE(xfm("ou-tsX", 0774).transform(0610, false), 0610);
+ EXPECT_EQ_MODE(xfm("ou-r", 0147).transform(0551, false), 0151);
+ EXPECT_EQ_MODE(xfm("ua+xr", 0330).transform(065, false), 0575);
+ EXPECT_EQ_MODE(xfm("240", 0303).transform(0502, false), 0240);
+ EXPECT_EQ_MODE(xfm("ou=t", 0446).transform(0360, false), 01060);
+ EXPECT_EQ_MODE(xfm("gu=r", 0514).transform(0220, false), 0440);
+ EXPECT_EQ_MODE(xfm("u=o", 0274).transform(0221, false), 0121);
+ EXPECT_EQ_MODE(xfm("o=o", 0011).transform(0110, false), 0110);
+ EXPECT_EQ_MODE(xfm("go=X", 0021).transform(041, false), 011);
+ EXPECT_EQ_MODE(xfm("o=u", 0146).transform(0311, false), 0313);
+ EXPECT_EQ_MODE(xfm("guo-sw", 0442).transform(01641, false), 01441);
+ EXPECT_EQ_MODE(xfm("ug+r", 0513).transform(0441, false), 0441);
+ EXPECT_EQ_MODE(xfm("uo+u", 0032).transform(0400, false), 0404);
+ EXPECT_EQ_MODE(xfm("ug+s", 0735).transform(0546, false), 06546);
+ EXPECT_EQ_MODE(xfm("guo=o", 0305).transform(0654, false), 0444);
+ EXPECT_EQ_MODE(xfm("ago-s", 0310).transform(0125, false), 0125);
+ EXPECT_EQ_MODE(xfm("ag=t-swX", 0723).transform(0550, false), 01000);
+ EXPECT_EQ_MODE(xfm("oua-u", 0047).transform(0654, false), 010);
+ EXPECT_EQ_MODE(xfm("og-sX", 0405).transform(0372, false), 0362);
+ EXPECT_EQ_MODE(xfm("ag-Xr", 0473).transform(04, false), 00);
+ EXPECT_EQ_MODE(xfm("a+X", 0753).transform(0744, false), 0755);
+ EXPECT_EQ_MODE(xfm("o-tX", 0223).transform(04070, false), 04070);
+ EXPECT_EQ_MODE(xfm("a-Xs", 0101).transform(0323, false), 0222);
+ EXPECT_EQ_MODE(xfm("uo+u", 0135).transform(0235, false), 0237);
+ EXPECT_EQ_MODE(xfm("ga-x", 0004).transform(0660, false), 0660);
+ EXPECT_EQ_MODE(xfm("ga+tw", 0772).transform(064, false), 01266);
+ EXPECT_EQ_MODE(xfm("ao+xrt", 0116).transform(0166, false), 01577);
+ EXPECT_EQ_MODE(xfm("oa+tw", 0500).transform(015, false), 01237);
+ EXPECT_EQ_MODE(xfm("au-s", 0750).transform(01647, false), 01647);
+ EXPECT_EQ_MODE(xfm("oug+twx", 0157).transform(012, false), 01333);
+ EXPECT_EQ_MODE(xfm("a-Xs", 0757).transform(067, false), 066);
+ EXPECT_EQ_MODE(xfm("430", 0700).transform(02327, false), 0430);
+ EXPECT_EQ_MODE(xfm("g=x", 0363).transform(0452, false), 0412);
+ EXPECT_EQ_MODE(xfm("-477", 0647).transform(01563, false), 01100);
+ EXPECT_EQ_MODE(xfm("g+t", 0545).transform(0315, false), 0315);
+ EXPECT_EQ_MODE(xfm("au+t", 0403).transform(0634, false), 01634);
+ EXPECT_EQ_MODE(xfm("+1335", 0570).transform(02064, false), 03375);
+ EXPECT_EQ_MODE(xfm("ao+tw", 0645).transform(0476, false), 01676);
+ EXPECT_EQ_MODE(xfm("=451", 0646).transform(0475, false), 0451);
+ EXPECT_EQ_MODE(xfm("ag+X-s", 0207).transform(02076, false), 0177);
+ EXPECT_EQ_MODE(xfm("g=sx", 0060).transform(0427, false), 02417);
+ EXPECT_EQ_MODE(xfm("gu+txX", 0000).transform(04401, false), 04511);
+ EXPECT_EQ_MODE(xfm("gu-t+X", 0263).transform(0376, false), 0376);
+ EXPECT_EQ_MODE(xfm("a-t", 0010).transform(0547, false), 0547);
+ EXPECT_EQ_MODE(xfm("gou=r", 0625).transform(01727, false), 0444);
+ EXPECT_EQ_MODE(xfm("o=tr", 0503).transform(0352, false), 01354);
+ EXPECT_EQ_MODE(xfm("au+t", 0524).transform(0502, false), 01502);
+ EXPECT_EQ_MODE(xfm("go-x", 0602).transform(0464, false), 0464);
+ EXPECT_EQ_MODE(xfm("+076", 0446).transform(0416, false), 0476);
+ EXPECT_EQ_MODE(xfm("o+wXs", 0331).transform(04451, false), 04453);
+ EXPECT_EQ_MODE(xfm("u+w", 0617).transform(0566, false), 0766);
+ EXPECT_EQ_MODE(xfm("a+w", 0041).transform(01565, false), 01767);
+ EXPECT_EQ_MODE(xfm("g+xtw", 0046).transform(0200, false), 0230);
+ EXPECT_EQ_MODE(xfm("g-o", 0335).transform(0437, false), 0407);
+ EXPECT_EQ_MODE(xfm("og+u", 0510).transform(01140, false), 01151);
+ EXPECT_EQ_MODE(xfm("060", 0332).transform(0146, false), 060);
+ EXPECT_EQ_MODE(xfm("ga=u", 0136).transform(057, false), 00);
+ EXPECT_EQ_MODE(xfm("ga-xs", 0131).transform(0602, false), 0602);
+ EXPECT_EQ_MODE(xfm("ua=X", 0572).transform(0255, false), 0111);
+ EXPECT_EQ_MODE(xfm("gu-Xs", 0711).transform(0770, false), 0660);
+ EXPECT_EQ_MODE(xfm("uo+u", 0301).transform(0560, false), 0565);
+ EXPECT_EQ_MODE(xfm("goa+Xr", 0771).transform(0151, false), 0555);
+ EXPECT_EQ_MODE(xfm("u-s+rwt", 0325).transform(04244, false), 0644);
+ EXPECT_EQ_MODE(xfm("uoa+o", 0531).transform(024, false), 0464);
+ EXPECT_EQ_MODE(xfm("a+rwt", 0740).transform(0673, false), 01677);
+ EXPECT_EQ_MODE(xfm("a=tsX", 0211).transform(0334, false), 07111);
+ EXPECT_EQ_MODE(xfm("ao+tX", 0722).transform(0775, false), 01775);
+ EXPECT_EQ_MODE(xfm("ou=s", 0455).transform(0750, false), 04050);
+ EXPECT_EQ_MODE(xfm("o-u", 0027).transform(040, false), 040);
+ EXPECT_EQ_MODE(xfm("ou+wxs", 0117).transform(0366, false), 04367);
+ EXPECT_EQ_MODE(xfm("au=o", 0276).transform(017, false), 0777);
+ EXPECT_EQ_MODE(xfm("uo+w=x", 0736).transform(0126, false), 0121);
+ EXPECT_EQ_MODE(xfm("131", 0276).transform(0112, false), 0131);
+ EXPECT_EQ_MODE(xfm("u=wX", 0565).transform(0231, false), 0331);
+ EXPECT_EQ_MODE(xfm("u=u", 0371).transform(01757, false), 01757);
+ EXPECT_EQ_MODE(xfm("og=rw", 0173).transform(01270, false), 0266);
+ EXPECT_EQ_MODE(xfm("a=x", 0572).transform(0633, false), 0111);
+ EXPECT_EQ_MODE(xfm("gou-ts", 0660).transform(0317, false), 0317);
+ EXPECT_EQ_MODE(xfm("ug=g", 0234).transform(0503, false), 03);
+ EXPECT_EQ_MODE(xfm("g+rx", 0537).transform(0737, false), 0777);
+ EXPECT_EQ_MODE(xfm("o-o", 0376).transform(0623, false), 0620);
+ EXPECT_EQ_MODE(xfm("o-st", 0341).transform(0754, false), 0754);
+ EXPECT_EQ_MODE(xfm("au=x", 0362).transform(0470, false), 0111);
+ EXPECT_EQ_MODE(xfm("o+w", 0564).transform(0314, false), 0316);
+ EXPECT_EQ_MODE(xfm("o=Xx", 0112).transform(0767, false), 0761);
+ EXPECT_EQ_MODE(xfm("o+r", 0135).transform(0365, false), 0365);
+ EXPECT_EQ_MODE(xfm("ou=w", 0406).transform(0574, false), 0272);
+ EXPECT_EQ_MODE(xfm("og=xtr", 0357).transform(01722, false), 01755);
+ EXPECT_EQ_MODE(xfm("u+Xx", 0761).transform(04, false), 0104);
+ EXPECT_EQ_MODE(xfm("167", 0464).transform(0770, false), 0167);
+ EXPECT_EQ_MODE(xfm("g-sx", 0654).transform(0217, false), 0207);
+ EXPECT_EQ_MODE(xfm("uo-stX", 0514).transform(044, false), 044);
+ EXPECT_EQ_MODE(xfm("u=xs", 0302).transform(0715, false), 04115);
+ EXPECT_EQ_MODE(xfm("go+g", 0050).transform(0173, false), 0177);
+ EXPECT_EQ_MODE(xfm("563", 0457).transform(0414, false), 0563);
+ EXPECT_EQ_MODE(xfm("ua-Xws", 0327).transform(0752, false), 0440);
+ EXPECT_EQ_MODE(xfm("ou=sX", 0503).transform(0774, false), 04171);
+ EXPECT_EQ_MODE(xfm("g+wx", 0656).transform(0232, false), 0232);
+ EXPECT_EQ_MODE(xfm("a+xr", 0220).transform(0522, false), 0577);
+ EXPECT_EQ_MODE(xfm("og-rt", 0423).transform(01076, false), 032);
+ EXPECT_EQ_MODE(xfm("a+rtw", 0445).transform(0334, false), 01776);
+ EXPECT_EQ_MODE(xfm("a=sx", 0674).transform(02, false), 06111);
+ EXPECT_EQ_MODE(xfm("u+r", 0774).transform(04173, false), 04573);
+ EXPECT_EQ_MODE(xfm("=0646", 0040).transform(0111, false), 0646);
+ EXPECT_EQ_MODE(xfm("ao-X", 0570).transform(0611, false), 0600);
+ EXPECT_EQ_MODE(xfm("go=tsr", 0104).transform(050, false), 03044);
+ EXPECT_EQ_MODE(xfm("o-xws", 0513).transform(0513, false), 0510);
+ EXPECT_EQ_MODE(xfm("g+Xr", 0326).transform(0152, false), 0152);
+ EXPECT_EQ_MODE(xfm("au+r-st", 0460).transform(0373, false), 0777);
+ EXPECT_EQ_MODE(xfm("g+sXr", 0643).transform(0330, false), 02370);
+ EXPECT_EQ_MODE(xfm("a+t=srt", 0032).transform(06, false), 07444);
+ EXPECT_EQ_MODE(xfm("2601", 0626).transform(0543, false), 02601);
+ EXPECT_EQ_MODE(xfm("ug+g", 0305).transform(02171, false), 02771);
+ EXPECT_EQ_MODE(xfm("u-o", 0565).transform(031, false), 031);
+ EXPECT_EQ_MODE(xfm("ugo+u", 0157).transform(0334, false), 0337);
+ EXPECT_EQ_MODE(xfm("171", 0360).transform(0505, false), 0171);
+ EXPECT_EQ_MODE(xfm("o+stX", 0342).transform(0640, false), 01640);
+ EXPECT_EQ_MODE(xfm("ga+rt", 0777).transform(0561, false), 01565);
+ EXPECT_EQ_MODE(xfm("ao+sX", 0671).transform(0757, false), 06757);
+ EXPECT_EQ_MODE(xfm("o=s", 0174).transform(0622, false), 0620);
+ EXPECT_EQ_MODE(xfm("oa=g", 0335).transform(0577, false), 0777);
+ EXPECT_EQ_MODE(xfm("a+g", 0405).transform(0462, false), 0666);
+ EXPECT_EQ_MODE(xfm("go+xX", 0407).transform(0406, false), 0417);
+ EXPECT_EQ_MODE(xfm("ou-X", 0507).transform(0220, false), 0220);
+ EXPECT_EQ_MODE(xfm("og-u", 0036).transform(0665, false), 0601);
+ EXPECT_EQ_MODE(xfm("ou-xs", 0066).transform(047, false), 046);
+ EXPECT_EQ_MODE(xfm("670", 0345).transform(02, false), 0670);
+ EXPECT_EQ_MODE(xfm("au+wt", 0141).transform(0312, false), 01332);
+ EXPECT_EQ_MODE(xfm("o=s", 0275).transform(0431, false), 0430);
+ EXPECT_EQ_MODE(xfm("ao-tXr", 0366).transform(0363, false), 0222);
+ EXPECT_EQ_MODE(xfm("ga-rx", 0013).transform(0677, false), 0222);
+ EXPECT_EQ_MODE(xfm("gou=rsx", 0414).transform(0602, false), 06555);
+ EXPECT_EQ_MODE(xfm("a=g", 0135).transform(0213, false), 0111);
+ EXPECT_EQ_MODE(xfm("gu=x", 0327).transform(0751, false), 0111);
+ EXPECT_EQ_MODE(xfm("ag=x", 0014).transform(0231, false), 0111);
+ EXPECT_EQ_MODE(xfm("u+rXs", 0370).transform(0756, false), 04756);
+ EXPECT_EQ_MODE(xfm("ga-x=t", 0523).transform(044, false), 01000);
+ EXPECT_EQ_MODE(xfm("g-X=rX", 0320).transform(0114, false), 0154);
+ EXPECT_EQ_MODE(xfm("o+rst", 0322).transform(030, false), 01034);
+ EXPECT_EQ_MODE(xfm("u=ws", 0735).transform(031, false), 04231);
+ EXPECT_EQ_MODE(xfm("g=o", 0073).transform(0515, false), 0555);
+ EXPECT_EQ_MODE(xfm("au-sw", 0517).transform(056, false), 054);
+ EXPECT_EQ_MODE(xfm("o+xwt", 0110).transform(027, false), 01027);
+ EXPECT_EQ_MODE(xfm("aog=w", 0471).transform(01012, false), 0222);
+ EXPECT_EQ_MODE(xfm("gua+ts", 0166).transform(0723, false), 07723);
+ EXPECT_EQ_MODE(xfm("325", 0107).transform(0770, false), 0325);
+ EXPECT_EQ_MODE(xfm("ag=str", 0417).transform(0126, false), 07444);
+ EXPECT_EQ_MODE(xfm("o-u", 0467).transform(0456, false), 0452);
+ EXPECT_EQ_MODE(xfm("g-t+st", 0627).transform(0562, false), 02562);
+ EXPECT_EQ_MODE(xfm("a-rx", 0176).transform(01424, false), 01020);
+ EXPECT_EQ_MODE(xfm("o-w", 0267).transform(0650, false), 0650);
+ EXPECT_EQ_MODE(xfm("u+s", 0455).transform(0475, false), 04475);
+ EXPECT_EQ_MODE(xfm("a-wt", 0505).transform(0517, false), 0515);
+ EXPECT_EQ_MODE(xfm("a=trX", 0167).transform(04110, false), 01555);
+ EXPECT_EQ_MODE(xfm("0066", 0020).transform(0650, false), 066);
+ EXPECT_EQ_MODE(xfm("ga=wts", 0367).transform(0261, false), 07222);
+ EXPECT_EQ_MODE(xfm("u-xsw", 0557).transform(0534, false), 0434);
+ EXPECT_EQ_MODE(xfm("ou=xw", 0313).transform(0412, false), 0313);
+ EXPECT_EQ_MODE(xfm("552", 0222).transform(0776, false), 0552);
+ EXPECT_EQ_MODE(xfm("-254", 0645).transform(020, false), 020);
+ EXPECT_EQ_MODE(xfm("u-Xx", 0521).transform(0270, false), 0270);
+ EXPECT_EQ_MODE(xfm("ou+Xs", 0112).transform(04665, false), 04765);
+ EXPECT_EQ_MODE(xfm("o=rs", 0436).transform(02225, false), 02224);
+ EXPECT_EQ_MODE(xfm("u=X", 0304).transform(0325, false), 0125);
+ EXPECT_EQ_MODE(xfm("ug=X", 0373).transform(0100, false), 0110);
+ EXPECT_EQ_MODE(xfm("g+o", 0430).transform(0430, false), 0430);
+ EXPECT_EQ_MODE(xfm("o-rt", 0335).transform(02526, false), 02522);
+ EXPECT_EQ_MODE(xfm("773", 0021).transform(04507, false), 0773);
+ EXPECT_EQ_MODE(xfm("g+o", 0444).transform(0770, false), 0770);
+ EXPECT_EQ_MODE(xfm("ago-xw", 0234).transform(0107, false), 04);
+ EXPECT_EQ_MODE(xfm("ao-wt", 0732).transform(020, false), 00);
+ EXPECT_EQ_MODE(xfm("ao+sX", 0200).transform(046, false), 06046);
+ EXPECT_EQ_MODE(xfm("o+w", 0343).transform(033, false), 033);
+ EXPECT_EQ_MODE(xfm("g+rX", 0424).transform(04156, false), 04156);
+ EXPECT_EQ_MODE(xfm("ao+rw", 0210).transform(031, false), 0677);
+ EXPECT_EQ_MODE(xfm("agu-xt", 0037).transform(0551, false), 0440);
+ EXPECT_EQ_MODE(xfm("ago+Xw", 0042).transform(01665, false), 01777);
+ EXPECT_EQ_MODE(xfm("ua-u", 0474).transform(0407, false), 03);
+ EXPECT_EQ_MODE(xfm("g-g", 0327).transform(0456, false), 0406);
+ EXPECT_EQ_MODE(xfm("uo-sx", 0535).transform(0142, false), 042);
+ EXPECT_EQ_MODE(xfm("oa=r", 0741).transform(037, false), 0444);
+ EXPECT_EQ_MODE(xfm("uoa-srX", 0664).transform(04734, false), 0220);
+ EXPECT_EQ_MODE(xfm("o-ts", 0274).transform(0561, false), 0561);
+ EXPECT_EQ_MODE(xfm("ag=r+tw", 0344).transform(0465, false), 01666);
+ EXPECT_EQ_MODE(xfm("uga-rxw", 0602).transform(04224, false), 04000);
+ EXPECT_EQ_MODE(xfm("goa=s-wt", 0004).transform(030, false), 06000);
+ EXPECT_EQ_MODE(xfm("u-t", 0253).transform(0227, false), 0227);
+ EXPECT_EQ_MODE(xfm("1554", 0365).transform(0454, false), 01554);
+ EXPECT_EQ_MODE(xfm("ug-rwt", 0302).transform(0412, false), 012);
+ EXPECT_EQ_MODE(xfm("ou+w", 0543).transform(0766, false), 0766);
+ EXPECT_EQ_MODE(xfm("ag=o", 0042).transform(0571, false), 0111);
+ EXPECT_EQ_MODE(xfm("ag-wr", 0015).transform(04, false), 00);
+ EXPECT_EQ_MODE(xfm("uoa=g", 0776).transform(0721, false), 0222);
+ EXPECT_EQ_MODE(xfm("ao=xrX", 0352).transform(041, false), 0555);
+ EXPECT_EQ_MODE(xfm("ago-u", 0717).transform(0714, false), 00);
+ EXPECT_EQ_MODE(xfm("ao+tX", 0424).transform(04441, false), 05551);
+ EXPECT_EQ_MODE(xfm("ou-r+Xr", 0075).transform(0526, false), 0527);
+ EXPECT_EQ_MODE(xfm("ga-wX", 0674).transform(010, false), 00);
+ EXPECT_EQ_MODE(xfm("373", 0673).transform(04, false), 0373);
+ EXPECT_EQ_MODE(xfm("u+wt", 0775).transform(0354, false), 0354);
+ EXPECT_EQ_MODE(xfm("go=Xr", 0101).transform(0244, false), 0244);
+ EXPECT_EQ_MODE(xfm("gu=Xs", 0421).transform(045, false), 06115);
+ EXPECT_EQ_MODE(xfm("g-Xw", 0113).transform(01131, false), 01101);
+ EXPECT_EQ_MODE(xfm("g-ts", 0134).transform(0557, false), 0557);
+ EXPECT_EQ_MODE(xfm("goa=wr", 0503).transform(0304, false), 0666);
+ EXPECT_EQ_MODE(xfm("ao-g", 0331).transform(0622, false), 0400);
+ EXPECT_EQ_MODE(xfm("uo-X", 0526).transform(0733, false), 0632);
+ EXPECT_EQ_MODE(xfm("g-o", 0045).transform(0653, false), 0643);
+ EXPECT_EQ_MODE(xfm("o=w", 0511).transform(0561, false), 0562);
+ EXPECT_EQ_MODE(xfm("ao=X", 0523).transform(0657, false), 0111);
+ EXPECT_EQ_MODE(xfm("ag=g", 0572).transform(01001, false), 00);
+ EXPECT_EQ_MODE(xfm("a=rs", 0015).transform(01625, false), 06444);
+ EXPECT_EQ_MODE(xfm("og=srw", 0353).transform(0701, false), 02766);
+ EXPECT_EQ_MODE(xfm("au+x", 0331).transform(035, false), 0135);
+ EXPECT_EQ_MODE(xfm("o=s", 0235).transform(0733, false), 0730);
+ EXPECT_EQ_MODE(xfm("oa-sw", 0531).transform(0271, false), 051);
+ EXPECT_EQ_MODE(xfm("a-u", 0775).transform(00, false), 00);
+ EXPECT_EQ_MODE(xfm("a-r", 0353).transform(0216, false), 0212);
+ EXPECT_EQ_MODE(xfm("a+ts", 0671).transform(07, false), 07007);
+ EXPECT_EQ_MODE(xfm("o=rw", 0252).transform(0434, false), 0436);
+ EXPECT_EQ_MODE(xfm("gu-w", 0572).transform(0370, false), 0150);
+ EXPECT_EQ_MODE(xfm("ao=ws", 0417).transform(04775, false), 06222);
+ EXPECT_EQ_MODE(xfm("a+tx", 0344).transform(0216, false), 01317);
+ EXPECT_EQ_MODE(xfm("g=tr", 0571).transform(04511, false), 04541);
+ EXPECT_EQ_MODE(xfm("oa-t", 0352).transform(0275, false), 0275);
+ EXPECT_EQ_MODE(xfm("022", 0215).transform(0553, false), 022);
+ EXPECT_EQ_MODE(xfm("a+x", 0013).transform(053, false), 0153);
+ EXPECT_EQ_MODE(xfm("go=o", 0637).transform(036, false), 066);
+ EXPECT_EQ_MODE(xfm("ga-u", 0607).transform(04466, false), 04022);
+ EXPECT_EQ_MODE(xfm("a=tw", 0413).transform(011, false), 01222);
+ EXPECT_EQ_MODE(xfm("ou-o", 0657).transform(0564, false), 0160);
+ EXPECT_EQ_MODE(xfm("a-o", 0477).transform(0612, false), 0410);
+ EXPECT_EQ_MODE(xfm("u=w", 0134).transform(02233, false), 02233);
+ EXPECT_EQ_MODE(xfm("u+u", 0237).transform(0710, false), 0710);
+ EXPECT_EQ_MODE(xfm("o-Xx", 0223).transform(0255, false), 0254);
+ EXPECT_EQ_MODE(xfm("o+w", 0303).transform(020, false), 022);
+ EXPECT_EQ_MODE(xfm("1402", 0510).transform(0723, false), 01402);
+ EXPECT_EQ_MODE(xfm("ao=wx", 0701).transform(0460, false), 0333);
+ EXPECT_EQ_MODE(xfm("oag+stX", 0702).transform(040, false), 07040);
+ EXPECT_EQ_MODE(xfm("gu+x-Xrt", 0403).transform(0345, false), 0205);
+ EXPECT_EQ_MODE(xfm("o-X", 0501).transform(0177, false), 0176);
+ EXPECT_EQ_MODE(xfm("u=r", 0206).transform(01313, false), 01413);
+ EXPECT_EQ_MODE(xfm("u+X", 0204).transform(01137, false), 01137);
+ EXPECT_EQ_MODE(xfm("go=t", 0140).transform(0463, false), 01400);
+ EXPECT_EQ_MODE(xfm("ua+s=Xx", 0152).transform(0330, false), 0111);
+ EXPECT_EQ_MODE(xfm("go=wr", 0741).transform(01400, false), 0466);
+ EXPECT_EQ_MODE(xfm("ag-tx", 0456).transform(030, false), 020);
+ EXPECT_EQ_MODE(xfm("4153", 0521).transform(041, false), 04153);
+ EXPECT_EQ_MODE(xfm("uao-s", 0211).transform(0745, false), 0745);
+ EXPECT_EQ_MODE(xfm("ou-s", 0660).transform(0144, false), 0144);
+ EXPECT_EQ_MODE(xfm("o-o", 0732).transform(046, false), 040);
+ EXPECT_EQ_MODE(xfm("ga-g", 0677).transform(02470, false), 02000);
+ EXPECT_EQ_MODE(xfm("oa+r", 0432).transform(0541, false), 0545);
+ EXPECT_EQ_MODE(xfm("uo-st", 0076).transform(0660, false), 0660);
+ EXPECT_EQ_MODE(xfm("uo+s", 0234).transform(0407, false), 04407);
+ EXPECT_EQ_MODE(xfm("u=w", 0750).transform(0262, false), 0262);
+ EXPECT_EQ_MODE(xfm("o-Xw", 0013).transform(0511, false), 0510);
+ EXPECT_EQ_MODE(xfm("032", 0523).transform(0147, false), 032);
+ EXPECT_EQ_MODE(xfm("u+g", 0656).transform(01626, false), 01626);
+ EXPECT_EQ_MODE(xfm("+620", 0225).transform(02306, false), 02726);
+ EXPECT_EQ_MODE(xfm("u-r", 0326).transform(0441, false), 041);
+ EXPECT_EQ_MODE(xfm("o=t", 0206).transform(0560, false), 01560);
+ EXPECT_EQ_MODE(xfm("og+Xs", 0615).transform(0464, false), 02464);
+ EXPECT_EQ_MODE(xfm("ua-s", 0274).transform(0552, false), 0552);
+ EXPECT_EQ_MODE(xfm("ag+Xs", 0442).transform(0623, false), 06733);
+ EXPECT_EQ_MODE(xfm("o=wXs", 0472).transform(0650, false), 0653);
+ EXPECT_EQ_MODE(xfm("ou-ws", 0073).transform(0604, false), 0404);
+ EXPECT_EQ_MODE(xfm("o+s", 0745).transform(04137, false), 04137);
+ EXPECT_EQ_MODE(xfm("ua-tx", 0451).transform(0340, false), 0240);
+ EXPECT_EQ_MODE(xfm("427", 0017).transform(0774, false), 0427);
+ EXPECT_EQ_MODE(xfm("ao+w", 0406).transform(075, false), 0277);
+ EXPECT_EQ_MODE(xfm("g=r", 0530).transform(01312, false), 01342);
+ EXPECT_EQ_MODE(xfm("ao=g", 0431).transform(0421, false), 0222);
+ EXPECT_EQ_MODE(xfm("o=xw", 0576).transform(0147, false), 0143);
+ EXPECT_EQ_MODE(xfm("a=sr", 0602).transform(0225, false), 06444);
+ EXPECT_EQ_MODE(xfm("230", 0753).transform(0213, false), 0230);
+ EXPECT_EQ_MODE(xfm("-214", 0252).transform(0102, false), 0102);
+ EXPECT_EQ_MODE(xfm("u=s", 0713).transform(0347, false), 04047);
+ EXPECT_EQ_MODE(xfm("u=s", 0377).transform(040, false), 04040);
+ EXPECT_EQ_MODE(xfm("gua=s", 0056).transform(02303, false), 06000);
+ EXPECT_EQ_MODE(xfm("o-g", 0404).transform(0575, false), 0570);
+ EXPECT_EQ_MODE(xfm("o-g", 0343).transform(0663, false), 0661);
+ EXPECT_EQ_MODE(xfm("o=g", 0204).transform(063, false), 066);
+ EXPECT_EQ_MODE(xfm("og=wXs", 0054).transform(0603, false), 02633);
+ EXPECT_EQ_MODE(xfm("gu=wx", 0221).transform(0335, false), 0335);
+ EXPECT_EQ_MODE(xfm("og+o", 0132).transform(0376, false), 0376);
+ EXPECT_EQ_MODE(xfm("u+Xw", 0223).transform(0643, false), 0743);
+ EXPECT_EQ_MODE(xfm("g=tsw", 0063).transform(0147, false), 02127);
+ EXPECT_EQ_MODE(xfm("au+rtX", 0200).transform(0731, false), 01775);
+ EXPECT_EQ_MODE(xfm("o-t", 0566).transform(0560, false), 0560);
+ EXPECT_EQ_MODE(xfm("ua+t", 0055).transform(0722, false), 01722);
+ EXPECT_EQ_MODE(xfm("u=X", 0536).transform(072, false), 0172);
+ EXPECT_EQ_MODE(xfm("607", 0007).transform(0260, false), 0607);
+ EXPECT_EQ_MODE(xfm("ou=u", 0424).transform(04373, false), 0373);
+ EXPECT_EQ_MODE(xfm("ag=r+st", 0752).transform(070, false), 07444);
+ EXPECT_EQ_MODE(xfm("ua+w", 0042).transform(0252, false), 0272);
+ EXPECT_EQ_MODE(xfm("a+r", 0170).transform(0615, false), 0655);
+ EXPECT_EQ_MODE(xfm("oga+r", 0400).transform(0122, false), 0566);
+ EXPECT_EQ_MODE(xfm("og-w", 0047).transform(00, false), 00);
+ EXPECT_EQ_MODE(xfm("g-u", 0314).transform(0236, false), 0216);
+ EXPECT_EQ_MODE(xfm("o=sw", 0140).transform(0402, false), 0402);
+ EXPECT_EQ_MODE(xfm("ao-xr", 0356).transform(02436, false), 02022);
+ EXPECT_EQ_MODE(xfm("ua+tx", 0470).transform(0166, false), 01177);
+ EXPECT_EQ_MODE(xfm("agu+r", 0714).transform(0143, false), 0547);
+ EXPECT_EQ_MODE(xfm("uo-rs", 0417).transform(0226, false), 0222);
+ EXPECT_EQ_MODE(xfm("ug=o", 0174).transform(0105, false), 0555);
+ EXPECT_EQ_MODE(xfm("uo=u", 0562).transform(0322, false), 0323);
+ EXPECT_EQ_MODE(xfm("uog-xw", 0153).transform(0550, false), 0440);
+ EXPECT_EQ_MODE(xfm("u-t", 0750).transform(01074, false), 01074);
+ EXPECT_EQ_MODE(xfm("ao-t", 0611).transform(024, false), 024);
+ EXPECT_EQ_MODE(xfm("gu-s=wt", 0167).transform(0102, false), 0222);
+ EXPECT_EQ_MODE(xfm("g+s", 0307).transform(0300, false), 02300);
+ EXPECT_EQ_MODE(xfm("oa+x", 0206).transform(01754, false), 01755);
+ EXPECT_EQ_MODE(xfm("a=w", 0375).transform(0272, false), 0222);
+ EXPECT_EQ_MODE(xfm("a-r", 0354).transform(0355, false), 0311);
+ EXPECT_EQ_MODE(xfm("o=s", 0710).transform(0605, false), 0600);
+ EXPECT_EQ_MODE(xfm("ga+tX", 0242).transform(036, false), 01137);
+ EXPECT_EQ_MODE(xfm("ua-g", 0600).transform(0551, false), 00);
+ EXPECT_EQ_MODE(xfm("ag+s", 0602).transform(0757, false), 06757);
+ EXPECT_EQ_MODE(xfm("a-Xw", 0752).transform(0704, false), 0404);
+ EXPECT_EQ_MODE(xfm("o=g", 0442).transform(0765, false), 0766);
+ EXPECT_EQ_MODE(xfm("gau+w", 0147).transform(0766, false), 0766);
+ EXPECT_EQ_MODE(xfm("ag-wt", 0721).transform(04327, false), 04105);
+ EXPECT_EQ_MODE(xfm("g+Xr", 0276).transform(0571, false), 0571);
+ EXPECT_EQ_MODE(xfm("ug-rwx", 0536).transform(0575, false), 05);
+ EXPECT_EQ_MODE(xfm("ua+rXs", 0727).transform(0737, false), 06777);
+ EXPECT_EQ_MODE(xfm("o=g", 0056).transform(0507, false), 0500);
+ EXPECT_EQ_MODE(xfm("uog+tX", 0403).transform(02615, false), 03715);
+ EXPECT_EQ_MODE(xfm("go-X", 0225).transform(0447, false), 0446);
+ EXPECT_EQ_MODE(xfm("go=u", 0044).transform(0261, false), 0222);
+ EXPECT_EQ_MODE(xfm("ug-r", 0630).transform(04372, false), 04332);
+ EXPECT_EQ_MODE(xfm("012", 0607).transform(0270, false), 012);
+ EXPECT_EQ_MODE(xfm("og-Xwx", 0103).transform(0564, false), 0544);
+ EXPECT_EQ_MODE(xfm("a-rx", 0277).transform(0400, false), 00);
+ EXPECT_EQ_MODE(xfm("ga+wt", 0054).transform(0205, false), 01227);
+ EXPECT_EQ_MODE(xfm("a-wrs", 0544).transform(0135, false), 0111);
+ EXPECT_EQ_MODE(xfm("go-r", 0734).transform(0547, false), 0503);
+ EXPECT_EQ_MODE(xfm("o-X", 0621).transform(043, false), 042);
+ EXPECT_EQ_MODE(xfm("au-X", 0207).transform(0435, false), 0424);
+ EXPECT_EQ_MODE(xfm("oug-x+r=w", 0151).transform(076, false), 0222);
+ EXPECT_EQ_MODE(xfm("gu+xt", 0433).transform(04774, false), 04774);
+ EXPECT_EQ_MODE(xfm("a-ws", 0566).transform(0654, false), 0454);
+ EXPECT_EQ_MODE(xfm("675", 0220).transform(04301, false), 0675);
+ EXPECT_EQ_MODE(xfm("253", 0055).transform(00, false), 0253);
+ EXPECT_EQ_MODE(xfm("-561", 0056).transform(0437, false), 016);
+ EXPECT_EQ_MODE(xfm("561", 0232).transform(01627, false), 0561);
+ EXPECT_EQ_MODE(xfm("guo-u", 0764).transform(0320, false), 00);
+ EXPECT_EQ_MODE(xfm("g+rX", 0504).transform(0714, false), 0754);
+ EXPECT_EQ_MODE(xfm("g=xr", 0545).transform(0677, false), 0657);
+ EXPECT_EQ_MODE(xfm("u+tr", 0031).transform(0671, false), 0671);
+ EXPECT_EQ_MODE(xfm("go+r", 0520).transform(0325, false), 0365);
+ EXPECT_EQ_MODE(xfm("o-trX", 0175).transform(0531, false), 0530);
+ EXPECT_EQ_MODE(xfm("110", 0666).transform(0417, false), 0110);
+ EXPECT_EQ_MODE(xfm("oau=rxX", 0056).transform(0627, false), 0555);
+ EXPECT_EQ_MODE(xfm("u-u", 0516).transform(0230, false), 030);
+ EXPECT_EQ_MODE(xfm("g-xt", 0301).transform(0731, false), 0721);
+ EXPECT_EQ_MODE(xfm("ag+w-X", 0301).transform(0344, false), 0266);
+ EXPECT_EQ_MODE(xfm("ag-s", 0002).transform(0220, false), 0220);
+ EXPECT_EQ_MODE(xfm("au+tr", 0161).transform(0523, false), 01567);
+ EXPECT_EQ_MODE(xfm("uog+u", 0146).transform(0366, false), 0377);
+ EXPECT_EQ_MODE(xfm("a+x=tX", 0672).transform(0367, false), 01111);
+ EXPECT_EQ_MODE(xfm("o=X", 0261).transform(02513, false), 02511);
+ EXPECT_EQ_MODE(xfm("ua-u", 0602).transform(0327, false), 04);
+ EXPECT_EQ_MODE(xfm("o+rt", 0223).transform(0472, false), 01476);
+ EXPECT_EQ_MODE(xfm("u-g", 0373).transform(0404, false), 0404);
+ EXPECT_EQ_MODE(xfm("gu-tXr", 0566).transform(0555, false), 05);
+ EXPECT_EQ_MODE(xfm("ago+r", 0555).transform(0473, false), 0477);
+ EXPECT_EQ_MODE(xfm("ga+x", 0051).transform(02777, false), 02777);
+ EXPECT_EQ_MODE(xfm("ua+rt", 0253).transform(0707, false), 01747);
+ EXPECT_EQ_MODE(xfm("a+sXw", 0366).transform(0113, false), 06333);
+ EXPECT_EQ_MODE(xfm("u=x", 0433).transform(04143, false), 0143);
+ EXPECT_EQ_MODE(xfm("gua-X", 0453).transform(0753, false), 0642);
+ EXPECT_EQ_MODE(xfm("gao+u", 0652).transform(0652, false), 0676);
+ EXPECT_EQ_MODE(xfm("uao=g", 0504).transform(0227, false), 0222);
+ EXPECT_EQ_MODE(xfm("aog+X-x", 0355).transform(02, false), 02);
+ EXPECT_EQ_MODE(xfm("ug-g", 0624).transform(02251, false), 02201);
+ EXPECT_EQ_MODE(xfm("au=w-xts", 0650).transform(0242, false), 0222);
+ EXPECT_EQ_MODE(xfm("ao=r", 0742).transform(0301, false), 0444);
+ EXPECT_EQ_MODE(xfm("uo=Xx", 0453).transform(0342, false), 0141);
+ EXPECT_EQ_MODE(xfm("g-wt", 0325).transform(01716, false), 01716);
+ EXPECT_EQ_MODE(xfm("u-o", 0540).transform(022, false), 022);
+ EXPECT_EQ_MODE(xfm("ua-tx", 0551).transform(0624, false), 0624);
+ EXPECT_EQ_MODE(xfm("guo+tx", 0110).transform(0445, false), 01555);
+ EXPECT_EQ_MODE(xfm("ua=tX", 0312).transform(0554, false), 01111);
+ EXPECT_EQ_MODE(xfm("ou-Xr", 0054).transform(0400, false), 00);
+ EXPECT_EQ_MODE(xfm("g+xt", 0377).transform(04362, false), 04372);
+ EXPECT_EQ_MODE(xfm("au=g", 0500).transform(0740, false), 0444);
+ EXPECT_EQ_MODE(xfm("124", 0361).transform(0657, false), 0124);
+ EXPECT_EQ_MODE(xfm("og-sX", 0421).transform(0166, false), 0166);
+ EXPECT_EQ_MODE(xfm("aog-tw", 0715).transform(0245, false), 045);
+ EXPECT_EQ_MODE(xfm("a+wrt", 0562).transform(01275, false), 01677);
+ EXPECT_EQ_MODE(xfm("o-g", 0763).transform(0577, false), 0570);
+ EXPECT_EQ_MODE(xfm("ua-rts", 0356).transform(0516, false), 0112);
+ EXPECT_EQ_MODE(xfm("o-t", 0440).transform(0136, false), 0136);
+ EXPECT_EQ_MODE(xfm("g=xr", 0030).transform(044, false), 054);
+ EXPECT_EQ_MODE(xfm("uo=xtr", 0401).transform(066, false), 01565);
+ EXPECT_EQ_MODE(xfm("go-w", 0111).transform(0631, false), 0611);
+ EXPECT_EQ_MODE(xfm("g=u", 0547).transform(0602, false), 0662);
+ EXPECT_EQ_MODE(xfm("o-s", 0145).transform(0312, false), 0312);
+ EXPECT_EQ_MODE(xfm("g-u", 0164).transform(02535, false), 02525);
+ EXPECT_EQ_MODE(xfm("gou+g", 0612).transform(00, false), 00);
+ EXPECT_EQ_MODE(xfm("gu+st", 0622).transform(033, false), 06033);
+ EXPECT_EQ_MODE(xfm("oa-ts", 0566).transform(0427, false), 0427);
+ EXPECT_EQ_MODE(xfm("074", 0701).transform(0766, false), 074);
+ EXPECT_EQ_MODE(xfm("ago-X", 0326).transform(0707, false), 0606);
+ EXPECT_EQ_MODE(xfm("go+r", 0534).transform(060, false), 064);
+ EXPECT_EQ_MODE(xfm("ga=rtx", 0260).transform(0627, false), 01555);
+ EXPECT_EQ_MODE(xfm("uo+Xr", 0541).transform(0224, false), 0624);
+ EXPECT_EQ_MODE(xfm("g=xt", 0056).transform(0410, false), 0410);
+ EXPECT_EQ_MODE(xfm("uo-o", 0257).transform(0114, false), 0110);
+ EXPECT_EQ_MODE(xfm("ao+Xw", 0750).transform(0715, false), 0737);
+ EXPECT_EQ_MODE(xfm("ag-wxX", 0166).transform(0761, false), 0440);
+ EXPECT_EQ_MODE(xfm("a=o", 0004).transform(0447, false), 0777);
+ EXPECT_EQ_MODE(xfm("og-x=wt", 0447).transform(0660, false), 01622);
+ EXPECT_EQ_MODE(xfm("gu+u", 0563).transform(0743, false), 0773);
+ EXPECT_EQ_MODE(xfm("ag+t", 0214).transform(0714, false), 01714);
+ EXPECT_EQ_MODE(xfm("ag=X", 0717).transform(0471, false), 0111);
+ EXPECT_EQ_MODE(xfm("g-X", 0757).transform(04415, false), 04405);
+ EXPECT_EQ_MODE(xfm("oag=o", 0330).transform(0543, false), 0333);
+ EXPECT_EQ_MODE(xfm("a=r", 0215).transform(0222, false), 0444);
+ EXPECT_EQ_MODE(xfm("ou=wxr", 0033).transform(0170, false), 0777);
+ EXPECT_EQ_MODE(xfm("ag-u", 0726).transform(00, false), 00);
+ EXPECT_EQ_MODE(xfm("u=xrt", 0366).transform(040, false), 0540);
+ EXPECT_EQ_MODE(xfm("275", 0722).transform(033, false), 0275);
+ EXPECT_EQ_MODE(xfm("uo-xw", 0151).transform(0327, false), 024);
+ EXPECT_EQ_MODE(xfm("go+r", 0511).transform(061, false), 065);
+ EXPECT_EQ_MODE(xfm("411", 0226).transform(0445, false), 0411);
+ EXPECT_EQ_MODE(xfm("auo-rw", 0600).transform(0353, false), 0111);
+ EXPECT_EQ_MODE(xfm("aug+X", 0675).transform(01635, false), 01735);
+ EXPECT_EQ_MODE(xfm("aug-tx", 0700).transform(0723, false), 0622);
+ EXPECT_EQ_MODE(xfm("go=s", 0126).transform(0366, false), 02300);
+ EXPECT_EQ_MODE(xfm("a=s-txX", 0411).transform(0764, false), 06000);
+ EXPECT_EQ_MODE(xfm("go=tsr", 0465).transform(0160, false), 03144);
+ EXPECT_EQ_MODE(xfm("ao=srx", 0755).transform(0465, false), 06555);
+ EXPECT_EQ_MODE(xfm("a=xtr", 0150).transform(0713, false), 01555);
+ EXPECT_EQ_MODE(xfm("u=X", 0232).transform(0230, false), 0130);
+ EXPECT_EQ_MODE(xfm("o=wx", 0455).transform(04131, false), 04133);
+ EXPECT_EQ_MODE(xfm("ou=rx", 0775).transform(00, false), 0505);
+ EXPECT_EQ_MODE(xfm("751", 0600).transform(0177, false), 0751);
+ EXPECT_EQ_MODE(xfm("ua-w", 0566).transform(0406, false), 0404);
+ EXPECT_EQ_MODE(xfm("oa-g", 0664).transform(0203, false), 0203);
+ EXPECT_EQ_MODE(xfm("og+wx", 0310).transform(0761, false), 0773);
+ EXPECT_EQ_MODE(xfm("a=xs", 0111).transform(0663, false), 06111);
+ EXPECT_EQ_MODE(xfm("g=Xx", 0522).transform(0210, false), 0210);
+ EXPECT_EQ_MODE(xfm("2336", 0436).transform(0100, false), 02336);
+ EXPECT_EQ_MODE(xfm("go+sw", 0357).transform(0207, false), 02227);
+ EXPECT_EQ_MODE(xfm("gu-g", 0736).transform(0726, false), 0506);
+ EXPECT_EQ_MODE(xfm("gu+sX", 0106).transform(0777, false), 06777);
+ EXPECT_EQ_MODE(xfm("og=rt", 0076).transform(0555, false), 01544);
+ EXPECT_EQ_MODE(xfm("ga-t=wX", 0143).transform(0411, false), 0333);
+ EXPECT_EQ_MODE(xfm("ua=o", 0505).transform(0502, false), 0222);
+ EXPECT_EQ_MODE(xfm("o-w", 0150).transform(06, false), 04);
+ EXPECT_EQ_MODE(xfm("goa+X-x", 0675).transform(0525, false), 0424);
+ EXPECT_EQ_MODE(xfm("u+Xs", 0377).transform(0616, false), 04716);
+ EXPECT_EQ_MODE(xfm("oa-t", 0631).transform(071, false), 071);
+ EXPECT_EQ_MODE(xfm("ag+u", 0546).transform(0141, false), 0151);
+ EXPECT_EQ_MODE(xfm("a+wt", 0117).transform(0144, false), 01366);
+ EXPECT_EQ_MODE(xfm("u+rXx", 0767).transform(0277, false), 0777);
+ EXPECT_EQ_MODE(xfm("uag=ts", 0356).transform(026, false), 07000);
+ EXPECT_EQ_MODE(xfm("ao=wr", 0762).transform(04, false), 0666);
+ EXPECT_EQ_MODE(xfm("au+xs", 0600).transform(0651, false), 06751);
+ EXPECT_EQ_MODE(xfm("ga+st", 0731).transform(0220, false), 07220);
+ EXPECT_EQ_MODE(xfm("ug-u", 0161).transform(0174, false), 064);
+ EXPECT_EQ_MODE(xfm("o=o", 0615).transform(02322, false), 02322);
+ EXPECT_EQ_MODE(xfm("ug=ws", 0603).transform(0203, false), 06223);
+ EXPECT_EQ_MODE(xfm("u=w", 0702).transform(04613, false), 0213);
+ EXPECT_EQ_MODE(xfm("o=r", 0301).transform(0617, false), 0614);
+ EXPECT_EQ_MODE(xfm("o-r+trw", 0111).transform(0676, false), 01676);
+ EXPECT_EQ_MODE(xfm("ga=g", 0605).transform(022, false), 0222);
+ EXPECT_EQ_MODE(xfm("u=xr", 0332).transform(0227, false), 0527);
+ EXPECT_EQ_MODE(xfm("oa=tXw", 0326).transform(0743, false), 01333);
+ EXPECT_EQ_MODE(xfm("u+X=Xx", 0743).transform(04022, false), 0122);
+ EXPECT_EQ_MODE(xfm("og-g", 0463).transform(0155, false), 0100);
+ EXPECT_EQ_MODE(xfm("o-x=rx", 0255).transform(0373, false), 0375);
+ EXPECT_EQ_MODE(xfm("g=o", 0612).transform(0673, false), 0633);
+ EXPECT_EQ_MODE(xfm("o=wx", 0574).transform(0125, false), 0123);
+ EXPECT_EQ_MODE(xfm("ou+g", 0105).transform(0534, false), 0737);
+ EXPECT_EQ_MODE(xfm("312", 0453).transform(0642, false), 0312);
+ EXPECT_EQ_MODE(xfm("ag-g", 0312).transform(04233, false), 04000);
+ EXPECT_EQ_MODE(xfm("451", 0764).transform(0102, false), 0451);
+ EXPECT_EQ_MODE(xfm("g-Xxr", 0522).transform(015, false), 05);
+ EXPECT_EQ_MODE(xfm("a=st", 0316).transform(0206, false), 07000);
+ EXPECT_EQ_MODE(xfm("o-x=X", 0161).transform(04124, false), 04121);
+ EXPECT_EQ_MODE(xfm("au-X", 0525).transform(0730, false), 0620);
+ EXPECT_EQ_MODE(xfm("uo+ws", 0323).transform(036, false), 04236);
+ EXPECT_EQ_MODE(xfm("ua-X", 0650).transform(01075, false), 01064);
+ EXPECT_EQ_MODE(xfm("au-sr", 0376).transform(0716, false), 0312);
+ EXPECT_EQ_MODE(xfm("go-w+x", 0415).transform(0626, false), 0615);
+ EXPECT_EQ_MODE(xfm("g+w=s-sw", 0160).transform(0512, false), 0502);
+ EXPECT_EQ_MODE(xfm("oa+r", 0051).transform(02252, false), 02656);
+ EXPECT_EQ_MODE(xfm("306", 0412).transform(0204, false), 0306);
+ EXPECT_EQ_MODE(xfm("u+r", 0745).transform(0321, false), 0721);
+ EXPECT_EQ_MODE(xfm("o=x", 0765).transform(0643, false), 0641);
+ EXPECT_EQ_MODE(xfm("g-x", 0272).transform(011, false), 01);
+ EXPECT_EQ_MODE(xfm("ua+s", 0606).transform(0753, false), 06753);
+ EXPECT_EQ_MODE(xfm("aou=tx", 0624).transform(01013, false), 01111);
+ EXPECT_EQ_MODE(xfm("o=Xw", 0004).transform(0525, false), 0523);
+ EXPECT_EQ_MODE(xfm("ao=tw", 0130).transform(0404, false), 01222);
+ EXPECT_EQ_MODE(xfm("o=r-x", 0554).transform(01577, false), 0574);
+ EXPECT_EQ_MODE(xfm("o+t", 0226).transform(0751, false), 01751);
+ EXPECT_EQ_MODE(xfm("a=sr", 0122).transform(04601, false), 06444);
+ EXPECT_EQ_MODE(xfm("ao=xs", 0765).transform(04331, false), 06111);
+ EXPECT_EQ_MODE(xfm("gu=sw", 0517).transform(0767, false), 06227);
+ EXPECT_EQ_MODE(xfm("u-r", 0042).transform(0225, false), 0225);
+ EXPECT_EQ_MODE(xfm("ao=txX", 0501).transform(04651, false), 01111);
+ EXPECT_EQ_MODE(xfm("ao+w", 0044).transform(076, false), 0276);
+ EXPECT_EQ_MODE(xfm("u-r", 0535).transform(01772, false), 01372);
+ EXPECT_EQ_MODE(xfm("g=sXw", 0747).transform(020, false), 02020);
+ EXPECT_EQ_MODE(xfm("ou-r", 0673).transform(01010, false), 01010);
+ EXPECT_EQ_MODE(xfm("au+w", 0126).transform(0163, false), 0363);
+ EXPECT_EQ_MODE(xfm("uo=u", 0524).transform(0416, false), 0414);
+ EXPECT_EQ_MODE(xfm("og=X", 0555).transform(02, false), 00);
+ EXPECT_EQ_MODE(xfm("oga-sX", 0523).transform(0574, false), 0464);
+ EXPECT_EQ_MODE(xfm("ua=o", 0704).transform(0243, false), 0333);
+ EXPECT_EQ_MODE(xfm("ga=xts", 0060).transform(0676, false), 07111);
+ EXPECT_EQ_MODE(xfm("gua=g", 0457).transform(00, false), 00);
+ EXPECT_EQ_MODE(xfm("ugo+w", 0201).transform(0260, false), 0262);
+ EXPECT_EQ_MODE(xfm("gou=s", 0466).transform(0730, false), 06000);
+ EXPECT_EQ_MODE(xfm("uoa+t", 0165).transform(02, false), 01002);
+ EXPECT_EQ_MODE(xfm("a-o", 0776).transform(00, false), 00);
+ EXPECT_EQ_MODE(xfm("g=o", 0351).transform(0721, false), 0711);
+ EXPECT_EQ_MODE(xfm("o+tw", 0422).transform(0436, false), 01436);
+ EXPECT_EQ_MODE(xfm("uao-xs", 0515).transform(0563, false), 0462);
+ EXPECT_EQ_MODE(xfm("a-u", 0602).transform(0243, false), 041);
+ EXPECT_EQ_MODE(xfm("ug-xs", 0316).transform(0471, false), 0461);
+ EXPECT_EQ_MODE(xfm("go=u", 0612).transform(0455, false), 0444);
+ EXPECT_EQ_MODE(xfm("g+rsw", 0120).transform(0122, false), 02162);
+ EXPECT_EQ_MODE(xfm("aog+Xw", 0760).transform(04555, false), 04777);
+ EXPECT_EQ_MODE(xfm("o=Xt", 0623).transform(01461, false), 01461);
+ EXPECT_EQ_MODE(xfm("g+t", 0443).transform(0660, false), 0660);
+ EXPECT_EQ_MODE(xfm("ao=Xx", 0232).transform(0677, false), 0111);
+ EXPECT_EQ_MODE(xfm("ua-o", 0433).transform(0304, false), 0300);
+ EXPECT_EQ_MODE(xfm("au+s-w", 0106).transform(01143, false), 07141);
+ EXPECT_EQ_MODE(xfm("uga+Xsr", 0221).transform(0677, false), 06777);
+ EXPECT_EQ_MODE(xfm("gu-X", 0510).transform(0306, false), 0206);
+ EXPECT_EQ_MODE(xfm("041", 0277).transform(0120, false), 041);
+ EXPECT_EQ_MODE(xfm("go-o", 0431).transform(070, false), 070);
+ EXPECT_EQ_MODE(xfm("a-r=x", 0213).transform(0121, false), 0111);
+ EXPECT_EQ_MODE(xfm("au-txr", 0654).transform(0556, false), 02);
+ EXPECT_EQ_MODE(xfm("ag=w", 0126).transform(0754, false), 0222);
+ EXPECT_EQ_MODE(xfm("u=wX", 0635).transform(0450, false), 0350);
+ EXPECT_EQ_MODE(xfm("u+o", 0454).transform(01064, false), 01464);
+ EXPECT_EQ_MODE(xfm("g-rs", 0562).transform(0634, false), 0634);
+ EXPECT_EQ_MODE(xfm("g-u", 0361).transform(04574, false), 04524);
+ EXPECT_EQ_MODE(xfm("g-o", 0355).transform(0423, false), 0403);
+ EXPECT_EQ_MODE(xfm("-327", 0474).transform(0300, false), 00);
+ EXPECT_EQ_MODE(xfm("ou=Xx", 0413).transform(0665, false), 0161);
+ EXPECT_EQ_MODE(xfm("ag-x", 0514).transform(0574, false), 0464);
+ EXPECT_EQ_MODE(xfm("gao-rt", 0125).transform(0105, false), 0101);
+ EXPECT_EQ_MODE(xfm("a=u", 0351).transform(0567, false), 0555);
+ EXPECT_EQ_MODE(xfm("o-t=tX", 0315).transform(0563, false), 01561);
+ EXPECT_EQ_MODE(xfm("u-srw", 0242).transform(0265, false), 065);
+ EXPECT_EQ_MODE(xfm("a+t", 0525).transform(0156, false), 01156);
+ EXPECT_EQ_MODE(xfm("og=st", 0636).transform(0121, false), 03100);
+ EXPECT_EQ_MODE(xfm("a+x", 0544).transform(0103, false), 0113);
+ EXPECT_EQ_MODE(xfm("210", 0036).transform(0542, false), 0210);
+ EXPECT_EQ_MODE(xfm("uo-tr", 0226).transform(0426, false), 022);
+ EXPECT_EQ_MODE(xfm("ao=s", 0667).transform(0504, false), 06000);
+ EXPECT_EQ_MODE(xfm("o+x=r", 0477).transform(0435, false), 0434);
+ EXPECT_EQ_MODE(xfm("572", 0376).transform(02436, false), 0572);
+ EXPECT_EQ_MODE(xfm("ago-xw", 0312).transform(036, false), 04);
+ EXPECT_EQ_MODE(xfm("350", 0667).transform(0543, false), 0350);
+ EXPECT_EQ_MODE(xfm("464", 0674).transform(0122, false), 0464);
+ EXPECT_EQ_MODE(xfm("uo=tX", 0111).transform(0314, false), 01111);
+ EXPECT_EQ_MODE(xfm("oa-g", 0160).transform(0520, false), 0500);
+ EXPECT_EQ_MODE(xfm("a+o", 0162).transform(0753, false), 0773);
+ EXPECT_EQ_MODE(xfm("ou=twX", 0034).transform(0223, false), 01323);
+ EXPECT_EQ_MODE(xfm("g+rx", 0213).transform(041, false), 051);
+ EXPECT_EQ_MODE(xfm("g+Xws", 0103).transform(0245, false), 02275);
+ EXPECT_EQ_MODE(xfm("567", 0065).transform(0732, false), 0567);
+ EXPECT_EQ_MODE(xfm("ug+rw", 0376).transform(0242, false), 0662);
+ EXPECT_EQ_MODE(xfm("a-w=w", 0151).transform(045, false), 0222);
+ EXPECT_EQ_MODE(xfm("au=rX", 0176).transform(0724, false), 0555);
+ EXPECT_EQ_MODE(xfm("200", 0032).transform(0100, false), 0200);
+ EXPECT_EQ_MODE(xfm("g-Xt", 0771).transform(0264, false), 0264);
+ EXPECT_EQ_MODE(xfm("ou+X=tx", 0127).transform(0272, false), 01171);
+ EXPECT_EQ_MODE(xfm("ua+Xxr", 0430).transform(0676, false), 0777);
+ EXPECT_EQ_MODE(xfm("oa=wx", 0324).transform(0473, false), 0333);
+ EXPECT_EQ_MODE(xfm("g+u", 0271).transform(0534, false), 0574);
+ EXPECT_EQ_MODE(xfm("g=x", 0113).transform(0330, false), 0310);
+ EXPECT_EQ_MODE(xfm("go+sx", 0254).transform(0123, false), 02133);
+ EXPECT_EQ_MODE(xfm("gua=X", 0153).transform(0635, false), 0111);
+ EXPECT_EQ_MODE(xfm("=112", 0220).transform(0254, false), 0112);
+ EXPECT_EQ_MODE(xfm("u=o", 0215).transform(072, false), 0272);
+ EXPECT_EQ_MODE(xfm("g+s", 0517).transform(0344, false), 02344);
+ EXPECT_EQ_MODE(xfm("uo-g", 0270).transform(0207, false), 0207);
+ EXPECT_EQ_MODE(xfm("o=u", 0350).transform(0767, false), 0767);
+ EXPECT_EQ_MODE(xfm("a=Xx", 0557).transform(0702, false), 0111);
+ EXPECT_EQ_MODE(xfm("g-tr", 0412).transform(0152, false), 0112);
+ EXPECT_EQ_MODE(xfm("uo+w", 0065).transform(077, false), 0277);
+ EXPECT_EQ_MODE(xfm("ug+s", 0036).transform(0642, false), 06642);
+ EXPECT_EQ_MODE(xfm("ag+x", 0314).transform(01, false), 0111);
+ EXPECT_EQ_MODE(xfm("au-rts", 0143).transform(0404, false), 00);
+ EXPECT_EQ_MODE(xfm("ou=g", 0347).transform(0307, false), 00);
+ EXPECT_EQ_MODE(xfm("g-t", 0077).transform(046, false), 046);
+ EXPECT_EQ_MODE(xfm("go=o", 0705).transform(04303, false), 04333);
+ EXPECT_EQ_MODE(xfm("og=xr", 0705).transform(04350, false), 04355);
+ EXPECT_EQ_MODE(xfm("u=g", 0654).transform(04446, false), 0446);
+ EXPECT_EQ_MODE(xfm("011", 0724).transform(0546, false), 011);
+ EXPECT_EQ_MODE(xfm("gou-sX", 0630).transform(0746, false), 0646);
+ EXPECT_EQ_MODE(xfm("au+Xx", 0135).transform(0266, false), 0377);
+ EXPECT_EQ_MODE(xfm("g-r", 0243).transform(0207, false), 0207);
+ EXPECT_EQ_MODE(xfm("ug=rx", 0022).transform(0217, false), 0557);
+ EXPECT_EQ_MODE(xfm("gou-xt", 0377).transform(0154, false), 044);
+ EXPECT_EQ_MODE(xfm("auo+o", 0115).transform(04307, false), 04777);
+ EXPECT_EQ_MODE(xfm("g+rs", 0107).transform(0357, false), 02357);
+ EXPECT_EQ_MODE(xfm("o=Xt", 0370).transform(0622, false), 01620);
+ EXPECT_EQ_MODE(xfm("u-rs", 0210).transform(042, false), 042);
+ EXPECT_EQ_MODE(xfm("u-X", 0346).transform(033, false), 033);
+ EXPECT_EQ_MODE(xfm("uo-t", 0051).transform(0544, false), 0544);
+ EXPECT_EQ_MODE(xfm("477", 0130).transform(0525, false), 0477);
+ EXPECT_EQ_MODE(xfm("o+xw", 0121).transform(0151, false), 0153);
+ EXPECT_EQ_MODE(xfm("g-tX", 0624).transform(0756, false), 0746);
+ EXPECT_EQ_MODE(xfm("ug+o", 0463).transform(0204, false), 0644);
+ EXPECT_EQ_MODE(xfm("4356", 0722).transform(0502, false), 04356);
+ EXPECT_EQ_MODE(xfm("453", 0771).transform(02, false), 0453);
+ EXPECT_EQ_MODE(xfm("a+r", 0531).transform(0554, false), 0554);
+ EXPECT_EQ_MODE(xfm("447", 0324).transform(0770, false), 0447);
+ EXPECT_EQ_MODE(xfm("aou-tx", 0667).transform(0140, false), 040);
+ EXPECT_EQ_MODE(xfm("u-rx", 0222).transform(0555, false), 055);
+ EXPECT_EQ_MODE(xfm("o=tx", 0777).transform(02462, false), 03461);
+ EXPECT_EQ_MODE(xfm("a=x", 0177).transform(0673, false), 0111);
+ EXPECT_EQ_MODE(xfm("u+Xwx", 0570).transform(0430, false), 0730);
+ EXPECT_EQ_MODE(xfm("o-ts", 0761).transform(017, false), 017);
+ EXPECT_EQ_MODE(xfm("ug+rw", 0322).transform(01612, false), 01672);
+ EXPECT_EQ_MODE(xfm("u+xt", 0150).transform(050, false), 0150);
+ EXPECT_EQ_MODE(xfm("u=o", 0700).transform(0644, false), 0444);
+ EXPECT_EQ_MODE(xfm("ga+o", 0750).transform(01311, false), 01311);
+ EXPECT_EQ_MODE(xfm("go=ts", 0353).transform(0313, false), 03300);
+ EXPECT_EQ_MODE(xfm("ao-wr", 0233).transform(0331, false), 0111);
+ EXPECT_EQ_MODE(xfm("u+ws", 0601).transform(0433, false), 04633);
+ EXPECT_EQ_MODE(xfm("g+wx", 0526).transform(04647, false), 04677);
+ EXPECT_EQ_MODE(xfm("523", 0751).transform(02176, false), 0523);
+ EXPECT_EQ_MODE(xfm("au-Xx", 0211).transform(0474, false), 0464);
+ EXPECT_EQ_MODE(xfm("a+ts", 0046).transform(01257, false), 07257);
+ EXPECT_EQ_MODE(xfm("a-wt", 0545).transform(04134, false), 04114);
+ EXPECT_EQ_MODE(xfm("au=st", 0233).transform(02510, false), 07000);
+ EXPECT_EQ_MODE(xfm("ua+rX", 0475).transform(0200, false), 0644);
+ EXPECT_EQ_MODE(xfm("uag=tr", 0415).transform(0725, false), 01444);
+ EXPECT_EQ_MODE(xfm("o+rx", 0352).transform(00, false), 05);
+ EXPECT_EQ_MODE(xfm("o+X=tX", 0332).transform(0554, false), 01551);
+ EXPECT_EQ_MODE(xfm("g+X", 0157).transform(072, false), 072);
+ EXPECT_EQ_MODE(xfm("ao-w", 0763).transform(0226, false), 04);
+ EXPECT_EQ_MODE(xfm("au-rx", 0263).transform(0255, false), 0200);
+ EXPECT_EQ_MODE(xfm("635", 0723).transform(0556, false), 0635);
+ EXPECT_EQ_MODE(xfm("ag=tw", 0756).transform(0565, false), 01222);
+ EXPECT_EQ_MODE(xfm("au+ws", 0207).transform(0234, false), 06236);
+ EXPECT_EQ_MODE(xfm("a=tX", 0215).transform(02264, false), 01000);
+ EXPECT_EQ_MODE(xfm("u+g", 0514).transform(0671, false), 0771);
+ EXPECT_EQ_MODE(xfm("-017", 0344).transform(03, false), 00);
+ EXPECT_EQ_MODE(xfm("uo=tr", 0217).transform(0117, false), 01414);
+ EXPECT_EQ_MODE(xfm("au-r", 0136).transform(0725, false), 0321);
+ EXPECT_EQ_MODE(xfm("oa+w", 0720).transform(0165, false), 0367);
+ EXPECT_EQ_MODE(xfm("g-u", 0237).transform(0660, false), 0600);
+ EXPECT_EQ_MODE(xfm("oa-u", 0216).transform(0635, false), 011);
+ EXPECT_EQ_MODE(xfm("ga-tr", 0266).transform(0334, false), 0330);
+ EXPECT_EQ_MODE(xfm("g=wxs", 0357).transform(0542, false), 02532);
+ EXPECT_EQ_MODE(xfm("u=r", 0665).transform(0565, false), 0465);
+ EXPECT_EQ_MODE(xfm("gu+rw", 0647).transform(0376, false), 0776);
+ EXPECT_EQ_MODE(xfm("goa=t", 0071).transform(0632, false), 01000);
+ EXPECT_EQ_MODE(xfm("u=o", 0406).transform(0653, false), 0353);
+ EXPECT_EQ_MODE(xfm("oa=u", 0112).transform(0775, false), 0777);
+ EXPECT_EQ_MODE(xfm("uag+xX", 0054).transform(0620, false), 0731);
+ EXPECT_EQ_MODE(xfm("o-u", 0114).transform(0661, false), 0661);
+ EXPECT_EQ_MODE(xfm("gu-o", 0677).transform(0665, false), 0225);
+ EXPECT_EQ_MODE(xfm("u=o", 0606).transform(0475, false), 0575);
+ EXPECT_EQ_MODE(xfm("a-X", 0676).transform(01031, false), 01020);
+ EXPECT_EQ_MODE(xfm("g-Xr", 0352).transform(0777, false), 0727);
+ EXPECT_EQ_MODE(xfm("og+s", 0653).transform(0601, false), 02601);
+ EXPECT_EQ_MODE(xfm("gu+sr", 0051).transform(01156, false), 07556);
+ EXPECT_EQ_MODE(xfm("uga+xwt", 0600).transform(034, false), 01337);
+ EXPECT_EQ_MODE(xfm("026", 0114).transform(0457, false), 026);
+ EXPECT_EQ_MODE(xfm("u-wx", 0420).transform(0206, false), 06);
+ EXPECT_EQ_MODE(xfm("ag=s", 0465).transform(0704, false), 06000);
+ EXPECT_EQ_MODE(xfm("u=r", 0625).transform(0275, false), 0475);
+ EXPECT_EQ_MODE(xfm("gu=tX", 0216).transform(0721, false), 0111);
+ EXPECT_EQ_MODE(xfm("+276", 0574).transform(0621, false), 0677);
+ EXPECT_EQ_MODE(xfm("u-u", 0527).transform(0727, false), 027);
+ EXPECT_EQ_MODE(xfm("o-o", 0037).transform(0664, false), 0660);
+ EXPECT_EQ_MODE(xfm("uo=u", 0017).transform(04162, false), 0161);
+ EXPECT_EQ_MODE(xfm("ua-g", 0641).transform(0557, false), 02);
+ EXPECT_EQ_MODE(xfm("4345", 0003).transform(0177, false), 04345);
+ EXPECT_EQ_MODE(xfm("234", 0402).transform(0712, false), 0234);
+ EXPECT_EQ_MODE(xfm("ao-g", 0274).transform(0161, false), 0101);
+ EXPECT_EQ_MODE(xfm("gu=stX", 0622).transform(044, false), 06004);
+ EXPECT_EQ_MODE(xfm("ug=xs", 0636).transform(01076, false), 07116);
+ EXPECT_EQ_MODE(xfm("go+u", 0026).transform(0626, false), 0666);
+ EXPECT_EQ_MODE(xfm("g+s-s", 0477).transform(0540, false), 0540);
+ EXPECT_EQ_MODE(xfm("g+s", 0150).transform(0415, false), 02415);
+ EXPECT_EQ_MODE(xfm("ga-rX", 0121).transform(0207, false), 0202);
+ EXPECT_EQ_MODE(xfm("g+rt", 0241).transform(0146, false), 0146);
+ EXPECT_EQ_MODE(xfm("a+r", 0675).transform(016, false), 0456);
+ EXPECT_EQ_MODE(xfm("a+u", 0223).transform(0716, false), 0777);
+ EXPECT_EQ_MODE(xfm("a=w", 0263).transform(0634, false), 0222);
+ EXPECT_EQ_MODE(xfm("gau-o", 0237).transform(063, false), 040);
+ EXPECT_EQ_MODE(xfm("gu=sw", 0132).transform(06, false), 06226);
+ EXPECT_EQ_MODE(xfm("oa+r", 0127).transform(0621, false), 0665);
+ EXPECT_EQ_MODE(xfm("aou=ts", 0131).transform(0625, false), 07000);
+ EXPECT_EQ_MODE(xfm("u+rsx", 0143).transform(034, false), 04534);
+ EXPECT_EQ_MODE(xfm("4301", 0755).transform(01175, false), 04301);
+ EXPECT_EQ_MODE(xfm("go+wX", 0177).transform(04121, false), 04133);
+ EXPECT_EQ_MODE(xfm("au-u", 0133).transform(0711, false), 00);
+ EXPECT_EQ_MODE(xfm("ug-g", 0171).transform(0325, false), 0105);
+ EXPECT_EQ_MODE(xfm("o-g", 0700).transform(02425, false), 02425);
+ EXPECT_EQ_MODE(xfm("a+u", 0402).transform(0365, false), 0377);
+ EXPECT_EQ_MODE(xfm("ug=xw", 0215).transform(0576, false), 0336);
+ EXPECT_EQ_MODE(xfm("g+s", 0656).transform(0201, false), 02201);
+ EXPECT_EQ_MODE(xfm("u+o", 0777).transform(0560, false), 0560);
+ EXPECT_EQ_MODE(xfm("502", 0516).transform(0440, false), 0502);
+ EXPECT_EQ_MODE(xfm("a=xX", 0577).transform(0637, false), 0111);
+ EXPECT_EQ_MODE(xfm("o=rsX", 0701).transform(01677, false), 0675);
+ EXPECT_EQ_MODE(xfm("go+xX", 0772).transform(0361, false), 0371);
+ EXPECT_EQ_MODE(xfm("a=ws", 0166).transform(0637, false), 06222);
+ EXPECT_EQ_MODE(xfm("534", 0070).transform(0602, false), 0534);
+ EXPECT_EQ_MODE(xfm("uao-X", 0103).transform(04702, false), 04602);
+ EXPECT_EQ_MODE(xfm("a-Xx", 0072).transform(04226, false), 04226);
+ EXPECT_EQ_MODE(xfm("a=Xws", 0612).transform(025, false), 06333);
+ EXPECT_EQ_MODE(xfm("ag+ts", 0525).transform(0122, false), 07122);
+ EXPECT_EQ_MODE(xfm("gou-x+tr", 0327).transform(0106, false), 01446);
+ EXPECT_EQ_MODE(xfm("a-rw", 0237).transform(04443, false), 04001);
+ EXPECT_EQ_MODE(xfm("uo-wsx", 0014).transform(0605, false), 0404);
+ EXPECT_EQ_MODE(xfm("ou=xwt", 0131).transform(0213, false), 01313);
+ EXPECT_EQ_MODE(xfm("ogu+w", 0237).transform(04144, false), 04366);
+ EXPECT_EQ_MODE(xfm("ag-xsX", 0751).transform(0335, false), 0224);
+ EXPECT_EQ_MODE(xfm("a=Xt", 0535).transform(0676, false), 01111);
+ EXPECT_EQ_MODE(xfm("au=tr", 0624).transform(0262, false), 01444);
+ EXPECT_EQ_MODE(xfm("u-srt", 0027).transform(0702, false), 0302);
+ EXPECT_EQ_MODE(xfm("uo-X", 0306).transform(0471, false), 0470);
+ EXPECT_EQ_MODE(xfm("ag+wx", 0546).transform(0343, false), 0373);
+ EXPECT_EQ_MODE(xfm("107", 0343).transform(0733, false), 0107);
+ EXPECT_EQ_MODE(xfm("oa-trX", 0546).transform(0713, false), 0202);
+ EXPECT_EQ_MODE(xfm("o-g", 0543).transform(0624, false), 0624);
+ EXPECT_EQ_MODE(xfm("g-wsx", 0231).transform(0534, false), 0504);
+ EXPECT_EQ_MODE(xfm("232", 0163).transform(0232, false), 0232);
+ EXPECT_EQ_MODE(xfm("agu-t", 0135).transform(02622, false), 02622);
+ EXPECT_EQ_MODE(xfm("a+rst", 0517).transform(0672, false), 07676);
+ EXPECT_EQ_MODE(xfm("o+u", 0606).transform(0601, false), 0607);
+ EXPECT_EQ_MODE(xfm("aug+u", 0127).transform(073, false), 073);
+ EXPECT_EQ_MODE(xfm("gu-t", 0432).transform(0306, false), 0306);
+ EXPECT_EQ_MODE(xfm("gu+x=twX", 0440).transform(0643, false), 0333);
+ EXPECT_EQ_MODE(xfm("og+sr", 0536).transform(00, false), 02044);
+ EXPECT_EQ_MODE(xfm("g=t+rx", 0262).transform(0741, false), 0751);
+ EXPECT_EQ_MODE(xfm("oa=ws", 0702).transform(0425, false), 06222);
+ EXPECT_EQ_MODE(xfm("0470", 0721).transform(0157, false), 0470);
+ EXPECT_EQ_MODE(xfm("u=xr", 0021).transform(0353, false), 0553);
+ EXPECT_EQ_MODE(xfm("oa=g", 0554).transform(01627, false), 0222);
+ EXPECT_EQ_MODE(xfm("gu+o", 0044).transform(0723, false), 0733);
+ EXPECT_EQ_MODE(xfm("o-g", 0367).transform(04371, false), 04370);
+ EXPECT_EQ_MODE(xfm("ua+t", 0034).transform(02231, false), 03231);
+ EXPECT_EQ_MODE(xfm("a=xst", 0070).transform(0606, false), 07111);
+ EXPECT_EQ_MODE(xfm("ag-sxr", 0755).transform(0341, false), 0200);
+ EXPECT_EQ_MODE(xfm("u+xts", 0120).transform(01606, false), 05706);
+ EXPECT_EQ_MODE(xfm("o=w", 0000).transform(0211, false), 0212);
+ EXPECT_EQ_MODE(xfm("og=tXx", 0347).transform(0173, false), 01111);
+ EXPECT_EQ_MODE(xfm("g-o", 0034).transform(0640, false), 0640);
+ EXPECT_EQ_MODE(xfm("a=Xs", 0341).transform(0203, false), 06111);
+ EXPECT_EQ_MODE(xfm("goa+Xs", 0737).transform(0757, false), 06757);
+ EXPECT_EQ_MODE(xfm("aog=tXr", 0161).transform(0137, false), 01555);
+ EXPECT_EQ_MODE(xfm("o+rt", 0716).transform(0100, false), 01104);
+ EXPECT_EQ_MODE(xfm("g=r", 0131).transform(0577, false), 0547);
+ EXPECT_EQ_MODE(xfm("au-sx", 0025).transform(0246, false), 0246);
+ EXPECT_EQ_MODE(xfm("o=ts", 0306).transform(0252, false), 01250);
+ EXPECT_EQ_MODE(xfm("062", 0733).transform(0223, false), 062);
+ EXPECT_EQ_MODE(xfm("o-tr", 0442).transform(0704, false), 0700);
+ EXPECT_EQ_MODE(xfm("501", 0442).transform(0246, false), 0501);
+ EXPECT_EQ_MODE(xfm("1254", 0562).transform(01, false), 01254);
+ EXPECT_EQ_MODE(xfm("u-s", 0537).transform(0747, false), 0747);
+ EXPECT_EQ_MODE(xfm("o=sxX", 0306).transform(0134, false), 0131);
+ EXPECT_EQ_MODE(xfm("ou=sw", 0432).transform(020, false), 04222);
+ EXPECT_EQ_MODE(xfm("1212", 0030).transform(0717, false), 01212);
+ EXPECT_EQ_MODE(xfm("u=rXw", 0027).transform(0473, false), 0773);
+ EXPECT_EQ_MODE(xfm("oa-g", 0032).transform(0273, false), 00);
+ EXPECT_EQ_MODE(xfm("gu=wr", 0377).transform(0732, false), 0662);
+ EXPECT_EQ_MODE(xfm("uo=srw", 0400).transform(0414, false), 04616);
+ EXPECT_EQ_MODE(xfm("u+wt", 0175).transform(0332, false), 0332);
+ EXPECT_EQ_MODE(xfm("u=X", 0427).transform(0542, false), 0142);
+ EXPECT_EQ_MODE(xfm("g-wrt", 0250).transform(066, false), 06);
+ EXPECT_EQ_MODE(xfm("au-wr", 0334).transform(0167, false), 0101);
+ EXPECT_EQ_MODE(xfm("ug=u", 0764).transform(0507, false), 0557);
+ EXPECT_EQ_MODE(xfm("o-w+t", 0320).transform(0625, false), 01625);
+ EXPECT_EQ_MODE(xfm("ag+x=r-s", 0242).transform(0344, false), 0444);
+ EXPECT_EQ_MODE(xfm("a+rs", 0237).transform(0641, false), 06645);
+ EXPECT_EQ_MODE(xfm("gu=s", 0523).transform(074, false), 06004);
+ EXPECT_EQ_MODE(xfm("4377", 0401).transform(0704, false), 04377);
+ EXPECT_EQ_MODE(xfm("ou=xs", 0775).transform(0461, false), 04161);
+ EXPECT_EQ_MODE(xfm("go+xw", 0720).transform(041, false), 073);
+ EXPECT_EQ_MODE(xfm("u=t", 0657).transform(020, false), 020);
+ EXPECT_EQ_MODE(xfm("aug+tr", 0643).transform(0646, false), 01646);
+ EXPECT_EQ_MODE(xfm("o=sw", 0004).transform(02440, false), 02442);
+ EXPECT_EQ_MODE(xfm("g=u", 0436).transform(0577, false), 0557);
+ EXPECT_EQ_MODE(xfm("o-g", 0354).transform(0556, false), 0552);
+ EXPECT_EQ_MODE(xfm("ogu=r", 0275).transform(0413, false), 0444);
+ EXPECT_EQ_MODE(xfm("u-w", 0314).transform(0756, false), 0556);
+ EXPECT_EQ_MODE(xfm("ag+tw", 0630).transform(0524, false), 01726);
+ EXPECT_EQ_MODE(xfm("gua=u", 0356).transform(0100, false), 0111);
+ EXPECT_EQ_MODE(xfm("a+o", 0475).transform(0354, false), 0754);
+ EXPECT_EQ_MODE(xfm("ag=r", 0351).transform(0122, false), 0444);
+ EXPECT_EQ_MODE(xfm("au+x-tx", 0254).transform(01520, false), 0420);
+ EXPECT_EQ_MODE(xfm("ua-s+w", 0070).transform(04450, false), 0672);
+ EXPECT_EQ_MODE(xfm("ug=wr", 0351).transform(0263, false), 0663);
+ EXPECT_EQ_MODE(xfm("uo-Xxs", 0501).transform(0422, false), 0422);
+ EXPECT_EQ_MODE(xfm("u-Xt", 0177).transform(01421, false), 01421);
+ EXPECT_EQ_MODE(xfm("o=X+r", 0007).transform(0716, false), 0715);
+ EXPECT_EQ_MODE(xfm("g=sx", 0555).transform(0452, false), 02412);
+ EXPECT_EQ_MODE(xfm("a=r", 0314).transform(052, false), 0444);
+ EXPECT_EQ_MODE(xfm("a=wX", 0126).transform(0110, false), 0333);
+ EXPECT_EQ_MODE(xfm("ou-rX", 0200).transform(0127, false), 022);
+ EXPECT_EQ_MODE(xfm("722", 0644).transform(056, false), 0722);
+ EXPECT_EQ_MODE(xfm("u-Xx", 0344).transform(0225, false), 0225);
+ EXPECT_EQ_MODE(xfm("ao+t", 0367).transform(0624, false), 01624);
+ EXPECT_EQ_MODE(xfm("a-o", 0622).transform(00, false), 00);
+ EXPECT_EQ_MODE(xfm("ou-s", 0660).transform(0570, false), 0570);
+ EXPECT_EQ_MODE(xfm("uo+o", 0041).transform(0131, false), 0131);
+ EXPECT_EQ_MODE(xfm("ug+Xsr", 0200).transform(0777, false), 06777);
+ EXPECT_EQ_MODE(xfm("go-st", 0206).transform(0452, false), 0452);
+ EXPECT_EQ_MODE(xfm("oa+Xx", 0077).transform(0710, false), 0711);
+ EXPECT_EQ_MODE(xfm("go+r", 0713).transform(0151, false), 0155);
+ EXPECT_EQ_MODE(xfm("aog+t", 0312).transform(0475, false), 01475);
+ EXPECT_EQ_MODE(xfm("g=tr", 0710).transform(0457, false), 0447);
+ EXPECT_EQ_MODE(xfm("g-u", 0555).transform(0473, false), 0433);
+ EXPECT_EQ_MODE(xfm("og+xwX", 0704).transform(0343, false), 0373);
+ EXPECT_EQ_MODE(xfm("u+Xsr", 0567).transform(046, false), 04446);
+ EXPECT_EQ_MODE(xfm("gao-wr", 0256).transform(062, false), 00);
+ EXPECT_EQ_MODE(xfm("u=o", 0704).transform(0164, false), 0464);
+ EXPECT_EQ_MODE(xfm("au-w", 0257).transform(041, false), 041);
+ EXPECT_EQ_MODE(xfm("+736", 0046).transform(0410, false), 0736);
+ EXPECT_EQ_MODE(xfm("gu+wsX", 0671).transform(02007, false), 06337);
+ EXPECT_EQ_MODE(xfm("561", 0540).transform(02031, false), 0561);
+ EXPECT_EQ_MODE(xfm("757", 0113).transform(0407, false), 0757);
+ EXPECT_EQ_MODE(xfm("ou+xw", 0351).transform(0607, false), 0707);
+ EXPECT_EQ_MODE(xfm("ou-r=xX", 0415).transform(0141, false), 0141);
+ EXPECT_EQ_MODE(xfm("og=r+r-rXt", 0251).transform(0153, false), 0100);
+ EXPECT_EQ_MODE(xfm("gu=wxs", 0467).transform(0143, false), 06333);
+ EXPECT_EQ_MODE(xfm("ga=xrw", 0614).transform(0216, false), 0777);
+ EXPECT_EQ_MODE(xfm("og=sX", 0456).transform(0304, false), 02311);
+ EXPECT_EQ_MODE(xfm("o=r", 0707).transform(0303, false), 0304);
+ EXPECT_EQ_MODE(xfm("o+xs", 0124).transform(0665, false), 0665);
+ EXPECT_EQ_MODE(xfm("g-xr", 0252).transform(0260, false), 0220);
+ EXPECT_EQ_MODE(xfm("gu+Xw", 0664).transform(0133, false), 0333);
+ EXPECT_EQ_MODE(xfm("g=r-t", 0467).transform(0433, false), 0443);
+ EXPECT_EQ_MODE(xfm("u=w-st", 0017).transform(0674, false), 0274);
+ EXPECT_EQ_MODE(xfm("o+g", 0076).transform(0421, false), 0423);
+ EXPECT_EQ_MODE(xfm("gau+s", 0726).transform(01406, false), 07406);
+ EXPECT_EQ_MODE(xfm("-157", 0046).transform(0660, false), 0620);
+ EXPECT_EQ_MODE(xfm("go-X", 0617).transform(0502, false), 0502);
+ EXPECT_EQ_MODE(xfm("324", 0761).transform(0265, false), 0324);
+ EXPECT_EQ_MODE(xfm("o+r-sxr", 0262).transform(0167, false), 0162);
+ EXPECT_EQ_MODE(xfm("g+w", 0750).transform(0705, false), 0725);
+ EXPECT_EQ_MODE(xfm("og+w", 0101).transform(0666, false), 0666);
+ EXPECT_EQ_MODE(xfm("u-t", 0150).transform(0473, false), 0473);
+ EXPECT_EQ_MODE(xfm("ga-tx", 0644).transform(0675, false), 0664);
+ EXPECT_EQ_MODE(xfm("a+o", 0303).transform(060, false), 060);
+ EXPECT_EQ_MODE(xfm("gu-t", 0547).transform(0762, false), 0762);
+ EXPECT_EQ_MODE(xfm("uo-rx", 0002).transform(0610, false), 0210);
+ EXPECT_EQ_MODE(xfm("gou=u", 0257).transform(0465, false), 0444);
+ EXPECT_EQ_MODE(xfm("uo-x", 0670).transform(0164, false), 064);
+ EXPECT_EQ_MODE(xfm("u+u", 0151).transform(050, false), 050);
+ EXPECT_EQ_MODE(xfm("aug=rx", 0235).transform(0515, false), 0555);
+ EXPECT_EQ_MODE(xfm("uo+X", 0550).transform(0613, false), 0713);
+ EXPECT_EQ_MODE(xfm("ago+g", 0262).transform(0451, false), 0555);
+ EXPECT_EQ_MODE(xfm("g=X", 0257).transform(0643, false), 0613);
+ EXPECT_EQ_MODE(xfm("a=o", 0534).transform(04400, false), 00);
+ EXPECT_EQ_MODE(xfm("514", 0557).transform(0361, false), 0514);
+ EXPECT_EQ_MODE(xfm("ug+o", 0106).transform(0302, false), 0322);
+ EXPECT_EQ_MODE(xfm("g=s", 0551).transform(0206, false), 02206);
+ EXPECT_EQ_MODE(xfm("og+r", 0504).transform(01060, false), 01064);
+ EXPECT_EQ_MODE(xfm("ga=rs", 0021).transform(0407, false), 06444);
+ EXPECT_EQ_MODE(xfm("o-u", 0712).transform(0767, false), 0760);
+ EXPECT_EQ_MODE(xfm("ga=tXx", 0723).transform(0170, false), 01111);
+ EXPECT_EQ_MODE(xfm("o+X-w=X", 0252).transform(0770, false), 0771);
+ EXPECT_EQ_MODE(xfm("u-t", 0352).transform(0404, false), 0404);
+ EXPECT_EQ_MODE(xfm("ag-u", 0465).transform(04423, false), 04023);
+ EXPECT_EQ_MODE(xfm("ou-xrX", 0112).transform(0505, false), 00);
+ EXPECT_EQ_MODE(xfm("oa-s", 0026).transform(0117, false), 0117);
+ EXPECT_EQ_MODE(xfm("aug-xrs", 0263).transform(0774, false), 0220);
+ EXPECT_EQ_MODE(xfm("ga-xw", 0116).transform(0767, false), 0444);
+ EXPECT_EQ_MODE(xfm("ao=x-t", 0310).transform(013, false), 0111);
+ EXPECT_EQ_MODE(xfm("gao-wX", 0631).transform(04311, false), 04000);
+ EXPECT_EQ_MODE(xfm("gu+w-trX", 0777).transform(0605, false), 0225);
+ EXPECT_EQ_MODE(xfm("u+wX", 0742).transform(0204, false), 0204);
+ EXPECT_EQ_MODE(xfm("oa-xt", 0626).transform(0166, false), 066);
+ EXPECT_EQ_MODE(xfm("uga+tsw", 0620).transform(04, false), 07226);
+ EXPECT_EQ_MODE(xfm("ao+X", 0045).transform(0341, false), 0351);
+ EXPECT_EQ_MODE(xfm("a=s", 0203).transform(0147, false), 06000);
+ EXPECT_EQ_MODE(xfm("o=sX", 0246).transform(0733, false), 0731);
+ EXPECT_EQ_MODE(xfm("350", 0523).transform(00, false), 0350);
+ EXPECT_EQ_MODE(xfm("325", 0504).transform(0147, false), 0325);
+ EXPECT_EQ_MODE(xfm("ou+twX", 0304).transform(0205, false), 01307);
+ EXPECT_EQ_MODE(xfm("g-rw", 0547).transform(02071, false), 02011);
+ EXPECT_EQ_MODE(xfm("u=Xx", 0353).transform(0473, false), 0173);
+ EXPECT_EQ_MODE(xfm("ag=u", 0174).transform(017, false), 00);
+ EXPECT_EQ_MODE(xfm("au+x", 0224).transform(0552, false), 0553);
+ EXPECT_EQ_MODE(xfm("oa+g", 0521).transform(0324, false), 0326);
+ EXPECT_EQ_MODE(xfm("gu+r", 0343).transform(040, false), 0440);
+ EXPECT_EQ_MODE(xfm("a-ws", 0001).transform(0157, false), 0155);
+ EXPECT_EQ_MODE(xfm("og-g", 0766).transform(0723, false), 0701);
+ EXPECT_EQ_MODE(xfm("auo-t", 0423).transform(0335, false), 0335);
+ EXPECT_EQ_MODE(xfm("a-ts", 0002).transform(01545, false), 0545);
+ EXPECT_EQ_MODE(xfm("153", 0307).transform(02261, false), 0153);
+ EXPECT_EQ_MODE(xfm("ua-w", 0531).transform(0400, false), 0400);
+ EXPECT_EQ_MODE(xfm("ua=wX", 0017).transform(0260, false), 0222);
+ EXPECT_EQ_MODE(xfm("g=Xr", 0236).transform(012, false), 052);
+ EXPECT_EQ_MODE(xfm("ag=ts", 0026).transform(0457, false), 07000);
+ EXPECT_EQ_MODE(xfm("ua-wrs", 0071).transform(0301, false), 0101);
+ EXPECT_EQ_MODE(xfm("uo=X", 0247).transform(0720, false), 0121);
+ EXPECT_EQ_MODE(xfm("ag+w", 0406).transform(0776, false), 0776);
+ EXPECT_EQ_MODE(xfm("oa-xw", 0640).transform(0455, false), 0444);
+ EXPECT_EQ_MODE(xfm("u=t", 0442).transform(0524, false), 024);
+ EXPECT_EQ_MODE(xfm("og+wst", 0030).transform(0407, false), 03427);
+ EXPECT_EQ_MODE(xfm("oau+sX", 0663).transform(0727, false), 06737);
+ EXPECT_EQ_MODE(xfm("o+t", 0106).transform(0415, false), 01415);
+ EXPECT_EQ_MODE(xfm("ug=r", 0166).transform(0675, false), 0445);
+ EXPECT_EQ_MODE(xfm("u+tsX", 0733).transform(0241, false), 04341);
+ EXPECT_EQ_MODE(xfm("uga=o", 0162).transform(0630, false), 00);
+ EXPECT_EQ_MODE(xfm("u-g", 0224).transform(04302, false), 04302);
+ EXPECT_EQ_MODE(xfm("ug+stX", 0422).transform(0477, false), 06577);
+ EXPECT_EQ_MODE(xfm("g=s", 0304).transform(0476, false), 02406);
+ EXPECT_EQ_MODE(xfm("u-r", 0531).transform(0317, false), 0317);
+ EXPECT_EQ_MODE(xfm("a=Xrw", 0217).transform(01077, false), 0777);
+ EXPECT_EQ_MODE(xfm("au+u", 0134).transform(02213, false), 02233);
+ EXPECT_EQ_MODE(xfm("oug+w", 0653).transform(0277, false), 0277);
+ EXPECT_EQ_MODE(xfm("u=wx", 0222).transform(0604, false), 0304);
+ EXPECT_EQ_MODE(xfm("g-x", 0257).transform(02, false), 02);
+ EXPECT_EQ_MODE(xfm("544", 0550).transform(04057, false), 0544);
+ EXPECT_EQ_MODE(xfm("u=r", 0011).transform(016, false), 0416);
+ EXPECT_EQ_MODE(xfm("gu=ws", 0014).transform(0645, false), 06225);
+ EXPECT_EQ_MODE(xfm("ou-rws", 0613).transform(0756, false), 0150);
+ EXPECT_EQ_MODE(xfm("oa-xX", 0237).transform(0402, false), 0402);
+ EXPECT_EQ_MODE(xfm("g+Xt", 0721).transform(01430, false), 01430);
+ EXPECT_EQ_MODE(xfm("a+ws", 0607).transform(0536, false), 06736);
+ EXPECT_EQ_MODE(xfm("g-r", 0312).transform(035, false), 035);
+ EXPECT_EQ_MODE(xfm("u=srX", 0700).transform(0271, false), 04571);
+ EXPECT_EQ_MODE(xfm("ga+rX", 0626).transform(00, false), 0444);
+}