gecko-dev/xpcom/tests/gtest/TestXPIDLString.cpp
Ehsan Akhgari db5ec9921e Bug 1140760 - Move TestXPIDLString.cpp to gtest and enable it; r=froydnj
--HG--
rename : xpcom/tests/TestXPIDLString.cpp => xpcom/tests/gtest/TestXPIDLString.cpp
2015-03-09 11:10:01 -04:00

19 lines
379 B
C++

#include "nsString.h"
#include "nsReadableUtils.h"
#include "nsXPIDLString.h"
#include "gtest/gtest.h"
static void
nsXPIDLStringTest_Value(char16_t** aResult)
{
*aResult = ToNewUnicode(NS_LITERAL_STRING("Hello, World"));
}
TEST(XPIDLString, Main)
{
nsXPIDLString s1;
nsXPIDLStringTest_Value(getter_Copies(s1));
EXPECT_TRUE(s1.EqualsLiteral("Hello, World"));
}