mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-04 05:17:07 +00:00 
			
		
		
		
	The way this worked before was to test APInt by running "lli -force-interpreter=true" knowing the lli uses APInt under the hood to store its values. Now, we test APInt directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62514 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			26 lines
		
	
	
		
			669 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			669 B
		
	
	
	
		
			C++
		
	
	
	
	
	
//===- llvm/unittest/ADT/APInt.cpp - APInt unit tests -----------*- C++ -*-===//
 | 
						|
//
 | 
						|
//                     The LLVM Compiler Infrastructure
 | 
						|
//
 | 
						|
// This file is distributed under the University of Illinois Open Source
 | 
						|
// License. See LICENSE.TXT for details.
 | 
						|
//
 | 
						|
//===----------------------------------------------------------------------===//
 | 
						|
 | 
						|
#include "gtest/gtest.h"
 | 
						|
#include "llvm/ADT/APInt.h"
 | 
						|
 | 
						|
using namespace llvm;
 | 
						|
 | 
						|
namespace {
 | 
						|
 | 
						|
// Test that APInt shift left works when bitwidth > 64 and shiftamt == 0
 | 
						|
TEST(APIntTest, ShiftLeftByZero) {
 | 
						|
  APInt One = APInt::getNullValue(65) + 1;
 | 
						|
  APInt Shl = One.shl(0);
 | 
						|
  EXPECT_EQ(Shl[0], true);
 | 
						|
  EXPECT_EQ(Shl[1], false);
 | 
						|
}
 | 
						|
 | 
						|
}
 |