SNSystems / dexter

DExTer - Debug Experience Tester
MIT License
33 stars 6 forks source link

Add dex expect type command #52

Closed TomWeaver18 closed 5 years ago

TomWeaver18 commented 5 years ago

You can now write tests that check the type of a variable or expression at some point during test execution.

The heuristic scoring works exactly the same way as DexExpectWatchValue, and as a result, I've now implemented a DexExpectWatchBase command that Value and Type checking both inherit from.

There's a small change to LLDB, for type information there's now an extra step that attempts to find expressions using the variable finding API. The FindVariable() method returns more accurate type information for expressions that evaluate to variables with distinct locations. If this fails we simply use the original expression type information.

Docs have been updated and I've also added two feature tests, one for perfect and penalty.

StepValueInfo has now been moved to a seperate file in the commands folder. We may want to move it somewhere else, I welcome discussion on this.

few stealth changes for misformatted comments and added @staticmethod properties where they were missing.

happy reviewing.

TomWeaver18 commented 5 years ago

force pushed with requested changes.

OCHyams commented 5 years ago

LGTM. Should get another set of eyes on this since it's large-ish though.

TomWeaver18 commented 5 years ago

👍 Cheers bud!