gecko/xpcom/tests/TestXPIDLString.cpp
Ehsan Akhgari eaa7491d77 Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc
This patch was automatically generated by the following script:

#!/bin/bash
# Command to convert PRUnichar to char16_t

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*modules/libmar*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name prtypes.h \
       ! -name Char16.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRUnichar char16_t
2014-01-04 10:02:17 -05:00

19 lines
326 B
C++

#include "nsString.h"
#include "nsReadableUtils.h"
#include "nsXPIDLString.h"
static void
nsXPIDLStringTest_Value(char16_t** aResult)
{
*aResult = ToNewUnicode(NS_LITERAL_STRING("Hello, World"));
}
int
main(int argc, char* argv[])
{
nsXPIDLString s1;
nsXPIDLStringTest_Value(getter_Copies(s1));
return 0;
}