add test cases for || optimizations