Improve test coverage for simplification of bitwise operations

This commit is contained in:
Dmitry-Me 2020-01-30 18:21:22 +03:00
parent d82da987e5
commit 589b497ead
1 changed files with 5 additions and 0 deletions

View File

@ -3452,6 +3452,11 @@ private:
} }
ASSERT_EQUALS("a [ 4 ] ;", tok("a[1+3|4];")); ASSERT_EQUALS("a [ 4 ] ;", tok("a[1+3|4];"));
ASSERT_EQUALS("a [ 4U ] ;", tok("a[1+3|4U];"));
ASSERT_EQUALS("a [ 3 ] ;", tok("a[1+2&3];"));
ASSERT_EQUALS("a [ 3U ] ;", tok("a[1+2&3U];"));
ASSERT_EQUALS("a [ 5 ] ;", tok("a[1-0^4];"));
ASSERT_EQUALS("a [ 5U ] ;", tok("a[1-0^4U];"));
ASSERT_EQUALS("x = 1 + 2 * y ;", tok("x=1+2*y;")); ASSERT_EQUALS("x = 1 + 2 * y ;", tok("x=1+2*y;"));
ASSERT_EQUALS("x = 7 ;", tok("x=1+2*3;")); ASSERT_EQUALS("x = 7 ;", tok("x=1+2*3;"));