public int XmlLang_4()
{
/*if (WriterType == WriterType.XmlTextWriter)
return TEST_SKIPPED;*/
using (XmlWriter w = CreateWriter())
{
try
{
w.WriteStartElement("Root");
w.WriteAttributeString("xml", "lang", null, "en-us");
w.WriteAttributeString("xml", "lang", null, "ja");
}
catch (XmlException e)
{
CError.WriteLineIgnore(e.ToString());
CError.Compare(w.WriteState, WriteState.Error, "WriteState should be Error");
return TEST_PASS;
}
}
CError.WriteLine("Exception expected");
return TEST_FAIL;
}