Ported LiteTestCase changes.