forked from dolphin-emu/dolphin
		
	Also move it to MathUtils where it belongs with the rest of the power-of-two functions. This gets rid of pollution of the current scope of any translation unit with b<value> macros that aren't intended to be used directly.
		
			
				
	
	
		
			25 lines
		
	
	
		
			415 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			415 B
		
	
	
	
		
			C++
		
	
	
	
	
	
// Copyright 2014 Dolphin Emulator Project
 | 
						|
// Licensed under GPLv2+
 | 
						|
// Refer to the license.txt file included.
 | 
						|
 | 
						|
#include <gtest/gtest.h>
 | 
						|
 | 
						|
#include "Common/CommonFuncs.h"
 | 
						|
 | 
						|
TEST(CommonFuncs, ArraySizeFunction)
 | 
						|
{
 | 
						|
  char test[4];
 | 
						|
  u32 test2[42];
 | 
						|
 | 
						|
  EXPECT_EQ(4u, ArraySize(test));
 | 
						|
  EXPECT_EQ(42u, ArraySize(test2));
 | 
						|
 | 
						|
  (void)test;
 | 
						|
  (void)test2;
 | 
						|
}
 | 
						|
 | 
						|
TEST(CommonFuncs, CrashMacro)
 | 
						|
{
 | 
						|
  EXPECT_DEATH({ Crash(); }, "");
 | 
						|
}
 |