Fix TestSBData.py test case (tested fix Linux/Mac)
- stop ignoring the error-codes in the 'error' variable - removed out-of-bounds accesses with read-only array fields such as: self.assertTrue(data2.uint8[6] == 0, 'binary 0 terminator') Since SBData wraps a (6-character) python string literal, trying to read the null-terminator raises an exception. Instead, I replaced the out-of-bounds read with a length-check. Other out-of-bounds reads (via accessor function like SBData.GetUnsignedInt8) don't throw and are OK. I just added asserts that errors are set for these negative cases. llvm-svn: 175223
Loading
Please register or sign in to comment