On Fri, 6 Apr 2018 at 23:36, Jason Molenda <jmole...@apple.com> wrote:
> > > > On Apr 6, 2018, at 2:07 AM, Pavel Labath via Phabricator < > revi...@reviews.llvm.org> wrote: > > > > labath added inline comments. > > > > > > ================ > > Comment at: > packages/Python/lldbsuite/test/settings/TestSettings.py:544-545 > > + # the actual name and via .experimental. > > + cmdinterp.HandleCommand("settings set target.arg0 first-value", > result) > > + self.assertEqual(result.Succeeded(), True) > > + cmdinterp.HandleCommand("settings show target.arg0", result) > > ---------------- > > Isn't this basically what `self.expect` would do (only with better > logging and error messages)? > > > 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. > > 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. > > > Thanks. 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?
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits