public bool PosTest3() { bool retVal = true; TestLibrary.TestFramework.BeginScenario("PosTest3: Call Alloc to alloc memory for a non blittable type instance"); try { string randValue = TestLibrary.Generator.GetString(-55, false, 1, c_ARRAY_SIZE); TestNonBittableClass obj = new TestNonBittableClass(); obj.m_Object = new Object(); obj.m_String = randValue; retVal = VerificationHelper(new Object(), "003.1") && retVal; retVal = VerificationHelper(randValue, "003.2") && retVal; retVal = VerificationHelper(obj, "003.3") && retVal; } catch (Exception e) { TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e); TestLibrary.TestFramework.LogInformation(e.StackTrace); retVal = false; } return(retVal); }
public bool PosTest2() { bool retVal = true; TestLibrary.TestFramework.BeginScenario("PosTest2: Call Free to free allocated handle"); try { string randValue = TestLibrary.Generator.GetString(-55, false, 1, c_ARRAY_SIZE); TestNonBittableClass obj = new TestNonBittableClass(); obj.m_Object = new Object(); obj.m_String = randValue; retVal = VerificationHelper(new TestBittableClass(), "002.1") && retVal; retVal = VerificationHelper(new Object(), "002.2") && retVal; retVal = VerificationHelper(randValue, "002.3") && retVal; retVal = VerificationHelper(obj, "002.4") && retVal; } catch (Exception e) { TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e); TestLibrary.TestFramework.LogInformation(e.StackTrace); retVal = false; } return retVal; }
public bool PosTest2() { bool retVal = true; TestLibrary.TestFramework.BeginScenario("PosTest2: Call Free to free allocated handle"); try { string randValue = TestLibrary.Generator.GetString(-55, false, 1, c_ARRAY_SIZE); TestNonBittableClass obj = new TestNonBittableClass(); obj.m_Object = new Object(); obj.m_String = randValue; retVal = VerificationHelper(new TestBittableClass(), "002.1") && retVal; retVal = VerificationHelper(new Object(), "002.2") && retVal; retVal = VerificationHelper(randValue, "002.3") && retVal; retVal = VerificationHelper(obj, "002.4") && retVal; } catch (Exception e) { TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e); TestLibrary.TestFramework.LogInformation(e.StackTrace); retVal = false; } return(retVal); }
public bool PosTest3() { bool retVal = true; TestLibrary.TestFramework.BeginScenario("PosTest3: Call Alloc to alloc memory for a non blittable type instance"); try { string randValue = TestLibrary.Generator.GetString(-55, false, 1, c_ARRAY_SIZE); TestNonBittableClass obj = new TestNonBittableClass(); obj.m_Object = new Object(); obj.m_String = randValue; retVal = VerificationHelper(new Object(), "003.1") && retVal; retVal = VerificationHelper(randValue, "003.2") && retVal; retVal = VerificationHelper(obj, "003.3") && retVal; } catch (Exception e) { TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e); TestLibrary.TestFramework.LogInformation(e.StackTrace); retVal = false; } return retVal; }