Add a test for addition and assignment optimizations