Commit Graph
85 Commits
Author SHA1 Message Date
Jérémie Laval da0475e499 2010-03-24 Jérémie Laval <[email protected]>
In class/corlib/Test/System.Threading/:
   * SpinLockTests.cs: Add a correctness check unit test

svn path=/trunk/mcs/; revision=154164
2010-03-24 19:25:42 +00:00
Jérémie Laval 487198f1de 2010-03-08 Jérémie Laval <[email protected]>
In class/corlib/:
   * corlib_test.dll.sources: Add System.Threading/SpinLockTests.cs

In class/corlib/System.Threading/:
   * SpinLock.cs: Update to use ticket spinlock algorithm

In class/corlib/Test/System.Threading/:
   * SpinLockTests.cs: Added unit tests for SpinLock

svn path=/trunk/mcs/; revision=153273
2010-03-08 17:21:05 +00:00
Zoltan Varga 3f2694d7c8 2010-02-08 Zoltan Varga <[email protected]>
* WaitHandleTest.cs: Add a test for #576039.

svn path=/trunk/mcs/; revision=151018
2010-02-08 10:24:30 +00:00
Jérémie Laval e531fc2677 2010-02-02 Jérémie Laval <[email protected]>
In class/corlib/:
   * corlib.dll.sources: Add System.Threading.Tasks/SimpleConcurrentBag.cs
   and System.Threading.Tasks/UnobservedTaskExceptionEventArgs.cs

In class/corlib/System.Collections.Concurrent/:
   * ConcurrentDictionary.cs:
   * ConcurrentQueue.cs:
   * ConcurrentStack.cs:
   * Partitioner.cs: Port to .NET 4 beta 2 API
   * ConcurrentSkipList.cs: Use Monitor for locking

In class/corlib/System.Threading.Tasks/:
   * Future.cs:
   * Parallel.cs:
   * ParallelLoopState.cs:
   * Task.cs:
   * TaskCompletionSource.cs:
   * TaskContinuationOptions.cs:
   * TaskCreationOptions.cs:
   * TaskFactory.cs:
   * TaskScheduler.cs:
   * UnobservedTaskExceptionEventArgs.cs: Port to .NET 4 beta 2 API
   * SimpleConcurrentBag.cs: Add a simpler implementation of ConcurrentBag
   for use with parallel loops as ConcurrentBag was moved to System

In class/corlib/System.Threading/:
   * CancellationToken.cs:
   * CancellationTokenSource.cs:
   * ManualResetEventSlim.cs:
   * SemaphoreSlim.cs:
   * SpinLock.cs:
   * SpinWait.cs:
   * ThreadLocal.cs: Port to .NET 4 beta 2 API

In class/corlib/System/:
   * AggregateException.cs:
   * OperationCanceledException.cs: Port to .NET 4 beta 2 API

In class/corlib/Test/System.Collections.Concurrent/:
   * CollectionStressTestHelper.cs:
   * ConcurrentBagTests.cs:
   * ConcurrentDictionaryTests.cs:
   * ConcurrentQueueTests.cs:
   * ConcurrentSkipListTests.cs:
   * ConcurrentStackTests.cs:
   * ParallelConcurrentQueueTests.cs:
   * ParallelConcurrentStackTests.cs: Update namespaces and tested methods

In class/corlib/Test/System.Threading.Tasks/:
   * FutureTests.cs:
   * ParallelTestHelper.cs:
   * ParallelTests.cs:
   * SnziTests.cs:
   * TaskCompletionSourceTests.cs:
   * TaskTest.cs: Update namespace and tested methods

In class/corlib/Test/System.Threading/:
   * CancellationTokenTests.cs:
   * LazyInitTests.cs:
   * ThreadLazyTests.cs: Update namespace and tested methods

svn path=/trunk/mcs/; revision=150716
2010-02-02 17:06:15 +00:00
Jb Evain 65eafbff5b 2009-12-09 Jb Evain <[email protected]>
* ThreadTest.cs: add a test for a null callback passed to
	ThreadPool.QueueUserWorkItem.


svn path=/trunk/mcs/; revision=147933
2009-12-09 19:20:42 +00:00
Jérémie Laval 84ffc71a15 2009-11-02 Jérémie Laval <[email protected]>
In class/corlib/System.Threading/:
   * Parallel.cs: Added fix for Bug #536919.

In class/corlib/Test/System.Threading/:
   * ParallelTests.cs: Added unit test for Bug #536919, cleaned up.

