<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, 6 Apr 2018 at 23:36, Jason Molenda <<a href="mailto:jmolenda@apple.com">jmolenda@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> On Apr 6, 2018, at 2:07 AM, Pavel Labath via Phabricator <<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br>
><br>
> labath added inline comments.<br>
><br>
><br>
> ================<br>
> Comment at: packages/Python/lldbsuite/test/settings/TestSettings.py:544-545<br>
> +        # the actual name and via .experimental.<br>
> +        cmdinterp.HandleCommand("settings set target.arg0 first-value", result)<br>
> +        self.assertEqual(result.Succeeded(), True)<br>
> +        cmdinterp.HandleCommand("settings show target.arg0", result)<br>
> ----------------<br>
> Isn't this basically what `self.expect` would do (only with better logging and error messages)?<br>
<br>
<br>
Ah, I didn't see that self.expect would allow me to specify whether to expect an error return or not.  Yes I can write this in terms of self.expect more cleanly.<br>
<br>
BTW what does the documentation for self.expect in lldbtest.py mean when it refers to "golden input"?  It uses the phrase a few times and I can't figure out what it's talking about.  Maybe that term was in the documentation from long ago and not a recent addition.<br>
<br><br></blockquote><div><br></div><div>Thanks.</div><div><br></div><div>I think the self.expect function predates me, but if I had to guess, I think here the term "golden" just means the "expected" output. The term "golden output" is mostly used when comparing large files (usually images) in tests. I suppose, with some imagination, it could be used checking the verbatim output of a command is exactly a given string, but when we start doing substring and regex matches it really becomes inappropriate... Maybe originally the expect function only supported verbatim matches and this is a leftover of that?</div></div></div>