[0.3.x] merged : test from 0.2.x

git-svn-id: https://pykd.svn.codeplex.com/svn@86924 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2013-12-23 07:43:42 +00:00 committed by Mikhail I. Izmestev
commit 6a5d49c132
2 changed files with 11 additions and 4 deletions

View File

@ -264,7 +264,7 @@ KDLIB_EXT_COMMAND_METHOD_IMPL(PykdExt, py)
args.erase( foundArg ); args.erase( foundArg );
} }
if ( global & local ) if ( global && local )
{ {
eprintln( L"-g(--global) and -l(--local) cannot be set together" ); eprintln( L"-g(--global) and -l(--local) cannot be set together" );
return; return;
@ -281,11 +281,11 @@ KDLIB_EXT_COMMAND_METHOD_IMPL(PykdExt, py)
return; return;
} }
global = !(global | local ) ? false : global ; //set local by default global = !(global || local ) ? false : global ; //set local by default
} }
else else
{ {
global = !(global | local ) ? true : global ; //set global by default global = !(global || local ) ? true : global ; //set global by default
} }
PyThreadState *localState = NULL; PyThreadState *localState = NULL;

View File

@ -240,6 +240,13 @@ class TypeInfoTest( unittest.TestCase ):
ti = pykd.typeInfo("UInt8B").arrayOf(10) ti = pykd.typeInfo("UInt8B").arrayOf(10)
self.assertTrue( "UInt8B[10]", ti.name() ) self.assertTrue( "UInt8B[10]", ti.name() )
def testCompareWihNone(self):
ti = None
if ti == None:
ti = pykd.typeInfo("UInt8B")
if ti == None:
pass
def testFunction(self): def testFunction(self):
functype = target.module.typedVar( "CdeclFuncPtr" ).type().deref() functype = target.module.typedVar( "CdeclFuncPtr" ).type().deref()
self.assertTrue( functype.isFunction() ) self.assertTrue( functype.isFunction() )