This fixes bug #667329.
The problem was that ManagedThreadId was created from a per-appdomain
counter, but stored in a per-thread storage, so if two threads could
end up with the same ManagedThreadId if a second appdomain executed
on the second thread first.
test. Numbered asserts. Minor code formatting updates. Removed obsolete
comment on class.
* ThreadTest.cs: Use Assert.Fail for tests that fail on the Mono
runtime only when these tests are being executed on the Mono runtime.
svn path=/trunk/mcs/; revision=105788
* Thread.cs: Throw ThreadStateException when retrieving ApartmentState
or IsBackground if thread is stopped. Fixes bug #81658.
2007-08-10 Gert Driesen <[email protected]>
* ThreadTest.cs: Enabled test for bug #81658.
svn path=/trunk/mcs/; revision=83806
break these by changing the CurrentCulture or CurrentUICulture.
Instead I've added a standalone test for this (in the gert module).
svn path=/trunk/mcs/; revision=81595
* FileSystemInfoTest.cs: Restore original CurrentCulture on teardown.
Removed stray tabs. Code formatting.
* FileTest.cs: Restore original CurrentCulture on teardown. Removed
stray tabs. Changes spaces to tabs.
* ThreadTest.cs: Added tests for bug #81930.
* CultureInfoTest.cs: Added exception tests when invoking NumberFormat
or DateTimeFormat on a neutral culture. Added tests for bug #81930.
No longer derive from deprecated Assertion class. Added tests for
GetCultureInfo (2.0).
* ArrayTest.cs: Added test for bug #81941.
* ByteTest.cs: Restore original CurrentCulture in teardown.
* DecimalFormatterTest.cs: Restore original CurrentCulture in teardown.
Code formatting.
* DecimalTest.cs: Code formatting.
* DoubleFormatterTest.cs: Test relies on specific culture, so set it
up here. This worked before since the CurrentCulture was set in another
TestFixture, and the original one was not restored.
* FloatingPointFormatterTest.cs: Same.
* NumberFormatterTest.cs: Same. Removed stray tabs and fixes code
formatting.
* SingleFormatterTest.cs: Restore original culture on teardown. Code
formatting.
* SingleTest.cs: Same.
* StringComparerTest.cs: Restore original culture on teardown.
svn path=/trunk/mcs/; revision=80626
* ThreadTest.cs: Added regression test for #76332 when an IPrincipal
instance should be copied in any new thread created.
svn path=/trunk/mcs/; revision=51333
* Dictionary.cs (GetKeys, GetValues): Remove.
(SetThreshold): New function to calculate the resize threshold.
(CopyTo): Don't use foreach syntax.
(ContainsValue): Likewise. Use default equality comparer of the
value type.
(GetObjectData): Use CopyTo to copy into temporary array. Don't
save redundant _usedSlots and _threshold.
(OnDeserialization): Rewrite.
(ICollection<>.CopyTo): Forward to CopyTo.
(Enumerator._nextIndex): Rename to from _index.
(Enumerator._next, Enumerator.FixNext): Remove.
(Enumerator.Current): Rewrite to avoid need for _next.
(Enumerator.IEnumerator.Reset): Update.
(KeyCollection): Is also IEnumerable<TKey> and IEnumerable.
Update methods to conform to standard.
(KeyCollection.GetEnumerator): Restore. Return the correct type.
(KeyCollection.Enumerator): Rename from KeyEnumerator. Simple
wrapper that forwards to Dictionary<,>.Enumerator.
(ValueCollection): Likewise.
In Test/System.Collections.Generic:
* DictionaryTest.cs (SliceCollectionsEnumeratorTest): New test
based on #75053.
svn path=/trunk/mcs/; revision=46087
* ThreadTest.cs: sanitize waiting for a thread that might be already
done. Added test for Thread.Start called after thread.Abort, which used
to segfault.
svn path=/trunk/mcs/; revision=45464