#include <iostream.h>
#include "nsStringIO.h"
//#define TEST_STD_STRING
#include "nsString.h"
#include "nsFragmentedString.h"
#include "nsReadableUtils.h"
#include "nsSlidingString.h"
#ifdef TEST_STD_STRING
#include "nsStdStringWrapper.h"
#else
#endif
template <class CharT>
{
}
literal_hello( char* )
{
}
{
#ifdef HAVE_CPP_2BYTE_WCHAR_T
#else
#endif
}
template <class T>
struct string_class_traits
{
};
{
};
{
typedef char* pointer;
};
static
void
CallCMid( nsACString& aResult, const nsACString& aSource, PRUint32 aStartPos, PRUint32 aLengthToCopy )
{
}
template <class CharT>
int
/*
...this tests a problem that was present in |nsPromiseConcatenation| where,
because it originally stored some iteration state in the object itself, rather than
in the fragment, the iterators could get confused if used out of sequence.
This test should be run on any multi-fragment implementation to verify that it
does not have the same bug. Make sure the first fragment is only one character long.
*/
{
int tests_failed = 0;
--iter3;
{
++tests_failed;
}
return tests_failed;
}
template <class CharT>
int
{
return 0;
}
template <class CharT>
int
{
int tests_failed = 0;
{
++tests_failed;
}
{
++tests_failed;
}
{
++tests_failed;
}
{
++tests_failed;
}
{
cout << "FAILED |test_readable_hello|: |CountChar('l')| --> " << aReadable.CountChar(CharT('l')) << endl;
++tests_failed;
}
{
cout << "FAILED |test_readable_hello|: didn't start out pointing to the right thing, or else couldn't be dereferenced. --> '" << *iter << "'" << endl;
++tests_failed;
}
++iter;
{
cout << "FAILED |test_readable_hello|: iterator couldn't be incremented, or else couldn't be dereferenced. --> '" << *iter << "'" << endl;
++tests_failed;
}
--iter;
{
cout << "FAILED |test_readable_hello|: iterator couldn't be set to |EndReading()|, or else couldn't be decremented, or else couldn't be dereferenced. --> '" << *iter << "'" << endl;
++tests_failed;
}
{
cout << "FAILED |test_readable_hello|: iterator couldn't be set to |BeginReading()+=n|, or else couldn't be dereferenced. --> '" << *iter1 << "'" << endl;
++tests_failed;
}
{
cout << "FAILED |test_readable_hello|: iterator couldn't be set to |EndReading()-=n|, or else couldn't be dereferenced. --> '" << *iter2 << "'" << endl;
++tests_failed;
}
{
++tests_failed;
}
{
++tests_failed;
}
{
++tests_failed;
}
// tests_failed += test_deprecated_GetBufferGetUnicode(aReadable);
return tests_failed;
}
template <class CharT>
int
{
int tests_failed = 0;
{
++tests_failed;
}
{
++tests_failed;
}
{
++tests_failed;
}
{
++tests_failed;
}
{
++tests_failed;
}
return tests_failed;
}
template <class CharT>
int
{
int tests_failed = 0;
{
++tests_failed;
}
string_class_traits<CharT>::implementation_t insertable( string_class_traits<CharT>::literal_hello() );
{
++tests_failed;
}
return tests_failed;
}
template <class CharT>
int
{
int tests_failed = 0;
return tests_failed;
}
template <class CharT>
int
{
int tests_failed = 0;
{
++tests_failed;
}
return tests_failed;
}
template <class CharT>
int
{
int tests_failed = 0;
{
++tests_failed;
}
return tests_failed;
}
template <class CharT>
int
{
int tests_failed = 0;
{
++tests_failed;
}
return tests_failed;
}
template <class CharT>
int
{
int tests_failed = 0;
{
++tests_failed;
}
return tests_failed;
}
template <class CharT>
int
{
int tests_failed = 0;
// ...
{
{
++tests_failed;
}
}
return tests_failed;
}
typedef void* void_ptr;
int
main()
{
int tests_failed = 0;
#if 0
{
}
#endif
{
// ss0.AppendBuffer(buffer, buffer+5, buffer+6);
}
{
print_string(nsLiteralCString("The value of the string |x| is \"") + Substring(s0, 0, s0.Length()-1) + NS_LITERAL_CSTRING("\". Hope you liked it."));
}
{
}
{
}
{
}
{
}
{
origString = foo;
}
{
{
tests_failed += failures;
}
}
{
{
++tests_failed;
}
{
++tests_failed;
}
{
++tests_failed;
}
if ( str1 != "Hello" )
{
++tests_failed;
}
}
#if 0
if ( middle_answer != extracted_middle )
{
++tests_failed;
}
//
// |nsStdStringWrapper|, i.e., |nsStdCString|
//
{
if ( middle_answer != extracted_middle )
{
++tests_failed;
}
}
// cout << static_cast<const nsACString>(leftString) << endl;
#endif
if ( !tests_failed )
else
return tests_failed;
}