public int docType_4()
{
String docName = "";
if (CurVariation.Param.ToString() == "String.Empty")
docName = String.Empty;
else if (CurVariation.Param.ToString() == "null")
docName = null;
using (XmlWriter w = CreateWriter())
{
try
{
w.WriteDocType(docName, null, null, "test1");
}
catch (ArgumentException e)
{
CError.WriteLineIgnore(e.ToString());
CError.Compare(w.WriteState, (WriterType == WriterType.CharCheckingWriter) ? WriteState.Start : WriteState.Error, "WriteState should be Error");
return TEST_PASS;
}
catch (NullReferenceException e)
{
CError.WriteLineIgnore(e.ToString());
CError.Compare(w.WriteState, (WriterType == WriterType.CharCheckingWriter) ? WriteState.Start : WriteState.Error, "WriteState should be Error");
return TEST_PASS;
}
}
CError.WriteLine("Did not throw exception");
return TEST_FAIL;
}