Dejan Mircevski | b6fe02f | 2016-01-07 13:44:22 -0500 | [diff] [blame] | 1 | // Copyright (c) 2015-2016 The Khronos Group Inc. |
David Neto | f6184a8 | 2015-08-14 13:57:02 -0400 | [diff] [blame] | 2 | // |
David Neto | 9fc8658 | 2016-09-01 15:33:59 -0400 | [diff] [blame] | 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
David Neto | f6184a8 | 2015-08-14 13:57:02 -0400 | [diff] [blame] | 6 | // |
David Neto | 9fc8658 | 2016-09-01 15:33:59 -0400 | [diff] [blame] | 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
David Neto | f6184a8 | 2015-08-14 13:57:02 -0400 | [diff] [blame] | 8 | // |
David Neto | 9fc8658 | 2016-09-01 15:33:59 -0400 | [diff] [blame] | 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
David Neto | f6184a8 | 2015-08-14 13:57:02 -0400 | [diff] [blame] | 14 | |
dan sinclair | eda2cfb | 2018-08-03 15:06:09 -0400 | [diff] [blame] | 15 | #include "test/unit_spirv.h" |
David Neto | f6184a8 | 2015-08-14 13:57:02 -0400 | [diff] [blame] | 16 | |
dan sinclair | 2cce2c5 | 2018-07-11 09:24:49 -0400 | [diff] [blame] | 17 | namespace spvtools { |
Dejan Mircevski | 73d7082 | 2015-08-31 15:24:32 -0400 | [diff] [blame] | 18 | namespace { |
| 19 | |
Lei Zhang | e78a7c1 | 2015-09-10 17:07:21 -0400 | [diff] [blame] | 20 | TEST(Macros, BitShiftInnerParens) { ASSERT_EQ(65536, SPV_BIT(2 << 3)); } |
David Neto | f6184a8 | 2015-08-14 13:57:02 -0400 | [diff] [blame] | 21 | |
Lei Zhang | e78a7c1 | 2015-09-10 17:07:21 -0400 | [diff] [blame] | 22 | TEST(Macros, BitShiftOuterParens) { ASSERT_EQ(15, SPV_BIT(4) - 1); } |
Dejan Mircevski | 73d7082 | 2015-08-31 15:24:32 -0400 | [diff] [blame] | 23 | |
dan sinclair | 2cce2c5 | 2018-07-11 09:24:49 -0400 | [diff] [blame] | 24 | } // namespace |
| 25 | } // namespace spvtools |