зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1140760 - Move TestXPIDLString.cpp to gtest and enable it; r=froydnj
--HG-- rename : xpcom/tests/TestXPIDLString.cpp => xpcom/tests/gtest/TestXPIDLString.cpp
This commit is contained in:
Родитель
a98abb5918
Коммит
db5ec9921e
|
@ -1,6 +1,7 @@
|
||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
#include "nsReadableUtils.h"
|
#include "nsReadableUtils.h"
|
||||||
#include "nsXPIDLString.h"
|
#include "nsXPIDLString.h"
|
||||||
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nsXPIDLStringTest_Value(char16_t** aResult)
|
nsXPIDLStringTest_Value(char16_t** aResult)
|
||||||
|
@ -8,11 +9,10 @@ nsXPIDLStringTest_Value(char16_t** aResult)
|
||||||
*aResult = ToNewUnicode(NS_LITERAL_STRING("Hello, World"));
|
*aResult = ToNewUnicode(NS_LITERAL_STRING("Hello, World"));
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
TEST(XPIDLString, Main)
|
||||||
main(int argc, char* argv[])
|
|
||||||
{
|
{
|
||||||
nsXPIDLString s1;
|
nsXPIDLString s1;
|
||||||
nsXPIDLStringTest_Value(getter_Copies(s1));
|
nsXPIDLStringTest_Value(getter_Copies(s1));
|
||||||
return 0;
|
EXPECT_TRUE(s1.EqualsLiteral("Hello, World"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ UNIFIED_SOURCES += [
|
||||||
'TestThreadPool.cpp',
|
'TestThreadPool.cpp',
|
||||||
'TestTimeStamp.cpp',
|
'TestTimeStamp.cpp',
|
||||||
'TestUTF.cpp',
|
'TestUTF.cpp',
|
||||||
|
'TestXPIDLString.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
FINAL_LIBRARY = 'xul-gtest'
|
FINAL_LIBRARY = 'xul-gtest'
|
||||||
|
|
|
@ -81,7 +81,6 @@ if CONFIG['MOZ_MEMORY']:
|
||||||
# XXX Make these tests work in libxul builds.
|
# XXX Make these tests work in libxul builds.
|
||||||
#CPP_UNIT_TESTS += [
|
#CPP_UNIT_TESTS += [
|
||||||
# 'TestThreads',
|
# 'TestThreads',
|
||||||
# 'TestXPIDLString',
|
|
||||||
# 'TestAtoms',
|
# 'TestAtoms',
|
||||||
#]
|
#]
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче