blob: bf5add671a708df46b1498b76a193b4da4852348 [file] [log] [blame]
Dejan Mircevskib6fe02f2016-01-07 13:44:22 -05001// Copyright (c) 2015-2016 The Khronos Group Inc.
David Netof6184a82015-08-14 13:57:02 -04002//
David Neto9fc86582016-09-01 15:33:59 -04003// 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 Netof6184a82015-08-14 13:57:02 -04006//
David Neto9fc86582016-09-01 15:33:59 -04007// http://www.apache.org/licenses/LICENSE-2.0
David Netof6184a82015-08-14 13:57:02 -04008//
David Neto9fc86582016-09-01 15:33:59 -04009// 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 Netof6184a82015-08-14 13:57:02 -040014
dan sinclaireda2cfb2018-08-03 15:06:09 -040015#include "test/unit_spirv.h"
David Netof6184a82015-08-14 13:57:02 -040016
dan sinclair2cce2c52018-07-11 09:24:49 -040017namespace spvtools {
Dejan Mircevski73d70822015-08-31 15:24:32 -040018namespace {
19
Lei Zhange78a7c12015-09-10 17:07:21 -040020TEST(Macros, BitShiftInnerParens) { ASSERT_EQ(65536, SPV_BIT(2 << 3)); }
David Netof6184a82015-08-14 13:57:02 -040021
Lei Zhange78a7c12015-09-10 17:07:21 -040022TEST(Macros, BitShiftOuterParens) { ASSERT_EQ(15, SPV_BIT(4) - 1); }
Dejan Mircevski73d70822015-08-31 15:24:32 -040023
dan sinclair2cce2c52018-07-11 09:24:49 -040024} // namespace
25} // namespace spvtools