svn path=/trunk/mcs/; revision=145203
2009-11-02 16:06:11 +00:00
Sebastien Pouliot 41af0b2b26 In System.Threading:
2009-10-26  Sebastien Pouliot  <[email protected]>

	* InterlockedTest.cs: Add test case for generic methods
	ComapreExchange and Exchange

In System:
2009-10-26  Sebastien Pouliot  <[email protected]>

	* TypeTest.cs: New. Add test cases for IsInstanceOfType


svn path=/trunk/mcs/; revision=144840
2009-10-26 11:55:17 +00:00
Sebastien Pouliot b6a5bb1207 In System.Threading:
2009-10-25  Sebastien Pouliot  <[email protected]>

	* Thread.cs: Fix validations for Join and Sleep overloads

In Test/System.Threading:
2009-10-25  Sebastien Pouliot  <[email protected]>

	* ThreadTest.cs: Add test cases for Current[UI]Culture (not 
	working), Name, Join, Sleep and SpinWait


svn path=/trunk/mcs/; revision=144824
2009-10-25 16:41:18 +00:00
Sebastien Pouliot 2d0767d3b8 In System.Threading:
2009-10-22  Sebastien Pouliot  <[email protected]>
	* EventWaitHandle.cs: Add validation on the EventResetMode 
	parameter used in the constructors
In .:
2009-10-22  Sebastien Pouliot  <[email protected]>

	* corlib_test.dll.sources: Add System/WeakReferenceTest and
	System.Threading/EventWaitHandleTest.cs

In Test/System.Threading:
2009-10-22  Sebastien Pouliot  <[email protected]>
	* EventWaitHandleTest.cs: New. Test case for EventResetMode 
	validation
In Test/System:
2009-10-22  Sebastien Pouliot  <[email protected]>

	* WeakReferenceTest.cs: New. Basic test cases


svn path=/trunk/mcs/; revision=144681
2009-10-22 20:46:35 +00:00
Sebastien Pouliot cfc8c38546 In System.Threading:
2009-10-22  Sebastien Pouliot  <[email protected]> 

	* Monitor.cs: Fix validations for TryEnter and Wait. Reduce 
	duplicated code between overloads.

In Test/System.Threading:
2009-10-22  Sebastien Pouliot  <[email protected]> 

	* MonitorTest.cs: Mark existing tests as "NotWorking" since they
	fail in MS FX2 (maybe they worked in 1.x?). Add more test cases
	to validate the TryEnter and Wait overloaded methods.


svn path=/trunk/mcs/; revision=144627
2009-10-22 11:51:31 +00:00
Sebastien Pouliot dff2c0d12a In System.Threading:
2009-10-21  Sebastien Pouliot  <[email protected]>

	* WaitHandle.cs: Add missing validations for 'millisecondsTimeout'
	in Wait[One|Any|All]. Also call the overloaded (bool) methods for
	WaitAll to reduce code duplication.

In .:
2009-10-21  Sebastien Pouliot  <[email protected]>

	* corlib_test.dll.sources: Add System.Threading/WaitHandleTest.cs

In Test/System.Threading:
2009-10-21  Sebastien Pouliot  <[email protected]>

	* WaitHandleTest.cs: New. Add test cases for Wait[One|All|Any]
	methods overloads (at least the one present in Silverlight 2)


svn path=/trunk/mcs/; revision=144529
2009-10-21 12:18:22 +00:00
Sebastien Pouliot f3506a6f99 In System.Threading:
2009-10-20  Sebastien Pouliot  <[email protected]>

	* Timer.cs: Always call Init from every constructors to avoid 
	duplicate checks. Fix validations on different dueTime and period
	(ctor and Change methods). Seal private TimerComparer class and
	avoid multiple (identical) casts in its Compare method. Seal 
	private Scheduler class.

In Test/System.Threading:
2009-10-20  Sebastien Pouliot  <[email protected]>

	* TimerTest.cs: Add more validation tests


svn path=/trunk/mcs/; revision=144466
2009-10-20 15:52:42 +00:00
Jérémie Laval 9bf30cecff 2009-08-11 Jérémie Laval <[email protected]>
* Update unit tests
    * Moved BlockingCollection and Barrier in System.dll (with assorted fixes)
    * Fix wrong signature in TaskFactory<T>
    * Update .dll.sources files
    * Move AggregateException in System namespace
    * Remove While in Parallel
    * Correct Wait(CancellationToken) signature in CountdownEvent
    * update corlib.dll.sources

svn path=/trunk/mcs/; revision=139727
2009-08-11 18:47:31 +00:00
Jérémie Laval b5d889b654 Author: Jérémie Laval <[email protected]>
Date:   Thu Jul 30 15:37:21 2009 +0200

