blob: 4f45a6431d3f4d359b142111f035997e6a68463c (
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
25
26
27
28
|
#include "UnityPrefix.h"
#if ENABLE_UNIT_TESTS
#include "External/UnitTest++/src/UnitTest++.h"
#include "Runtime/IMGUI/GUIContent.h"
#include "Runtime/Testing/TestFixtures.h"
#include "Runtime/Testing/Testing.h"
SUITE (GUIContentTests)
{
typedef TestFixtureBase Fixture;
TEST_FIXTURE (Fixture, NullContentDoesNotCrash)
{
//Set expectations.
EXPECT (Warning, "GUIContent is null. Use GUIContent.none.");
// Do.
GUIContent content = MonoGUIContentToTempNative (SCRIPTING_NULL);
// Assert.
CHECK ((UTF16String)"" == content.m_Text);
CHECK ((UTF16String)"" == content.m_Tooltip);
CHECK (content.m_Image.IsNull());
}
}
#endif
|