Bug 1140760 - Move TestXPIDLString.cpp to gtest and enable it; r=froydnj

This commit is contained in:
Ehsan Akhgari 2015-03-09 11:10:01 -04:00
parent 4c074c1280
commit 3afbd4ebf8
3 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,7 @@
#include "nsString.h"
#include "nsReadableUtils.h"
#include "nsXPIDLString.h"
#include "gtest/gtest.h"
static void
nsXPIDLStringTest_Value(char16_t** aResult)
@ -8,11 +9,10 @@ nsXPIDLStringTest_Value(char16_t** aResult)
*aResult = ToNewUnicode(NS_LITERAL_STRING("Hello, World"));
}
int
main(int argc, char* argv[])
TEST(XPIDLString, Main)
{
nsXPIDLString s1;
nsXPIDLStringTest_Value(getter_Copies(s1));
return 0;
EXPECT_TRUE(s1.EqualsLiteral("Hello, World"));
}

View File

@ -20,6 +20,7 @@ UNIFIED_SOURCES += [
'TestThreadPool.cpp',
'TestTimeStamp.cpp',
'TestUTF.cpp',
'TestXPIDLString.cpp',
]
FINAL_LIBRARY = 'xul-gtest'

View File

@ -81,7 +81,6 @@ if CONFIG['MOZ_MEMORY']:
# XXX Make these tests work in libxul builds.
#CPP_UNIT_TESTS += [
# 'TestThreads',
# 'TestXPIDLString',
# 'TestAtoms',
#]