Parcourir la source

[corlib] Fixes StoppedThreadsThrowThreadStateException test build

Marek Safar il y a 8 ans
Parent
commit
00934efe15
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      mcs/class/corlib/Test/System.Threading/ThreadTest.cs

+ 2 - 0
mcs/class/corlib/Test/System.Threading/ThreadTest.cs

@@ -1045,8 +1045,10 @@ namespace MonoTests.System.Threading
 			Assert.Throws<ThreadStateException> (() => t.ApartmentState = ApartmentState.MTA, "ApartmentState setter");
 			Assert.Throws<ThreadStateException> (() => t.IsBackground = false, "IsBackground setter");
 			Assert.Throws<ThreadStateException> (() => t.Start (), "Start ()");
+#if MONO_FEATURE_THREAD_SUSPEND_RESUME
 			Assert.Throws<ThreadStateException> (() => t.Resume (), "Resume ()");
 			Assert.Throws<ThreadStateException> (() => t.Suspend (), "Suspend ()");
+#endif
 			Assert.Throws<ThreadStateException> (() => t.GetApartmentState (), "GetApartmentState ()");
 			Assert.Throws<ThreadStateException> (() => t.SetApartmentState (ApartmentState.MTA), "SetApartmentState ()");
 			Assert.Throws<ThreadStateException> (() => t.TrySetApartmentState (ApartmentState.MTA), "TrySetApartmentState ()");