First code drop of ParallelFx.

svn path=/trunk/mcs/; revision=139083
2009-07-30 13:56:32 +00:00
Zoltan Varga 88ba7144d3 2009-06-20 Zoltan Varga <[email protected]>
* *.cs: Convert all tests to new-style nunit classes/methods.

svn path=/trunk/mcs/; revision=136555
2009-06-20 21:32:02 +00:00
Zoltan Varga e61b107614 2009-01-05 Zoltan Varga <[email protected]>
* ExecutionContextTest.cs (Copy_FromThread): Disable this test, it doesn't
	seem to work after the nunit upgrade.

svn path=/trunk/mcs/; revision=122462
2009-01-05 15:03:37 +00:00
Zoltan Varga d87e651623 2008-10-11 Zoltan Varga <[email protected]>
* TimerTest.cs (TestChange): Modify a constant to avoid a random assert.

svn path=/trunk/mcs/; revision=115511
2008-10-11 08:15:42 +00:00
Bill Holmes 7b51fee50f 2008-07-07 Bill Holmes <[email protected]>
* ThreadTest.cs : Tests added for Thread.Interrupt.

	Code is contributed under MIT/X11 license.

svn path=/trunk/mcs/; revision=107398
2008-07-07 17:03:30 +00:00
Zoltan Varga 81c378ae87 2008-06-13 Zoltan Varga <[email protected]>
* MutexTest.cs: Reenable some mutex tests which seem to work now.

svn path=/trunk/mcs/; revision=105800
2008-06-13 20:56:11 +00:00
Gert Driesen 47f5d6c510 * TimerTest.cs: Removed NotWorking category from TestDisposeOnCallback
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
2008-06-13 18:35:36 +00:00
Zoltan Varga 8ddff2946e 2008-06-04 Zoltan Varga <[email protected]>
* TimerTest.cs (Callback): Use Interlocked Increment to increase the counter.

svn path=/trunk/mcs/; revision=104817
2008-06-04 00:08:30 +00:00
Atsushi Eno fc13a9509d 2007-12-28 Atsushi Enomoto <[email protected]>
* ThreadTest.cs : made couple of tests fail under Windows and made
	  corlib tests run without timtout.


svn path=/trunk/mcs/; revision=91984
2007-12-28 08:42:21 +00:00
Atsushi Eno 9237922eef 2007-12-28 Atsushi Enomoto <[email protected]>
* ThreadTest.cs : marked TestStart() as NotDotNet. It hangs.


svn path=/trunk/mcs/; revision=91977
2007-12-28 05:23:45 +00:00
Gert Driesen 33ea895c0b * ThreadTest.cs: On 2.0 profile, enable > 0 tests for GetHashCode.
Added test that asserts if the hashcode of two threads is distinct.

svn path=/trunk/mcs/; revision=87868
2007-10-21 15:01:17 +00:00
Raja R Harinath b951f53c4b * TimerTest.cs (TestHeavyCreationLoad): Don't shadow a variable name.
svn path=/trunk/mcs/; revision=87843
2007-10-19 19:25:58 +00:00
Dick Porter 6fc907c570 2007-10-19 Dick Porter <[email protected]>
* ThreadTest.cs: Re-enable ManagedThreadId test too



svn path=/trunk/mcs/; revision=87825
2007-10-19 13:18:01 +00:00
Dick Porter c637801cd3 2007-10-19 Dick Porter <[email protected]>
* ThreadTest.cs: Re-enable GetHashCodeTest


svn path=/trunk/mcs/; revision=87824
2007-10-19 13:15:05 +00:00
Dick Porter 15cdea5e46 2007-10-05 Dick Porter <[email protected]>
* ThreadTest.cs: Disable GetHashCodeTest while I figure out why
	GetHashCode sometimes returns 0.


svn path=/trunk/mcs/; revision=86984
2007-10-05 14:16:15 +00:00
Dick Porter f6ac366e86 2007-09-25 Dick Porter <[email protected]>
* ThreadTest.cs: Enable GetHashCodeTest



svn path=/trunk/mcs/; revision=86339
2007-09-25 15:34:04 +00:00
Gert Driesen 1269d670e0 * ThreadTest.cs: Added GetHashCode test for bug #325566.
svn path=/trunk/mcs/; revision=85965
2007-09-18 12:28:18 +00:00
Gert Driesen f930a38e6a * ThreadTest.cs: Added test for bug #82700. Re-enabled and fixed some
tests that pass on my two boxes. Shoot me if these break the buildbots.
Cleaned up some tests.

