Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 004c8c5e authored by Steven Moreland's avatar Steven Moreland
Browse files

reflect toString changes

For now - some of the arguments were missing. Will follow-up to cleanup
the string output to always show good data (in b/259162245).

Bug: 260651168
Test: TH (note b/260866419 - cannot run this test locally)
Change-Id: I7ba56a23827491d6f4f6e39ab218a5ecd1e57747
parent 83e8e930
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -138,13 +138,13 @@ class DnsResolverBinderTest : public NetNativeTestBase {
                        if (!std::regex_match(line, match, lineRegex)) return false;
                        if (match.size() != 2) return false;

                        // The binder_to_string format is changed from S that will add "(null)" to
                        // the log on method's argument if binder object is null. But Q and R don't
                        // have this format in log. So to make register null listener tests are
                        // compatible from all version, just remove the "(null)" argument from
                        // output logs if existed.
                        const std::string output = android::base::StringReplace(
                                match[1].str(), "(null)", "", /*all=*/true);
                        // The binder_to_string format is changed over time to include more
                        // information. To keep it working on Q/R/..., remove what has been
                        // added for now.
                        std::string output = match[1].str();
                        using android::base::StringReplace;
                        output = StringReplace(output, "(null)", "", /*all=*/true);
                        output = StringReplace(output, "<unimplemented>", "", /*all=*/true);
                        return output == td.output;
                    });
            EXPECT_TRUE(found) << "Didn't find line '" << td.output << "' in dumpsys output.";