summaryrefslogtreecommitdiff
path: root/Source/UnitTests/Common/CommonFuncsTest.cpp
blob: 6582eef1cc80c86178cc9992f9f5e2a3f4474fc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// 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(); }, "");
}