[Mono-devel-list] Culture for 509 tests

Nick Drochak ndrochak at gol.com
Mon Apr 14 03:53:38 EDT 2003


SP,

The unit tests are failing on .NET now (under cygwin) because of the date
format.

Maybe it would be a good idea to use the culture "trick" we used in other
tests to make sure we are using the same date format when comparing date
strings?  See code snippet below...
---------------------------------------------
private CultureInfo oldcult;

[SetUp]
protected void SetUp()
{
	// the current culture determines the result of formatting
	oldcult = Thread.CurrentThread.CurrentCulture;
	Thread.CurrentThread.CurrentCulture = new CultureInfo ("");
}

[TearDown]
protected void TearDown () {
	Thread.CurrentThread.CurrentCulture = oldcult;
	File.Delete("temp.cer");
	File.Delete("temp.b64");
}
---------------------------------------------

You might need to go back to the old date format for all the string
comparisons in the unit test, but if it works, could you add this to the
generator?

And speaking of the generator, is it in CVS?

Nick




More information about the Mono-devel-list mailing list