Last active
August 29, 2015 14:07
-
-
Save jbevain/c42dd13616117b9cd5a7 to your computer and use it in GitHub Desktop.
VSTU sample of Expression Evaluation tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void StructInstanceMembers() | |
{ | |
AssertExpressionsAtLine(21, "Types.cs", new Evaluations | |
{ | |
{ "one", | |
Expect("one", Quoted("<X:1 Y:1 Z:1>"), "Victor", | |
Expect("X", "1f", "System.Single"), | |
Expect("Y", "1f", "System.Single"), | |
Expect("Z", "1f", "System.Single")) | |
}, | |
}); | |
} | |
[Test] | |
public void ObjectInstanceMembers() | |
{ | |
AssertExpressionsAtLine(30, "Types.cs", new Evaluations | |
{ | |
{ "i", | |
Expect("i", Quoted("Impl"), "Impl", | |
Expect("base", Quoted("Impl"), "Base", | |
Expect("BaseValue", Quoted("base"), "System.String"), | |
Expect("Non-Public members", "", "", | |
Expect("_base", Quoted("base"), "System.String"))), | |
Expect("ImplValue", Quoted("impl"), "System.String"), | |
Expect("Non-Public members", "", "", | |
Expect("_impl", Quoted("impl"), "System.String"))) | |
}, | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Testing the way values will be displayed when debugging.
AssertExpressionsAtLine compiles a C# program, executes it in a forked VM with the debugger attached, and asserts that the expectations are met for an expression.