svn path=/trunk/mcs/; revision=85374
2007-09-05 17:39:49 +00:00
Gert Driesen beb8d0c0df * ThreadTest.cs: Enabled test for bug #81658, and uncommented code
that relies on that fix.

svn path=/trunk/mcs/; revision=83811
2007-08-10 12:52:50 +00:00
Dick Porter 90542ec8a6 2007-08-10 Gert Driesen <[email protected]>
* 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
2007-08-10 10:18:07 +00:00
Gert Driesen 4b5e6111a3 * AutoResetEventTest.cs: Added test for verifying effect of assigning
new SafeWaitHandle on the previous one. Use meaningful names for
tests. Avoid unref warning. Removed usage of deprecated Assertion
class. Spaces to tabs.

svn path=/trunk/mcs/; revision=82427
2007-07-22 06:57:28 +00:00
Miguel de Icaza 6bf8dcac58 Apply Gert's version of the AutoResetEvent, and merge his test
into NUnit.

Test3 is known to be buggy (no harm, as our code just reports a 
warning from the iolayer)


svn path=/trunk/mcs/; revision=82419
2007-07-21 21:18:51 +00:00
Gert Driesen 31dca00816 * ThreadTest.cs: Removed tests for bug #81930, since other tests can
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
2007-07-08 14:26:35 +00:00
Gert Driesen e80c7764f2 * DirectoryTest.cs: Restore original CurrentCulture on teardown.
* 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
2007-06-24 14:20:09 +00:00
Gert Driesen 8277bf73e2 * ThreadTest.cs: Enabled test for bug #81720.
svn path=/trunk/mcs/; revision=78982
2007-06-08 18:48:40 +00:00
Gert Driesen f33f31877b * ThreadTest.cs: Added test for bug #81720. Improved test for
bug #81658. Added test for changing ApartmentState on background
thread.

svn path=/trunk/mcs/; revision=77861
2007-05-23 19:08:04 +00:00
Gert Driesen db38bc6d49 Fixed bug number.
svn path=/trunk/mcs/; revision=77574
2007-05-17 16:20:48 +00:00
Gert Driesen 49ef830b65 * ThreadTest.cs: Use Assert instead of deprecated Assertion class.
Code formatting. Added test for bug #81568.

svn path=/trunk/mcs/; revision=77573
2007-05-17 16:20:21 +00:00
Gert Driesen a0bd701d7d * ThreadTest.cs: Fix build using csc 1.x.
svn path=/trunk/mcs/; revision=77488
2007-05-16 16:44:43 +00:00
Jonathan Chambers e706c6bfd2 2007-05-09 Jonathan Chambers <[email protected]>
* Thread.cs: Add ApartmentState related tests.


svn path=/trunk/mcs/; revision=77078
2007-05-09 18:34:13 +00:00
Gert Driesen 777a30f84d * MutexTest.cs: Enabled test for bug #79358.
svn path=/trunk/mcs/; revision=75354
2007-04-03 18:30:46 +00:00
Gert Driesen 2e930c35d0 * MutexTest.cs: Added test for bug #79358. Code formatting, no longer
derive from (deprecated) TestCase.

svn path=/trunk/mcs/; revision=69457
2006-12-13 18:29:50 +00:00
Sebastien Pouliot e83c118a70 2006-06-14 Sebastien Pouliot <[email protected]>
* ExecutionContextTest.cs: Changed Run test to execute only under
	CAS until bug #78306 (CompressedStack) is fixed.


svn path=/trunk/mcs/; revision=61695
2006-06-14 13:35:19 +00:00
Zoltan Varga f332b89283 2006-06-04 Zoltan Varga <[email protected]>
* InterlockedTest.cs: Fix Interlocked.Add tests.

svn path=/trunk/mcs/; revision=61440
2006-06-04 15:56:12 +00:00
Gert Driesen f81996a0c4 * TimerTest.cs: Corrected bug number (from #78202 to #78208).
* ChangeLog: Same.

svn path=/trunk/mcs/; revision=60102
2006-04-30 18:29:15 +00:00
Gert Driesen 2a73ea1ab3 * TimerTest.cs: Added test for bug #78202. Marked individual tests
NotWorking instead of the test class to enable test for bug #78202.

svn path=/trunk/mcs/; revision=60099
2006-04-30 09:40:16 +00:00
Atsushi Eno d211f6102b 2006-01-18 Atsushi Enomoto <[email protected]>
* ThreadTest.cs : mark not-working tests as [Ignore] since it blocks
	  run-test-ondotnet under 2.0 profile.


svn path=/trunk/mcs/; revision=55724
2006-01-18 14:17:13 +00:00