Improve test coverage for simplification of arithmetic operations

This commit is contained in:
Dmitry-Me 2020-01-29 18:16:07 +03:00
parent 37f4ec5bbe
commit ee86aa7b40
1 changed files with 1 additions and 0 deletions

View File

@ -3460,6 +3460,7 @@ private:
ASSERT_EQUALS("int a [ 8 ] ;", tok("int a[5+6/2];"));
ASSERT_EQUALS("int a [ 4 ] ;", tok("int a[(10)-1-5];"));
ASSERT_EQUALS("int a [ i - 9 ] ;", tok("int a[i - 10 + 1];"));
ASSERT_EQUALS("int a [ i - 11 ] ;", tok("int a[i - 10 - 1];"));
ASSERT_EQUALS("x = y ;", tok("x=0+y+0-0;"));
ASSERT_EQUALS("x = 0 ;", tok("x=0*y;"));