2014-03-09 07:27:04 -06:00
|
|
|
// Copyright 2014 Dolphin Emulator Project
|
2015-05-17 17:08:10 -06:00
|
|
|
// Licensed under GPLv2+
|
2014-03-09 07:27:04 -06:00
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
|
|
|
#include "Common/CommonFuncs.h"
|
|
|
|
|
2015-09-03 21:39:03 -06:00
|
|
|
TEST(CommonFuncs, ArraySizeFunction)
|
2014-03-09 07:27:04 -06:00
|
|
|
{
|
2016-06-24 02:43:46 -06:00
|
|
|
char test[4];
|
|
|
|
u32 test2[42];
|
2014-03-09 07:27:04 -06:00
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
EXPECT_EQ(4u, ArraySize(test));
|
|
|
|
EXPECT_EQ(42u, ArraySize(test2));
|
2014-08-31 06:52:21 -06:00
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
(void)test;
|
|
|
|
(void)test2;
|
2014-03-09 07:27:04 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
TEST(CommonFuncs, CrashMacro)
|
|
|
|
{
|
2016-06-24 02:43:46 -06:00
|
|
|
EXPECT_DEATH({ Crash(); }, "");
|
2014-03-09 07:27:04 -06:00
|
|
|
}
|