1 //===- llvm/unittest/ADT/APInt.cpp - APInt unit tests -----------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "gtest/gtest.h"
11 #include "llvm/ADT/APInt.h"
17 // Test that APInt shift left works when bitwidth > 64 and shiftamt == 0
18 TEST(APIntTest, ShiftLeftByZero) {
19 APInt One = APInt::getNullValue(65) + 1;
20 APInt Shl = One.shl(0);
21 EXPECT_EQ(Shl[0], true);
22 EXPECT_EQ(Shl[1], false);