mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 21:03:23 +08:00
[0.1.x] +some test of const variables
git-svn-id: https://pykd.svn.codeplex.com/svn@74824 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
5aca2ab3e1
commit
70d40017ac
@ -26,6 +26,8 @@ class TypedVarTest( unittest.TestCase ):
|
|||||||
self.assertEqual( True, target.module.typedVar( "g_constBoolValue" ) )
|
self.assertEqual( True, target.module.typedVar( "g_constBoolValue" ) )
|
||||||
self.assertEqual( 0x5555, target.module.typedVar( "g_constNumValue" ) )
|
self.assertEqual( 0x5555, target.module.typedVar( "g_constNumValue" ) )
|
||||||
self.assertEqual( 3, target.module.typedVar( "g_constEnumThree" ) )
|
self.assertEqual( 3, target.module.typedVar( "g_constEnumThree" ) )
|
||||||
|
self.assertEqual( 0xffffff, target.module.typedVar( "g_constUlong" ) )
|
||||||
|
self.assertEqual( 0xffffff000000, target.module.typedVar( "g_constUlonglong" ) )
|
||||||
|
|
||||||
def testGetAddress( self ):
|
def testGetAddress( self ):
|
||||||
tv = target.module.typedVar( "structTest", target.module.g_structTest )
|
tv = target.module.typedVar( "structTest", target.module.g_structTest )
|
||||||
|
@ -113,6 +113,9 @@ enum enumType {
|
|||||||
|
|
||||||
const enumType g_constEnumThree = THREE;
|
const enumType g_constEnumThree = THREE;
|
||||||
|
|
||||||
|
const ULONG g_constUlong = 0xffffff;
|
||||||
|
const ULONGLONG g_constUlonglong = 0xffffff000000;
|
||||||
|
|
||||||
class classChild : public classBase {
|
class classChild : public classBase {
|
||||||
public:
|
public:
|
||||||
int m_childField;
|
int m_childField;
|
||||||
@ -296,6 +299,8 @@ void FuncWithName0()
|
|||||||
std::cout << g_bigValue;
|
std::cout << g_bigValue;
|
||||||
std::cout << g_classChild.m_enumField;
|
std::cout << g_classChild.m_enumField;
|
||||||
std::cout << g_constEnumThree;
|
std::cout << g_constEnumThree;
|
||||||
|
std::cout << g_constUlong;
|
||||||
|
std::cout << g_constUlonglong;
|
||||||
std::cout << g_unNamedStruct.m_fieldNestedStruct;
|
std::cout << g_unNamedStruct.m_fieldNestedStruct;
|
||||||
std::cout << g_structNested.m_nestedFiled;
|
std::cout << g_structNested.m_nestedFiled;
|
||||||
std::cout << g_unTypedPtrToFunction;
|
std::cout << g_unTypedPtrToFunction;
|
||||||
|
Loading…
Reference in New Issue
Block a user