Merge pull request #832 from xplicit/webperf1
[mono.git] / mcs / class / corlib / Test / System.Threading / CancellationTokenTests.cs
index 3134adda7e9978c13afb89f19d608e6a79699288..cb6c129e3dae99e19e5ac10d60e0c26d52b1b49a 100644 (file)
@@ -26,7 +26,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
-#if NET_4_0 || MOBILE
+#if NET_4_0
 
 using System;
 using System.Threading;
@@ -94,6 +94,15 @@ namespace MonoTests.System.Threading
                        n.ThrowIfCancellationRequested ();
                        n.GetHashCode ();
                }
+
+               [Test]
+               public void DefaultCancellationTokenRegistration ()
+               {
+                       var registration = new CancellationTokenRegistration ();
+
+                       // shouldn't throw
+                       registration.Dispose ();
+               }
        }
 }
 #endif